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

RE: The order of attributes


graham ducharme
One thing that I've heard from some of the designers of XML (and of SGML, 
for that matter) is that attributes were intended to represent "metadata" 
and elements to represent "data".  Of course, distinguishing between those 
is fuzzy at best and certainly subjective.  But things like "this data was 
generated on this date" or "this document was authored by this person" were 
considered to be appropriate for metadata/attributes, while "this data" or 
"this document" were considered to be appropriate for data/elements.

Under the assumption that what I have heard is correct, then I think that 
explains the reason that the order of attributes was not considered 
important.  Certainly, it makes just as much sense to say "Joe wrote this 
book in 1997" as it does to say that "In 1997, Joe wrote this book".  Thus 
<book author="Joe" date="1997"><chapter>...</chapter></book> is identical 
to (in meaning) <book date="1997" author="Joe"><chapter>...</chapter></book>.

I might dare say that the "reason" why attribute order is explicitly 
irrelevant is because SGML was designed for documents much more than for 
data, and XML inherited the same view of its use.  They were both designed 
by "doc-heads", not by "data-heads" who have a much different view of the 
world.

Hope this helps,
    Jim

At 1/6/2006 01:25 PM, Bullard, Claude L (Len) wrote:
>My guess is (and I wasn't there) is that it added
>complexity and duplicated features in the tree. SGML
>is complicated enough without adding yet another
>feature that isn't useful in a large number of cases.
>
>However, turning this on the head a bit, if XML
>was to be a simplified SGML, why would we have added
>features that are not very useful in a large number
>of cases?
>
>Keep in mind, SGML had to be modified
>slightly to make XML a proper subset so it is
>conceivable that something along this line could
>have been added.  Again was it 'very useful in a large
>number of cases' where those cases did not include
>all of the things to which XML has been applied
>in the aftermath that the right people considered
>important then.
>
>Only a few wild and crazy people thought XML would
>become the lingua franca for all bits on the wire.
>
>len
>
>
>From: ian.graham@u... [mailto:ian.graham@u...]
>
>Quoting "DuCharme, Bob (LNG-CHO)" <bob.ducharme@l...>:
>
> > I think the general idea is that if the ordering of pieces of
> > information associated with an element matter to an application, then
> > they should be declared in the content model as child elements, where
> > you have various regular-expression-like options for describing ordering
> > options.
>
>I agree with this interpretation, but it does not explain _why_ attribute
>order
>is explicitly not relevant.
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://www.oasis-open.org/mlmanage/index.php>

========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Co-Chair, W3C XML Query WG; F&O (etc.) editor    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Standards email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA          Personal email: jim at melton dot name
========================================================================
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
======================================================================== 


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.