[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: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Thu, 24 Sep 2009 13:13:10 +0200
Re:  Fetch a sequence of nodes from input file
David Carlisle schrieb:
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.

Thanks, David. I evaluated the spec lazily.


a system can't define << in a way that intermingles two trees.

Even if it could, that would be confusing.


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.

I had always thought of "document order" as the order of nodes in a document (in a tree, so *tree order*), but in addition it can be read as the order of documents in a collection (collection order, or *forest order*).

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/*">

Good example to illustrate the usefulness of the general rule. I can see there is wisdom in it. Thanks!

--
Michael Ludwig

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.