[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Focus & function callsites

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


  Focus & function callsites
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.