W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: Version information

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 13 Apr 2007 17:11:32 +1000
Message-ID: <461F2D24.3090600@lachy.id.au>
To: Henrik Dvergsdal <henrik.dvergsdal@hibo.no>
CC: public-html@w3.org

Henrik Dvergsdal wrote:
> On 12. apr. 2007, at 23.23, David Håsäther wrote:
>> Henrik Dvergsdal wrote:
>>> I think the correct DOCTYPE would be:
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 5.0//EN">

That would imply that there is a DTD, and there isn't (at least not an 
official one, though someone could write one if they really wanted to).

>> Why? <!doctype html> is a 34 bytes shorter way to trigger standards mode.
> 
> Because that wouldn't be a valid SGML/XML doctype.

While it's not "valid" in the strict sense of the term, <!DOCTYPE html> 
is a well-formed XML DOCTYPE.  However, it is not required for the XML 
serialisation of HTML5 (XHTML5).

AIUI, according to SGML, <DOCTYPE html>, <!doctype html> (or any other 
variation) are also syntactically correct DOCTYPEs.  However, HTML5 is 
not based upon SGML parsing because, despite any bogus claims to the 
contrary, SGML parsing is incompatible with the web.

As has been pointed out, the HTML5 spec defines its own syntax and 
parsing requirements for the HTML serialisation.  The XML serialisation 
uses XML parsing and syntax rules.

The only reason for including the DOCTYPE at all is to trigger standards 
mode, and that only applies to the HTML serialisation.  That is why 
there is no DOCTYPE required for XHTML5.

Validation does not need to be DTD based.  In fact, DTD based validation 
has many limitations and problems associated with it.  Henri's HTML5 
conformance checker demonstrates how it is possible to check conformance 
without a DTD.

See the WHATWG FAQ which deals with these and other issues.

http://blog.whatwg.org/faq/

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Friday, 13 April 2007 07:11:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:53 GMT