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

Re: Doctypes and the dialects of HTML 5

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sun, 25 Mar 2007 05:47:09 +1000
Message-ID: <4605803D.2080400@lachy.id.au>
To: Jirka Kosek <jirka@kosek.cz>
CC: Daniel Schattenkirchner <schattenkirchner.daniel@gmx.de>, public-html@w3.org

Jirka Kosek wrote:
> Daniel Schattenkirchner wrote:
>> from an authors point of view I was wondering how HTML5 will handle
>> doctypes (I hope we all know why they are important).
> They were important in SGML era, where there were no namespaces and
> there was only DTD validation.

They were important for SGML because DTDs described some of the parsing 
rules for the document, like entities and empty elements.  The lack of 
namespaces had nothing to do with it.

> I hope that HTML5 (or whatever else name it will have) will made
> !DOCTYPE optional (at least for XML serialization).

See the WHATWG FAQ I pointed to in my previous post.  The DOCTYPE is 
required for HTML due to DOCTYPE sniffing, but it is optional in XHTML 
because there is no DOCTYPE sniffing and serves no purpose.

>> Even if Web Applications 1.0 becomes HTML5 I don't think it can keep
>> "<!DOCTYPE html>" because it probably needs versioning in it. The public
> Yep, versioning is necessary


Browsers are only going to have one parser to handle all HTML on the 
web, not a separate parser for each different version.

There's still a question about how to handle the few parsing differences 
between quirks and standards mode.  See the big red issue in this section:


> HTML already offers different way of specifying version used -- profile 
> attribute on head element.

The profile attribute is not defined for versioning at all.  Please see 
the definition in the HTML4 spec.

>  But this is not very known feature and it is rarely used.

It has been removed from HTML5 for that reason.

> What will be more suitable is version attribute allowed on root element
> (html) and also on other elements which can act as roots of HTML
> fragments (e.g. div). So for specifying that you are using HTML 5.0 you
> could write:
> <html version="5.0">

Why would that be useful?  You first need to explain what purpose 
versioning serves in HTML.  What are the use cases?  Why should authors 
bother using it?

HTML4 had a version attribute.  It was deprecated and has seen virtually 
no use in the real world.  The spec also lacked any processing 
requirements and didn't even define what values could be used.


XHTML2 is also making exactly the same mistake.


> Dan, if you are reading this could you please add problem of versioning
> to the list of issues? Thanks.

Please don't, it's not an issue.  Let's not waste any more time than 
necessary on proposals that have no clear use cases.

Lachlan Hunt
Received on Saturday, 24 March 2007 19:47:46 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:21:34 UTC