[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|