Hello Yannis,
As stated in the documentation you linked to the "update" operator is currently BaseX specific (to simplify transform operations) and not part of the standard. As it seems you are using XQJ to access BaseX, it will just be able to parse valid XQuery 3.0 - So you will have to use the longer "copy modify return" form.
The copy expression can be used inside a for loop, there is no restriction here. So something like
for $ft in /server let $node := copy ... modify ... return return doSomething($node)
would work. If you want to modify something multiple times you have to do it the other way round, i.e. putting the for loop inside your modify clause
Cheers, Dirk
On 22/07/14 15:57, Ioannis Kavvouras wrote:
Hello,
I've tried to use the update expression (http://docs.basex.org/wiki/Updates#update) in basex releases after 7.8, but it always throws the exception: --- code ---
- XQJQS001 - Invalid XQuery syntax, syntax does not pass static validation.
- Root Cause:
- net.xqj.basex.bin.bx: Encountered " <QNameToken> "update ""
I try to run the simple xquery: for $ft in /server return $ft update delete node $ft/formal
Regards Yannis
PS: the copy expression cannot be used inside a for loop , is it?