There is no function called "return". Just remove the keyword. Depending on the context, you might need to remove the outer curly braces as well.

It's a little confusing because you can say

let $x:=0 return 23

but you can't say

return 23

I argued that for the generalized FLWOR _expression_ in XQuery 3.0 the only mandatory clause should be "return", which would make this legal - but I lost.

Michael Kay
Saxonica

On 01/10/2012 15:19, Gleb Gawriljuk wrote:
Hey everyone,

I have the following query which I use as a string in Saxon 8.9: 
{return( 
if (
not(doc('path.xml')/Student/StudentID = doc(path.xml')/RentNote/StudentID) and
not(doc('path.xml')/Buch/BuchID = doc('path.xml')/RentNote/BuchID)
then error()
else <ok></ok>
)
}

However I receive the follwoing error:
Inline-Bild 1

I cannot see where my error lies. I am just executing the return function which holds a xpath _expression_. Can anybody help?

Kind regards,
Gleb


_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk


_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to