Re: Make DTDs optional?
At 01:49 PM 9/30/96 -0500, James David Mason wrote:
>At 01:54 AM 10/1/96 +1000, Rick Jelliffe wrote:
>>Is this really more what XML should be about: a markup language for
>>presenting documents in the form required by the application? (Which
>>would correspond to the normalised form of an SGML document when parsed
>>against archetectural forms that model the XML application.) In other
>>words, a temporary/application/closed-system format rather than a
>>archiving/modelling/manipulation/open-system format like SGML. (no flames
>>about 'format' please)
>I've been staying quiet in this discussion group, but Rick's comment
>provides me the opportunity for saying something I've been thinking
>increasingly for about a week:
>Are we trying to do here the thing that ODA *should have been*?
I think it's important to remember that a DTD is never necessary to
*process* an SGML document, assuming we avoid those markup minimization
features that require knowledge of the content models.
If all the markup is extant, the structure is completely self describing.
Declaration sets are only required for *validation* and for markup
minimization support. If you don't need either of these, you don't need
explicit declaration sets (modulo things like declaring empty elements,
notations, and attributes with special declared content).
While this raises the specter of people doing really stupid things, so
what? You can't legislate good practice (or, as I prefer to say it, "people
have a right to fail").
I think it's important to remember that DTDs *are properties of documents*,
meaning that the schema definition itself is part of the document.
Therefore, the idea of a document whose declaration set simply reflects
those elements the author made up as they created the thing is fine, as far
as SGML or XML is concerned. Therefore, I have *absolutely no problem*
with a system in which explicit DTDs are completely optional (and am on
record as having proposed exactly that for SGML at the Munich WG8 meeting).
[It also means that, in the general case, it is impossible to control what
an author uses for a document type using SGML-defined means.]
You may have a *policy* requirement not to allow this, but I think that at
the level of document encoding syntax, DTDs are not necessarily necessary.
In other words, the need for validation reflects a policy requirement, not
a hard requirement of all potential users. It's appropriate to provide a
robust mechanism that supports validation, but I think it is a mistake to
*require* a document's schema to exist before the document does (for one
thing, it's impossible to define a complete schema in advance of document
creation much of the time).
Note that one of the powerful features of enabling architectures is that
they provide a formal mechanism to define a general document schema *that
cannot be changed by authors* because the schema definition itself is not a
property of the document, but is only used by reference. Thus, you can
express policies that require conformance to a particular schema by
requiring conformance to a set of architectures *without caring* what the
detail schema for each document is (as long as the document conforms to the
architecture to the degree defined by your policy).
W. Eliot Kimber (firstname.lastname@example.org)
Senior SGML Consultant and HyTime Specialist
Passage Systems, Inc., (512)339-1400
10596 N. Tantau Ave., Cupertino, CA 95014-3535 (408) 366-0300, (408)
2608 Pinewood Terrace, Austin, TX 78757 (512) 339-1400 (fone/fax)
http://www.passage.com (work) http://www.drmacro.com (home)
"If I never had existed, would you still remember me?..."
--Austin Lounge Lizards, "1984 Blues"