[xquery-talk] incorrect syntax?

Ghislain Fourny ghislain.fourny at 28msec.com
Mon Oct 1 07:25:03 PDT 2012


Hi Gleb,

Could the prefix in front of the return call be missing? (e.g., local:return, depending on how you defined this function)

By default (if you have not changed it), the default function namespace is the builtin one (also available through fn:), so just typing "return" will look up among builtin functions (fn:return, which as far as I know does not exist).

Does this help?

Kind regards,
Ghislain


On Oct 1, 2012, at 4:19 PM, Gleb Gawriljuk <glebgawriljuk at gmail.com> 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:
> <image.png>
> 
> 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
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk




More information about the talk mailing list