[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: "johnli121" <johnli121@xxxxxxx>
Date: Sun, 14 Aug 2005 09:02:50 +0800
RE:  How to sort attribute?
Thanks for all of your kindly helps. 

I cannot accept to transform attribute to element. What I want is sort the
attribute lexicographic. Now I understand it depends on the implementation
of engine. I use apache xalan 2.6.0, I will study to see if there is any
option for this purpose.  

Thanks,
John


-----Original Message-----
From: xsl-list-return-19559-johnli121=163.com@xxxxxxxxxxxxxxxxxxxxxx
[mailto:xsl-list-return-19559-johnli121=163.com@xxxxxxxxxxxxxxxxxxxxxx] On
Behalf Of Mukul Gandhi
Sent: Sunday, August 14, 2005 12:39 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  How to sort attribute?

Hi Kenneth,
  I agree with you completely!

Regards,
Mukul

On 8/13/05, Kenneth Stephen <marvin.the.cynical.robot@xxxxxxxxx> wrote:
> Mukul,
> 
>    Err...dont you have that backwards? The spec is clear about the 
> ordering of attributes - it is unordered and any order that is 
> imposed, if at all, is implementation defined. So your expectations 
> are anomalous.
> 
>    Not to start a flamewar or anything, but lets remember semantically 
> speaking, it doesnt make sense for attributes (or properties, if you 
> want to look at XML with OO-coloured glasses) of elements (objects) to 
> have order. As Douglas pointed out, if ordering the data in the 
> attributes makes semantic sense to John's application, then it makes 
> much more sense to restructure the XML so that the data in the 
> attributes appears as child elements.
> 
> Regards,
> Kenneth
> 
> On 8/13/05, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> > I thought this code should have sorted attribute nodes by 
> > names(seems logical). I tested with Saxon 8.4, and it sorted the 
> > attributes by name.
> >
> > <xsl:for-each select="@*">
> >    <xsl:sort select="name()"/>
> >
> > I remember David Carlisle telling some time back on XSL-List, that 
> > XML Spec is notoriously famous for such anomalies.

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.