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

Re: Why DOCTYPE Declarations for XHTML?

From: Arjun Ray <aray@q2.net>
Date: Fri, 14 Jan 2000 05:51:41 -0500 (EST)
To: www-html@w3.org
Message-ID: <Pine.LNX.4.10.10001140447490.2094-100000@mail.q2.net>


On Fri, 14 Jan 2000, Dave Raggett wrote:

> The doctype is the means to bind the document to a DTD, 

Not really: a DTD is not an independent object that has or needs to be
bound.  The relevant declarations are syntactically an integral part of
the document, and one of the purposes of the doctype declaration is to
incorporate - not refer to - any declarations relevant to the instance
markup.  As the discussion in the SGML Handbook (p 402ff on Clause 11)
makes quite clear, the external subset per se is superfluous - indeed, Dr.
Goldfarb once proposed that it should be eliminated in XML! - because

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN">

is just syntactic sugar for

  <!DOCTYPE html [
   <!ENTITY % dtd PUBLIC "-//W3C//DTD XHTML 1.1//EN">
   %dtd; ]>

and, depending on how much parameter entity voodoo is enabled in that
%dtd; subset, an appropriately devised internal subset in the document
instance could set up almost anything one wanted as *valid* 'html'.  The
upshot is that the mere presence of a specific FPI doesn't identify the
*document type* semantically.

  http://www.deja.com/getdoc.xp?AN=325927738

> and without it you can't validate the document without a priori knowledge. 

The a priori knowledge can't be ruled out.  In fact, even traditional SGML
systems are allowed implicit or assumed declaration subsets via
"shortened" doctype declarations like these

  <!DOCTYPE html SYSTEM>
  <!DOCTYPE html>

where nothing is awry as long as the consuming application knows somehow
what it's dealing with - the point is that this "somehow" need not be
predicated on the doctype declaration - let alone a particular form.  
Erik Naggum made the general point a long time ago on the www-talk list:

  http://www.nyct.net/~aray/notes/

(The lists.w3.org archives don't don't carry www-talk for 1993-94.)

> For XHTML 1.0 you aren't required to supply a doctype, but without it
> all that can be said is the document is well-formed.

And with it, all that can be determined beyond that, at application option
(to use a validator), is the document is valid with respect to *some*
effective set of declarations.   The text I quoted from the WD said:

: If present, the public identifier included in the DOCTYPE declaration
: must reference the DTD found in [some appendix] using its Formal Public
: Identifier.

Given the 'If present' proviso (implying that this specific FPI need not
be present), I'm not sure why the essential requirement - validity with
respect to a *specific* set of declarations - wasn't simply stated in
general terms (as Erik Naggum implies), leaving the determination open to
alternatives in methods.


Arjun
Received on Friday, 14 January 2000 05:50:41 GMT

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