[Bug 6296] text/html with XHTML 1.0 doctype and HTML5 override validates as XHTML5

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6296





--- Comment #3 from Olivier Thereaux <ot@w3.org>  2008-12-10 16:00:38 ---
(In reply to comment #2)
> I thought the rest of the HTML family also decided exclusively on media type --
> at least that's what Opera, Firefox and WebKit have implemented.

Basically, browsers and a validator are different classes of products. While it
may be true that browsers can simply decide to "parse as html" when receiving
text/html, for a validator there is no such thing as "parse as html" (or at
least there wasn't before html5).

Why? Because browsers don't use DTDs or any kind of schema. 
On the other hand, that's precisely what validators do.

For anything before html5, a validator had a choice between SGML (for HTML4.01
and below) and XML (for XHTML 1.0 and up). The XHTML DTDs are XML DTDs, and
XHTML documents MUST be parsed with an XML DTD validator. 

Try validating XHTML with an SGML validator and it will 
1) probably crash (or at least puke) because XML DTDs are different from SGML
DTDs 
2) complain about all the XML-ish constructs such as <br /> 
  (because, in SGML, such constructs have a completely different meaning than
in XML)
3) completely ignore issues about missing closing tags, etc 
(because, in SGML/HTML, omitting closed tags is OK, whereas it is NOT in XML)
etc.

I somehow wish the HTML working-group of old had been clearer about this: there
has been much confusion and frustration, especially since Steven's infamous
message on the topic:
http://lists.w3.org/Archives/Public/www-html/2000Sep/0024.html

Anyay, here's hoping that HTML5 can be/remain clearer on that matter.

> It would be nice if the validator said which parser it used and which MIME type
> it got, and further it would be nice to have a parser override. (But maybe
> these things should be in separate reports.)

the &debug=1 parameter does just that. 
It's not shown by default, for the sake of trying to keep the UI
not-too-complicated.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 10 December 2008 16:00:47 UTC