[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

relative order of attributes

Subject: relative order of attributes
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 7 Apr 2000 12:37:32 -0600 (MDT)
xpath order by attribute
David Carlisle wrote:
> Attributes are explictly unordered beasts

I went looking for the explicit quote and found "The relative order of
attribute nodes is implementation-dependent" in the XPath spec at
http://www.w3.org/TR/xpath#data-model

I don't disagree with it, but it seems to be less than intuitive, given
that section 2.4 implies that an attribute axis is a forward axis and thus
contains nodes in document order.


My interpretation is:

1. the attribute axis contains attribute nodes relative to the current
node, if it is an element

2. the attribute axis is a forward axis, so its nodes are in document
order

3. attribute nodes do not have a relative order in the data model


So which is it? Ordered or not?

In either case I don't see how this could return anything other than 
document-ordered attributes, because xsl:for-each by default processes
nodes in document order:

<xsl:for-each select="@*">
  <xsl:value-of select="concat(name(.),'=',.)"/>
</xsl:for-each>  

-Mike


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.