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

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

  • From: "Christopher R. Maden" <crism@m...>
  • To: xml-dev@l...
  • Date: Fri, 30 Mar 2001 01:28:47 -0800

order by syntax
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


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.