xsl-list
[Top] [All Lists]

Re: [xsl] Fetch a sequence of nodes from input file

2009-09-24 07:13:49
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>