This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
A nice thing would be: 1) If the document has no <!DOCTYPE> declaration, and 2) If no Document Override is specified to the validator, and 3) If the document's Attribute "VERSION" of the "HTML" Element tag specifies a valid version of HTML, Then the document should be parsed in accordance with the version of HTML specified in the VERSION attribute. The lack of a <!DOCTYPE> declaration would still be a valid warning regarding the document, which would still not be Valid HTML until a <!DOCTYPE> is specified. e. g. a document that begins with: <HTML VERSION="-//W3C//DTD HTML 3.2 Final//EN"> should be parsed as HTML 3.2.
(In reply to comment #0) > e. g. a document that begins with: > <HTML VERSION="-//W3C//DTD HTML 3.2 Final//EN"> > should be parsed as HTML 3.2. That's an interesting idea, but is this used anywhere? Standardized anywhere?
> is this used anywhere? Standardized anywhere? The DTDs for many versions of HTML, including all four flavors of HTML 2.0, HTML 3.2, HTML 4.01, and XHTML 1.1 all include this attribute for the HTML element. Furthermore, when the attribute VERSION occurs in the HTML element of a file submitted to the present validator, it already checkes its contents against the version of HTML, and if there is a mismatch it issues the error message "value of fixed attribute 'VERSION' not equal to default."
(In reply to comment #2) > > is this used anywhere? Standardized anywhere? > > The DTDs for many versions of HTML, including all four flavors of HTML 2.0, > HTML 3.2, HTML 4.01, and XHTML 1.1 all include this attribute for the HTML > element. Indeed, didn't know about that one. I just checked the spec for HTML4.01, which specifies that the VERSION attribute is deprecated as it duplicates the info present in the DOCTYPE declaration: http://www.w3.org/TR/html401/struct/global.html#h-7.3 So maybe what we can do is: * if there is a DOCTYPE declaration (or override), use that * else + if there is a html VERSION attribute, use that as a fallback and output a warning stating that DOCTYPE declaration are the prefered identification method + else use the default fallback document type Will have to ping the HTML WG to check that this is sound, but I guess this is feasible indeed. thanks!
(In reply to comment #2) > The DTDs for many versions of HTML, including all four flavors of HTML 2.0, > HTML 3.2, HTML 4.01, and XHTML 1.1 all include this attribute for the HTML > element. Just for completeness, HTML 4.0/4.01 transitional and frameset have it, HTML 4.0/4.01 strict don't, and no XHTML 1.0 DTD does.