On 10/1/2012 10:48 AM, Michael Kay wrote:
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
Actually if you really start to dig, it becomes a lot confusing
you can say
let $x := 0 return (23)
but in that instance return is not a function call; the parentheses here
are constructing a sequence (of one item)
But if you say
declare default function namespace "x";
declare function return ($x) { $x+1 };
return (23)
that does seem to return 24 for at least one processor that I tried,
which seems truly bizarre (to me, anyway)
yet
declare default function namespace "x";
declare function return ($x) { $x+1 };
return 23
returns 23
while
declare default function namespace "x";
declare function return ($x) { $x+1 };
return return(23)
returns 24
-Mike Sokolov
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk