W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

Re: Why is "html" forced to lower case in DOCTYPE?

From: <html-tidy@war-of-the-worlds.org>
Date: Wed, 23 Feb 2000 00:05:44 -0600
Message-Id: <v04220800b4d923b7699a@[216.229.13.10]>
To: html-tidy@w3.org
"J. David Bryan" <jdbryan@acm.org> wrote:

>    Whenever Tidy supplies a corrected DOCTYPE, it produces one such as
> "!DOCTYPE html PUBLIC...", i.e., with the "html" in lower case.  In
> lexer.c, the "FindGivenVersion" routine, which is responsible for parsing
> the DOCTYPE statement, has this comment at line 769:
>
>  /* but at least ensure the case is correct */
>
> FindGivenVersion then replaces the DOCTYPE string supplied in the source
> HTML file with the identical string but containing "html" in lower case.
>
>    Can someone please explain why changing this to lower case is
> "correct?"  Thanks.

I too am interested in the answer to this question, especially in light of
the fact that all DOCTYPEs I've seen from the W3C have HTML in caps,
including the supplied DOCTYPE declarations from
<http://validator.w3.org/>.  Even the DTD for HTML 4.01 has it in caps.  It
seems only xhtml demands its DOCTYPEs have a lowercase "html".

HTML Tidy is the only source I've seen that insists it be lowercase in all
cases.  I would ask that its case at least conform to the case chosen for
tags, i.e. if I'm writing in a version of HTML that allows tag names to be
capitalized and I've told HTML Tidy to capitalize them, the DOCTYPE
reference should have "HTML" capitalized.  I'll sacrifice the readability
of my HTML source when I switch to XML and not before (I think demanding
all tags and attribute names be lowercase in XML was the wrong choice, but
one I'll suffer with when I'm ready).
Received on Wednesday, 23 February 2000 01:07:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT