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

RE: How to sort attribute?

Subject: RE: How to sort attribute?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 13 Aug 2005 10:25:51 +0100
RE:  How to sort attribute?
Your for-each will process the attributes in sorted order, but once they are
added to the new element they can be reordered by the system, because
attribute order is implementation-dependent. There's no way of controlling
the order in which attributes are output by the serializer.

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: John Li [mailto:johnli121@xxxxxxx] 
> Sent: 13 August 2005 10:11
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  How to sort attribute?
> 
> Hi,
> 
> When exporting one node and its attribute, I want to sort its 
> attributes
> lexicographic. I try it as below but always fail. Anyone could help?
> 
> <xsl:for-each select="@*">
>     <xsl:sort select="name()"/>
>     <xsl:copy/>
> </xsl:for-each>
> 
> Thanks,
> John

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.