Re: [xsl] nodes order in union

Subject: Re: [xsl] nodes order in union
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sat, 17 Nov 2001 18:33:19 +0000
Hi Philippe,

> Is the XSLT processor (Saxon, actually) cleaver enougth to process
> the nodes in right order ? Or is there somewhere in Xpath or XSLT a
> rule which says that in this particulary case, union must yield a
> node-set where attributes are located before other nodes (I can't
> find it)?

The nodes in node sets aren't kept in any particular order (hence
'sets'). However, when you tell the XSLT processor to process them
with xsl:for-each or xsl:apply-templates, it processes them in
document order. According to the XPath Rec, attributes come before
child nodes in document order, which is why the attributes are
processed first, and copied onto the element first, and why no error
occurs.

The precise reference on document order is
http://www.w3.org/TR/xpath#dt-document-order.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread