xsl-list
[Top] [All Lists]

RE: Order That Nodes Are Processed

2004-01-06 11:28:28
If I have an <xsl:apply-template select="some criterion"> or 
<xsl:for-each select="some criterion"> statement in my 
stylesheet, am I guranteed that the nodes will be processed 
in the exact order that the qualifying nodes appear in the XML file?


Yes, the nodes are processed in document order.

A caveat if you want to be pendantic: this means that the result of
processing node A will appear in the result tree before the result of
processing node B if and only if A is before B in the input document (in
both cases "before" refers to "document order"). This has nothing to do
with the chronological sequence of processing: the XSLT processor can
process the input backwards and create the result tree backwards if it
feels like it.

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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