[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: Gavin Thomas Nicol <gtn@e...>
  • To: xml-dev@l...
  • Date: Fri, 30 Mar 2001 08:26:51 -0500

model named sugar
Christopher R. Maden [mailto:crism@m...]
> 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.

...or components with simple type vs components with complex type. This

 struct {
   int foo;
   struct {
     int foo;
   } bar;
 } doc;

roughly corresponds to this

 <doc foo="1"><bar foo="2"/></doc>

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

I don't think ordering is important. It is the structured vs.
unstructured nature that should make one an attribute and the
other an element. Ordering is really just an additional type
constraint.

One design goal in XEXPR was to unify this. If you look at

  <print x="4"/>

and

  <print><set name="x"><add>2 2</add></print>

the only real difference is that the second is more highly
structured, but in XEXPR, they are equivalent. This makes
XEXPR *much* more usable than it otherwise would be (not
that I commend it for personal programming ;-)).

> 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.

Right, and I think that is the main point. Different kinds of
applications need different sets of information. This has been
recognised for a very long time (propertys sets, DSSSL etc. have
something of this notion).


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.