0

我从以下网站下载了名为standard的文件并将其重命名为auction.xml Link to file

我写了一个插入查询并存储在一个名为 insertqz.xq 的文件中

for $doc in doc('auction.xml')/site/open_auctions//bidder/increase
return insert node <watch open_auction='open_auction5104'/> before $doc

并运行以下命令:zorba -t -q insertqz.xq

我收到以下错误:(no URI):1,2: dynamic error [err:XPDY0002]: "context item": undeclared variable

有人可以帮我吗?

4

1 回答 1

0

删除 -q

zorba -t insertqz.xq

打印更新的 xml 文件:

for $doc in doc("auction.xml")/site/open_auctions//bidder/increase return insert node <watch open_auction="open_auction5104"/> before $doc; doc("auction.xml")

于 2015-08-07T09:50:02.117 回答