|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Permathread: order of elements and attributes
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! 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
|
|||||||||

Cart








