W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: [CSS21] Test Suite

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 31 Jul 2004 09:23:52 +0000 (UTC)
To: Thomas Scholz <info@scholz-webdesign.de>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.61.0407310914520.30030@dhalsim.dreamhost.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:31 GMT