Lists Home |
Date Index |
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
Hope this helps,
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
>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
>Only a few wild and crazy people thought XML would
>become the lingua franca for all bits on the wire.
>From: email@example.com [mailto:firstname.lastname@example.org]
>Quoting "DuCharme, Bob (LNG-CHO)" <email@example.com>:
> > 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
>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
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. =