1

というルート ノードを持つ XML ドキュメントがありますentity。ドキュメントごとに、名前tenderを持つノードの数を数え、属性として に追加したいと考えていますentity

import module namespace file = "http://expath.org/ns/file";

for $file in file:list("../api/entity/p/", true(), "??????.xml")
let $doc := doc(concat("../api/entity/p/", $file))
return
    update insert attribute number_of_tenders {count($doc//tender)} into $doc/entity

Zorba 用ではないhttp://exist-db.org/exist/apps/doc/update_ext.xmlに従っていましたが、これは標準の XQuery だと思いました。

エラーが発生します

6,69: static error [err:XPST0003]: invalid expression: syntax error, unexpected expression (missing comma "," between expressions?)

私は何を間違っていますか?

4

1 に答える 1