[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: attribute order (RE: Syntax Sugar and XML information models)
- From: Gavin Thomas Nicol <email@example.com>
- To: firstname.lastname@example.org
- Date: Fri, 30 Mar 2001 08:26:51 -0500
Christopher R. Maden [mailto:email@example.com]
> 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
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
One design goal in XEXPR was to unify this. If you look at
<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).