W3C home > Mailing lists > Public > www-html@w3.org > December 1999

Re: Tag Soup (was: FW: XHTML)

From: Arjun Ray <aray@q2.net>
Date: Mon, 6 Dec 1999 23:40:14 -0500 (EST)
To: www-html@w3.org
Message-ID: <Pine.LNX.4.10.9912062317410.28063-100000@mail.q2.net>

On Mon, 6 Dec 1999, Daniel Hiester wrote:

> But those are doctype declations for html, not xhtml.

The doctype declaration is an SGML category.  There's no such thing as a
'HTML doctype declaration' or a 'xhtml doctype declaration'.  The fact of
the matter is that the doctype declarations produced by Frontpage,
Composer et al are utterly bogus - to impress the natives, I suppose.

> Forgive me if I misunderstand, but I thought XML documents had to be
> well-formed [...] I also thought that part of a document being
> well-formed is it having a doctype declaration... Am I mistaken?

Yes.  WF does not require a doctype declaration.  The WebSGML TC to ISO
8879 has made doctype declarations optional - omissible where they aren't

The doctype declaration serves two syntactic purposes in the SGML parse of
a document - to incorporate the contents of the DTD (various declarations
and PIs) and to identify the top-level element.  The contents of the DTD
matter for things like minimization, default values, notations, and the
referents of entity references.  If the instance doesn't need any of these
- all tags present, no notations invoked, no entity references used etc -
then that's the same thing as "saying" that the contents of the DTD are
empty and the top-level element is already explicitly evident.  That's why
the doctype declaration can be left out in certain applications.

Unfortunately, there seems to be a mythology in which the doctype
declaration is supposed to serve semantic purposes, such as "identifying"
versions or fixing meanings.  There's no basis for such voodoo in ISO8879
or the TCs.

Received on Monday, 6 December 1999 23:17:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:52 UTC