[xquery-talk] Focus & function callsites

Frans Englich frans.englich at telia.com
Fri Feb 15 15:32:08 PST 2008


I need a hand here, what is this query supposed to evaluate to?

	declare variable $root := <root><c/></root>;

	declare function local:function($arg)


My conclusion is(ignoring whitespace):


because $root// returns two nodes: <root><c/> and <c/>, and hence 
local:function is invoked twice with $arg being those values.

Since the effective boolean value of a node is true, $root is returned both 

X-Hive & Saxon disagree with me. What am I missing?



More information about the talk mailing list