[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Element Order significance in XML
> -----Original Message----- > From: John Cowan [mailto:jcowan@r...]: <> > My advice: Learn to live with fixed order. The additional flexibility > is rarely worthwhile. > Ah, jeez, I hope I'm not starting another long thread, but: When dealing with data sets, it would seem to me that order is insignificant. Why? Because I have the same information if it's {A, B, C} or {B, A, C} assuming there are no relationships between {A, B}. Why force me to assume that their are? Even in XML Schema, there a limitations placed on the <all> model group, so that it can be used nested in a <sequence>, for example. So it seems like in most cases you're stuck declaring order significance when in fact their may be none. IMO (uninformed and conjectural), the reason this dependency exists is because the ML's were originally designed for markup of documents that contained narrative, which is order-dependent. But with XML being used for data transport, maintaining nonsensical sequence information in the internal data model of the consuming application imposes unnecessary overhead. What if I want to stick keyed siblings in a hashtable, for instance? Or what if I want to build content by popping things onto a stack? Can't do it naively, because things have to come out or be built in the right order to be valid, even if that order has no significance. So you have to maintain sequence information which is an artifact of the schema you're using. How is that worthwhile? Okay, flame on. I go wore my NOMEX pants today. -- Jeff
|
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
|