This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
process order was: Getting all the attribute values
- To: xsl-list at mulberrytech dot com
- Subject: process order was: Getting all the attribute values
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Fri, 7 Apr 2000 19:51:05 +0100 (BST)
- References: <200004071814.MAA86707@skew.org>
- Reply-To: xsl-list at mulberrytech dot com
correcting myself
Sorry you mislead me by throwing in a reference to processing order:-)
I just gave a correct (I hope) explanation of why @* gives unpredicatble
results
but
> > but I don't see how http://www.w3.org/TR/xslt#for-each could be
> > interpreted that way.
> see now:-)
I think maybe I was wrong (unless
>The nodes are processed in document order
means something different from its obvious meaning)
This actually is quite bizarre. XSLT is side effect free, which some
people find hard to take, although it always seems a more natural
programming style to me. But the main claimed benefit of having no side
effects is that a processor is allowed to process things in parallel or
in any order it wants so long as the end results are the same.
So my understanding has always been that a processor could execute the
templates on the elements of the node list in any order it wanted
so long as it appended the results into the result tree based on
document order in the source. The classic example is a browser jumping
to the end of a document and the renderer starting off by transforming
that last chapter and going back and filling in the rest later, to get
quicker apparent respnse.
But this phrase appears to imply that if you go
for-each select="chapter" rather than apply-templates select="chapter"
the processor does have to process the entire document in order.
Note that this issue is completely different from the original question
about attribute order where that actually affects the completed result,
not just the order in which internal processing occurs.
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list