Project

Profile

Help

problems using XQuery Update Facility

Added by Anonymous about 16 years ago

Legacy ID: #5087743 Legacy Poster: James Fuller (cutlass)

I am using the latest sa version of saxon with -tree:linked -update:discard -sa flags having problems getting a simple use case with Xquery Update Facility working; let $var := document{$seq[1]/*} return delete nodes $var//test I get the error XUST0001: The body of a non-updating function must be a non-updating expression Static error(s) in query (note: I think non-updating function/expression is now known as 'simple expression') another simpler variation would be let $var := <test><a/><b/></test> return delete nodes $var//a same problem ... appreciate being corrected in either code or my understanding of XQuery Update Facility and how its supposed to work. thanks in advance. cheers, Jim Fuller


Replies (2)

RE: problems using XQuery Update Facility - Added by Anonymous about 16 years ago

Legacy ID: #5087845 Legacy Poster: Michael Kay (mhkay)

When I try let $var := document{$seq[1]/*} return delete nodes $var//test I get an error saying $seq has not been declared. So I suspect this is not your whole query, but a fragment. And from the error message, I suspect it is contained in a function body, and that you have not declared the function to be an updating function. But I'm guessing.

RE: problems using XQuery Update Facility - Added by Anonymous about 16 years ago

Legacy ID: #5087885 Legacy Poster: James Fuller (cutlass)

thx for reading my mind ;) I completely missed the idea of updating functions e.g. 'declare updating function ' J

    (1-2/2)

    Please register to reply