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

Permathread: order of elements and attributes


xml order of elements

On Sun, 21 Aug 2005, Rich Salz wrote:

> The order of elements matters; the order of attributes doesn't.  It's not
> going to change.

Is it really so?  I can imagine developments that, while compatible with 
the existing specifications, can push to more flexible use of ordering.

E.g., since attributes in a textual representation of a document instance 
_are_ ordered, there can be parsers that report this information to the 
application.  Since this information is in addition to what is required by 
the XML Rec, there is no compliance breach here.  XmlReader in .NET 
already does this.

Based on this basic functionality, we can have applications and schema 
languages that do exploit ordering information.  Of course, the life 
is tougher for these applications if they have to handle documents 
coming from the attribute-unordered world, but as long as they do this by 
reporting errors properly (e.g., as application errors as opposed to XML 
well-formedness errors), there is no XML-compliance breach either.  And, 
of course, XML generated by such applications is compliant.

Why would anyone want to have ordered attributes (either on-demand, or 
always), is a different matter.  I'd just throw one possible reason: It 
appears trickier to endow the unordered data model with statically 
checkable types, than it is the case for the ordered data model.  So, if 
there will emerge a programming language that gives useful types to 
attributes at the cost of ordering them, it could change the way people 
write applications and documents. [I admit that a successful language 
would be more likely to support _both_ ordered and unordered approaches 
for both elements and attributes, but this is beyond the point.]

Vladimir

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.