[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Fetch a sequence of nodes from input file

Subject: Re: Fetch a sequence of nodes from input file
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 24 Sep 2009 11:55:37 +0100
Re:  Fetch a sequence of nodes from input file
> http://www.w3.org/TR/xpath20/#id-node-comparisons

> The spec does not seem to be talking about nodes from different
> documents. Is this a deliberate omission?

the definition does include nodes from different documents. If you
follow the link to "document-order" from there you will see that it is
defined (in an implementation defined way) for nodes in different
documents. 

Implementations can not define it arbitarily, given two trees, all the
nodes in one tree must be before (or after) all the nodes in another,
a system can't define << in a way that intermingles two trees.


http://www.w3.org/TR/xpath20/#dt-document-order

The relative order of nodes in distinct trees is stable but
implementation-dependent, subject to the following constraint: If any
node in a given tree T1 is before any node in a different tree T2, then
all nodes in tree T1 are before all nodes in tree T2. 

> It seems to me that NULL (as in SQL) i

no having a defined order is more useful than NUL or an error, it allows
you to process each node in some set exactly once. It's just that you
don't get to chose which order separate documents are processed. This is
what defines the behaviour of
<xsl:for-each select="$t1/*|$t2/*">
...
(with your definitions of $t1 and $t2, the for-each will iterate over
the nodes in document-order, which is defined and not an error, but
implementation defined.

If you want self-document tests then the preceding axis may be a more
suitable tool.


David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread

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-2013 All Rights Reserved.