RE: Intent to Conform (was Re: Version information)

L. David Baron wrote:
On Thursday 2007-04-12 11:01 -0700, Chris Wilson wrote:
> >[on <!DOCTYPE html5> not triggering standards mode]
>>
>> Umm, it does in IE.  And I'd expect it to in any other browser,
>> too - it's an unknown doctype.
>
>It's an incorrect DOCTYPE declaration (since the name given doesn't
>match the root element for the document format).

Hey, you've read an SGML spec.  :)  Of course, we all thought it was a good idea not to be bound by SGML, right?  The point made about XML by someone is a good one, though.

>Would you expect "<!DOCTPE html>" (missing "Y") to trigger standards mode?

Nope, because we look for <!DOCTYPE.  We just don't compare to the root element name.  A good point, though.

>What about "<!html>"?  What about "DOCTYPE" without any markup around it?

Ditto above - we look for <!DOCTYPE...>, so no and no.

>Perhaps that was a mistake, but the basic idea of Mozilla's quirks mode selection code (which I wrote) is:
>
> 1. Parse the doctype.  If we can't (e.g., if it's not present or
>    malformed), use quirks mode.
>... This triggers quirks mode because it fails in step (1).

Apparently the determination of malformed is not quite the same across Mozilla, Opera, Safari and IE.

-Chris

Received on Friday, 13 April 2007 17:12:42 UTC