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

Re: [xsl] position last and attributes

Subject: Re: [xsl] position last and attributes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 20 Sep 2012 21:37:28 +0100

On 20/09/2012 19:16, John P. McCaskey wrote:
Right now, I'm just guessing that the processor will use document order,

Bad choice of wording really as the processor _has_ to use "document order" for attribute nodes, just as for any other node. That is a defined term in the relevant specifications.

It is not (in the case of attributes) necessarily the same as the order that the attribute markup appears in the document (if there was a document that was parsed to produce the XDM tree, which is not necessarily the case).

Whether the document markup order is preserved tends to depend on the parser being used rather that the xslt processor. Some parsers implement things by putting attributes into a hash table or similar structure associated with the start tag and if they do that then order isn't preserved.


-- google plus: https:/profiles.google.com/d.p.carlisle

Current Thread