Subject: Re: [xsl] Fetch a sequence of nodes from input file From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 24 Sep 2009 11:55:37 +0100 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fetch a sequence of nodes, Michael Ludwig | Thread | Re: [xsl] Fetch a sequence of nodes, Michael Ludwig |
Re: [xsl] Fetch a sequence of nodes, Michael Ludwig | Date | [xsl] Subject: Expression handed to, rowan@xxxxxxxxxxxxxx |
Month |