Re: Doctypes and the dialects of HTML 5

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

Why?

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:

http://www.whatwg.org/specs/web-apps/current-work/#the-initial0

> 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.

http://www.w3.org/TR/html401/struct/global.html#adef-version

XHTML2 is also making exactly the same mistake.

http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-document.html#adef_document_version

> 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
http://lachy.id.au/

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