W3C home > Mailing lists > Public > www-html@w3.org > January 2000

Re: Why DOCTYPE Declarations for XHTML?

From: Murray Altheim <altheim@eng.sun.com>
Date: Sat, 15 Jan 2000 06:29:46 -0800
Message-ID: <3880845A.629E55A0@eng.sun.com>
To: Daniel Hiester <alatus@earthlink.net>
CC: www-html <www-html@w3.org>
Daniel Hiester wrote:
> 
> --The interoperability is supposed to stem from the verifiable validity of
> the markup, i.e. that the content conforms to a certain type.  The *mere*
> presence of a doctype declaration - as some inscrutable string - has no
> bearing on the needed guarantee.  IMHO.--

That's how in XML 1.0 one attaches a DTD to a document instance. As for
the comment that one could declare it as an entity in an internal subset,
yeah, so what? I can also redeclare anything in the DTD in an internal
subset. SGML and XML have all sorts of built-in flexibility, but if the
point is markup interoperability, a document conformant to the DTD declared
in its DOCTYPE provides a pretty simple and standard method.

While your message doesn't lead me to this statement, sometimes these 
discussions move in a sort of testosterone-laden, test-your-knowledge,
I-can-pee-farther-than-you direction. I can pull out my copy of 8879 
and Goldfarb and go head-to-head with many people, but I've been trying
to keep this at a practical level. I mean, really, how many people even
know (or care) what an internal subset is? And for those who do, they 
probably can safely ignore such prohibitions if they really know what 
they're doing and the application demands it. Note that there's no reason
why anyone can't take these DTD modules and do something completely XHTML-
non-conformant with them. The only thing we ask is that you then not name 
the product as part of the XHTML 'family'. What more freedom can there be?
 
> In my humble opinion, I'd rather see a requirement on a doctype in XML-based
> markup schemas for the web. I think it's important because we need to
> establish a concrete way for a UA to distinguish between one type of markup
> and another.

The industry seems to think otherwise. The biggest alteration in XML from
SGML was the definition of 'well-formedness'. The reason why XHTML requires
a DOCTYPE is that we're not defining a 'tag set' (to use I believe Dave
Raggett's terminology), we're defining a 'markup language'. The presence of
a DOCTYPE declaring an XHTML DTD provides a means of measuring conformance.
It doesn't guarantee your document makes sense and contains no spelling
errors, but at least its markup *is* XHTML.
 
> If a UA doesn't have anything more concrete than a doctype to varify that
> the markup it's reading is indeed "a brave, new..." markup, then it may
> confuse old with new.

Perhaps you're confusing what a DOCTYPE does. While realizing that of the
vast number of web documents might actually contain a DOCTYPE, very few
actually validate according to it. But the presence of DOCTYPE declares
what document type the author (if they are even aware of this, given most
HTML editors) aspires their markup to conform to. You could take any such
document and feed it to a validator to ascertain markup errors. In SGML,
documents without a DOCTYPE are illegal. In XML the rules of well-formed-
ness allow for XML documents without a DOCTYPE, but XML 1.0 validation is
*defined* by conformance to the markup declarations in the DTD:

   "Validating processors must report violations of the constraints 
    expressed by the declarations in the DTD, and failures to fulfill 
    the validity constraints given in this specification. To accomplish
    this, validating XML processors must read and process the entire DTD
    and all external parsed entities referenced in the document."

By declaring conformance to XHTML as being able to validate a document
according to an XHTML DTD we're attempting to guarantee a level of
interoperability. Lacking such a statement we have little ability to
do so. This isn't exactly new technology; people have been successfully
using DOCTYPE declarations for this purpose for probably twenty years.

For general purpose web-authoring, a DOCTYPE declaration declaring an
XHTML DTD is the simplest and safest means of guaranteeing the highest
level of interoperability that is reasonable in this environment.

As for XML Schemas, there are no XML Schemas yet. As you may well imagine,
one cannot write a Recommendation based on a work-in-progress. You might
note we've left holes in our specs for them when they do stabilize to
the point where it makes sense to begin standardizing instances of them.

Murray

...........................................................................
Murray Altheim                                   <mailto:altheim@sonic.net>
Member of Technical Staff, Tools Development & Support
Sun Microsystems, Inc. MS MPK17-102
1601 Willow Rd., Menlo Park, California 94025  <mailto:altheim@eng.sun.com>

   the honey bee is sad and cross and wicked as a weasel
   and when she perches on you boss she leaves a little measle -- archy
Received on Saturday, 15 January 2000 17:36:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:40 GMT