OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: attribute order (RE: Syntax Sugar and XML information models)



At 15:11 29-03-2001, Simon St.Laurent wrote:
>At 02:39 PM 3/29/01 -0800, Tim Bray wrote:
> >Er, well, <blushing>attribute order is explicitly not sigificant
> >in SGML, and so everyone "just knew" that the same was true in
> >XML, and in fact all the software was written that way, and
> >the 1.0 spec's failure to say so was a huge gaping 900-foot
> >plastic erratum, which is now fixed.</blushing> -Tim
>
>Now if only we knew quite how it happened that way in SGML - might help to
>evaluate whether the blushing is worth it!

Attributes are conceptually like hash tables.  They are uniquely named 
values; we can speak about *the* "id" or *the* "class" of an element.  We 
can't speak about *the* "param" child - there may well be several.  The 
attribute-element dichotomy developed precisely to model the human model of 
short, named qualities of an object vs. the contents of the object themselves.

Whether this model is pervasive, or whether it was appropriate to model it 
in SGML is certainly open for debate.  Nonetheless, many programming 
languages have similar concepts, and they seem to work well for SGML and XML.

So it seems clear to me - if you want order, use elements.  If you use 
attributes, you don't get order.  No arguments.

(XMetaL, IIRC, doesn't give you access to the order of your attributes at 
all; you get a pane of the window that has a list of the attribute names 
and their values.)

The infoset should, IMO, represent the conceptual *information* of a 
document - no attribute order, no CDATA marked sections, no numeric 
character references.  (General entities are a bit of a toss-up.)  But 
given that, basing an editor strictly on the infoset seems like a silly 
idea, since some of those things are interesting to an editor.

-Chris
-- 
Christopher R. Maden, XML Consultant
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA