Re: AW: [xsl] xsl:result-document appending

Subject: Re: AW: [xsl] xsl:result-document appending
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 19 Sep 2003 19:55:48 +0100
> 
> No, it isn't, but XML does not define any ordering for attributes of an 
> element, so an XSLT processor may encounter them in any order --

> ...
>  Introducing a sort (as David C. suggested I think)

Wendell, but that was in the other thread.
the lack of reliable ordering that Mike was refering to here is in the
procesing of elements not attributes.
The posted code had:

     <xsl:for-each select="top/item">


However the only thing you know about a for-each is that the result tree
fragments generated by executing the body on each of the input nodes
will be appended to the result tree in the specified order.
You _don't_ know that they will be generated in that order.
So if the body of teh for-all does something with side effects like
appending to a file (or even just xsl:message) that reveals the
execution order of the for-each then you will get highly unpredictable
results.


David

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


Current Thread