[whatwg] text/html conformance checkers and doctype

Henri Sivonen hsivonen at iki.fi
Thu Jul 28 07:37:24 PDT 2005


On Jul 28, 2005, at 04:28, Ian Hickson wrote:

> On Sun, 24 Jul 2005, Henri Sivonen wrote:
>>
>> From WF2: "HTML documents that use the new features described in this
>> specification and that are served over HTTP must be sent as text/html 
>> and must
>> use the following DOCTYPE: <!DOCTYPE html>."
>>
>> The substrings "DOCTYPE" and "html" are case-insensitive, right?
>
> You mean "is <!doctype html> a conformant start to an HTML5 document?"?

Yes, that's what I meant. Also <!docType    htMl
    >.

> If
> so, I would answer "no". But I don't have a strong opinion. What's the
> advantage either way?

The advantage of allowing case-insensitivity and white space variance 
is that it would be more uniform with HTML4 doctypes. That is, it would 
be easier to write software that deals with both.

The advantage of requiring a constant string would, OTOH, make it 
easier to treat the doctype as a magic number, except it won't work if 
comments, white space or even PIs are allowed before the doctype.

> (I'd rather address this in WA1 than WF2, anyway.)

I understand, but WF2 is an extension to HTML4, so it is reasonable to 
expect that white space and case insensitivity is allowed where it is 
allowed in HTML4.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/




More information about the whatwg mailing list