Re: [xsl] position last and attributes

Subject: Re: [xsl] position last and attributes
From: "John P. McCaskey" <groups@xxxxxxxxxxxxxxxx>
Date: Thu, 20 Sep 2012 13:08:25 -0400
Though not required to by spec, in practice do the major XSL processors treat attributes in document order, alphabetical order, or any other repeated order?

When writing XSL, I sometimes need to jump through hoops that could be avoided if I knew the processor would treat the attributes in the same order every time. If I knew what that order is, all the better.

My code might not work on a different XSLT processor or be guaranteed to work with different revs, but often that's OK.

John

On 9/20/2012 9:21 AM, G. Ken Holman wrote:
For all we know an implementation might have alphabetized the nodes along the attribute axis in order to stop looking for an attribute when the name being looked for comes before the name of a given node on the axis!

So the specs say there is no order to attribute specifications and defaulted attributes, and the building of the XDM model imposes an order of attribute nodes on the attribute axis any way it wants or needs from the attribute specifications and defaults.

. . . . . . . . . Ken

Current Thread