[xquery-talk] Focus & function callsites
john.snelson at oracle.com
Fri Feb 15 14:55:02 PST 2008
You have not taken into account the document order sort and duplicate
elimination that happens because local:function() is called on the right
hand side of the "/" operator. This eliminates one of the results that
you were expecting to see.
Frans Englich wrote:
> 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?
> talk at x-query.com
John Snelson, Oracle Corporation http://snelson.org.uk/john
Berkeley DB XML: http://www.oracle.com/database/berkeley-db/xml
More information about the talk