Re: Doctypes and the dialects of HTML 5

Jirka Kosek wrote:
> Lachlan Hunt wrote:
>>> 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.
> 
> I'm not talking about separate parsers.

A common response to questions about why DOCTYPEs or versioning in 
necessary is along the lines of browsers knowing how to parse/render the 
document.  I was just pre-emptively addressing it before you, or anyone 
else, raised it.

> But browser is not only component which deals with HTML markup. Let's 
> say you for some reason want to use only subset of HTML which is known 
> to be supported on all mobile devices. You should be able to indicate 
> which version of HTML you are using for tools which are used to generate 
> markup (e.g. HTML editor) or check markup (validator which checks that 
> you are using only elements that are defined in particular version of 
> HTML).

Why does such an indication need to be included in the document itself? 
  Such use cases better addressed through options provided by the tool. 
  Although, in my experience, human knowledge of browser limitations is 
far superior to the information provided by any existing tool.

To illustrate my point, consider the XHTML mobile profile.  In practice, 
it's a joke.  Many phones don't even support XML, let alone XHTML, 
despite their advertised capabilites.  Opera and WebKit for mobiles are 
relatively good examples of how mobile browsers should work, and they 
don't even need the XHTML MP at all.

But there are many other browsers running on phones, most of which are 
quite poor.  I know from experience that to really target mobile 
browsers in todays market, one cannot even rely on the XHTML MP for 
determining mobile browser support, you need knowledge of, and to test 
in, as many phones as possible.  One cannot get reliable answers from 
any editor or validator.

Besides, the whole concept of a mobile profile is backwards.  It 
segregates the web into one built for desktops and another for phones. 
It's the same mistakes made by WAP, CHTML and iMode that are being 
repeated using XHTML MP, CCPP, and other silly technologies, and it 
needs to stop.

> Of course you can specify version you want to use in your 
> editor/validator/... externally, but this very impractical and it 
> doesn't work.

It's not impractical, it's way validation should work.  The interesting 
question is not whether a document conforms to the rules it expresses 
for itself, but whether it conforms to the rules specified by the one 
asking the question.

When HTML6 comes out in the future, hopefully it will be designed in a 
that ensures that conforming HTML5 documents remain conforming HTML6 
documents.  i.e. HTML5 will just be a subset of HTML6.  It's the same 
way in which CSS1 style sheets are not invalidated by CSS2.1 rules, or 
even CSS3.  CSS doesn't even have versioning.

In the event that they are slightly incompatible, conformance checkers 
should allow authors to choose HTML5.  They should generally default to 
the most recent edition of HTML.

> But it was deprecated because at the time of HTML 4 development the
> intent was that !DOCTYPE will carry version information:
> 
> Nowadays it is known that !DOCTYPE is really not very useful for this
> purpose.

Exactly!  And now that we know versioning using DOCTYPEs isn't useful, 
why should we re-introduce it using any other method?

> I don't think that there should be any processing expectations for
> version attribute defined.

If there are no processing expectations for something, the it is 
absolutely useless.

> However rules for composing version identifier should be defined.
> E.g. something like DocBook uses:
> 
> http://www.docbook.org/tdg5/en/html/ch05.html#s-notdocbook

I don't care about the mistakes made by DocBook.

> Is the above mentioned ability to indicate which version of HTML you
> intended to use (for example for HTML editing tool) good enough use case
> for you and others?

No.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Sunday, 25 March 2007 01:29:41 UTC