Subject: Re: [xsl] Fetch a sequence of nodes from input file From: Michael Ludwig <mlu@xxxxxxxxxxxxx> Date: Thu, 24 Sep 2009 13:13:10 +0200 |
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.
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.
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fetch a sequence of nodes, David Carlisle | Thread | [xsl] Subject: Expression handed to, rowan@xxxxxxxxxxxxxx |
[xsl] Subject: Expression handed to, rowan@xxxxxxxxxxxxxx | Date | Re: [xsl] Subject: Expression hande, David Carlisle |
Month |