|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Focus & function callsitesFrans Englich frans.englich at telia.comFri Feb 15 15:32:08 PST 2008
Hi,
I need a hand here, what is this query supposed to evaluate to?
declare variable $root := <root><c/></root>;
declare function local:function($arg)
{
$root[$arg]
};
$root//local:function(.)
My conclusion is(ignoring whitespace):
<root>
<c/>
</root>
<root>
<c/>
</root>
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
times.
X-Hive & Saxon disagree with me. What am I missing?
Cheers,
Frans
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






