Lists Home |
Date Index |
- From: John Cowan <firstname.lastname@example.org>
- To: XML Dev <email@example.com>
- Date: Thu, 25 Jun 1998 13:27:58 -0400
Chris Maden wrote:
> This seems unnecessarily verbose in the extreme. What's wrong with
The DTD is more verbose, but the actual instance isn't that much
more verbose. Empty elements involve only a few extra bytes over
[attribute-based design snipped]
My original DTD was attribute-based: Ron convinced me (mostly by
example) that an element-based design was just as perspicuous.
Also, it involves less effort for a SAX-type parser (or for
that matter, for a DOM-based one), which has to return attribute
group objects whenever there are attributes.
> Here's where it gets interesting: Does XSchema have to limit itself to
> the capabilities of DTDs? If so, why bother? Think about this:
XSchema 1.0 does not have to support anything that DTD's don't.
However, it will be extensible, unlike DTDs.
> <XSC:AttDef Name="one-of-these" Type="IDRef" Required="Yes"
> Enumeration="index biblio gloss"/>
> You can't do that with DTDs. The value for one-of-these must be
> specified, and it must be a legitimate IDREF, but it is constrained to
> one of the specific IDs listed.
Forgive me, but I find this particular instance incomprehensible.
Why would you want to refer to only one of a specific set of IDs?
> Another example that someone in this group (one of the Peters?) raised
> is default ID names. This is illegal in XML 1.0, but for my <index>
> element, nine times out of ten, the ID is "index".
> <XSC:ElementDecl name="index">
> <!-- whatever content model -->
> <XSC:AttDef Name="id" Type="ID" Default="index"/>
IDs are assigned by the document creator, and the schema creator
is not supposed to arrogate specific values of them.
> Any time you have a huge slew of EMPTY elements, think that maybe they
> should be attributes.
Any time you have attributes, think that maybe they should be elements.
Any time you have elements (other than the root), think that maybe they
should be attributes.
> This gives less functionality than XML DTDs, since you can have
> multiple ATTLISTs for one element type.
I never understood what purpose this served, except to add new
attributes in the internal subset that weren't present in the
external subset, a valuable property indeed. (RDF documents,
to name one example, can't be validated without this capability,
because attributes can be added in data-dependent ways to elements defined by RDF itself.)
XSchema 1.0 has no notion of an internal subset.
> And BTW, I still don't like this capitalization method. I'm all for
> <xsc:attdef>; I do all my coding by hand (and so will everyone else,
> until an XSchema editor is written; don't hold your breath).
I rather agree with you, but the notion of conformity with the
XML spec is felt to be compelling.
John Cowan http://www.ccil.org/~cowan firstname.lastname@example.org
You tollerday donsk? N. You tolkatiff scowegian? Nn.
You spigotty anglease? Nnn. You phonio saxo? Nnnn.
Clear all so! 'Tis a Jute.... (Finnegans Wake 16.5)
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)