[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re: Order That Nodes Are Processed


Subject: [xsl] Re: Order That Nodes Are Processed
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 6 Jan 2004 22:24:08 +0100

"Schwartz, Rechell R, ALABS" <rrschwartz@xxxxxxx> wrote in message
news:A1F50CB516D211409DFD05D6B3CE6D3003E8C9C2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> All,
>
> 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?

No, order of execution can only be guaranteed between dependent xslt
instructions -- e.g. an xsl:variable can be referenced only  after it has
been defined.

This is not the case  with xsl:apply-templates or xsl:for-each. The output
from them may *appear* to be produced as a result of  sequential execution,
however   this is the only thing that is guaranteed. The real order of
execution is not defined and it is perfectly possible  to have an  XSLT
processor that applies templates to all selected nodes in parallel (or in
any  other order that could make sense).


Dimitre Novatchev.
FXSL developer

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html






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



Current Thread
Keywords