Re: [Parsing] When/how flagged as being HTML

HI Stepane,

On Jul 10, 2007, at 4:21 AM, DESCHAMPS Stephane ROSI/SI CLIENT wrote:
> All your questioning brings me back to a question I didn't dare ask  
> thus
> far, for fear of reopening what looks like a huge can of worms, but  
> why was
> the "5" dropped in the doctype?
>
> I'm back-reading on that, but all the threads are very long, so could
> anybody summarize why the "5" was dropped?
> (in reference to Chris Wilson's message "Versioning and html 
> [5]" [1] - and
> even before reading that, I thought it's sound to include a version  
> number).
>
> Side thought related to your question: maybe we could have two  
> doctypes, one
> for HTML5 parsed as HTML, one for HTML5 parsed as XML. (after all,  
> we've got
> three DTD's for HTML4[2] and apart from transitional, two of them  
> are for
> separate types of HTML with separate validation criteria).
>
> Again, my apologies if people find my question offensive and  
> repetitive. I
> have a few more candid points coming up ;)
>
> [1] http://lists.w3.org/Archives/Public/public-html/2007Apr/0612.html
> [2] http://www.w3.org/TR/html4/sgml/intro.html

It might be useful to think of the HTML5 prolog as a "no quirks mode"  
switch. Its not being used in the traditional way a doctype  
declaration might be used. Its simply codifying th current practice  
of most every HTML browser UA, to treat the doctype dec as an switch  
to go into one of several quirks related modes.

The proposed syntax does that job: which is the job its supposed to  
do. So an HTML5 UA would branch on MIMe type:

                               {something XML} do nothing with the  
prolog or
                                                          use it in a  
traditional SGML/XML way
MIME type <
                              text/html: treat the prolog as a quirks  
mode switch

The idea is we want the UA to do its best to render everything it can  
regardless of which version or recommendation it comes from. As long  
as namespaces are respected (in the broad sense of the term), then a  
UA doesn't need to know a version if its trying to render everything  
it can. For example, if the meaning of the <title> element changed  
from one version to another, a UA would need to know which version it  
was processing in order to know what to display in the window's title  
bar. Or if an <a> element ceased to be an anchor for a link in a new  
version, the UA would need to know which version to know to not treat  
the behavior of <a href='alink' > as a hyperlink.

The HTML5 draft deliberately tries to avoid these versioning  
differences (except for the various legacy quirks modes). By doing  
this, the UA does not need to know anything about the authoring  
version (other than the quirks mode). A conformance check on the   
other hand would need to know what version is (or on a  more  
practical level what UAs are) being targeted by the author.

  I hope that helps.

Take care,
Rob

Received on Tuesday, 10 July 2007 11:59:27 UTC