XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
David RojasSubject: sorting attributes
Author: David Rojas
Date: 04 Jan 2007 10:08 AM
This is what I get:
Input:
<root>
<e b="bb" y="yy">
<node x="123" a="123"/>
<node x="999" a="999" b="999"/>
</e>
<e z="zz" a="aa"/>
</root>

Output:
<root>
<e b="bb" y="yy">
<node a="123" x="123"/>
<node a="999" b="999" x="999"/>
</e>
<e a="aa" z="zz"/>
</root>
Basically it is only sorting attributes within an element, not elements within a set of siblings.
Thanks.

Postnext
Minollo I.Subject: sorting attributes
Author: Minollo I.
Date: 04 Jan 2007 10:15 AM
What is "it"? Care to provide more information?

Posttop
Tony LavinioSubject: sorting attributes
Author: Tony Lavinio
Date: 04 Jan 2007 10:24 AM
If your question is 'why are attributes not in the same order in
which I specified them or in the original document', you might not
be aware that according to the XML specification, the order of
attributes within an element is 'unordered' and that it is not
guaranteed by any XML processing component that the order of attributes
is preserved.

See http://www.w3.org/TR/2006/REC-xml-20060816/#IDAZQFS

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.