Re: [CSS21] Test Suite

On Sat, 31 Jul 2004, Thomas Scholz wrote:
>>>>
>>>> Just trigger standards more. To do that, just make sure the first
>>>> thing in the document is an HTML4 Strict DOCTYPE.
>>> 
>>> I can't. You too.
>>> <http://216.239.59.104/search?q=cache:Dg36FzGJF20J:ln.hixie.ch>
>> 
>> Actually that's a good example of the heuristic doing exactly what it was
>> designed to do.
>> 
>> The idea behind DOCTYPE-triggered rendering mode switching is to detect
>> legacy documents that were written expecting the rendering of old,
>> non-compliant UAs.
>
> So your site is written for old UAs? Come on! ;)

My site isn't, but Google's header probably is.

Note that Google's header makes the HTML document completely invalid 
anyway, so what UAs must do is undefined -- HTML4 doesn't define error 
handling behaviour for cases like these.


> I tried just to illustrate the point that there are a lot of 
> possibilities that other software (proxies, firewalls, antivirus 
> programs...) could insert some code at the top of a HTML document. 
> That's the most fragile part of any document.

If they insert content at the top, without respecting the markup, they are 
making the document invalid, and all of the _other_ suggested hacks for 
detecting when a page should trigger quirks mode or not -- such as doing 
so when the author writes invalid markup -- would trigger too.

So I don't really understand what you are trying to say.



>> How would _you_ do it? The requirements are that it be determined 
>> before parsing begins (i.e. before the first element),
>
> But detecting the document type declaration requires already a parsing. 
> Or do I miss something?

It requires basic parsing, but the parsing rules are the same in quirks 
mode and standards mode. This is not the case for many other aspects of 
parsing documents.


>> and that valid strict documents be rendered in strict mode and that 
>> legacy content (cnn.com, microsoft.com, etc) be rendered in quirks 
>> mode.
>
> I don't know how to do it. But I wouldn't make it irreversible. Why not 
> use just the first need of error recovery?

How would you tell if this page:

    http://junkyard.damowmow.com/154

...neded quirks mode or not?


>>> While I see the problem behind the idea of doctypeswitching, I really, 
>>> really hate the solution. It never worked and it will never work.
>> 
>> Quite the contrary. It has issues, but it has worked better than every 
>> other proposed solution could have.
>
> I'm not convinced, but I haven't seen the other proposals. Is there a 
> list somewhere?

Not that I know of.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 31 July 2004 05:24:04 UTC