Re: Errors

On Mon, 28 Feb 2005, Lachlan Hunt wrote:

> Jukka K. Korpela wrote:
> > On the other hand, moving from Transitional to Strict is largely
> > a matter of principle, rather than something that has immediate
> > practical benefits.
>
> Well, actually that's not entirely true thanks to DOCTYPE sniffing

DOCTYPE sniffing is a sad story of its own.

> Using a transitional DOCTYPE with a system identifier (the URI), Mozilla
> based browsers will use "Almost Standards Mode" rather than the full
> "Standards Mode".  The differences between the two are minor,

If you care about the difference, you can use a DOCTYPE that pleases
Mozilla on the pages you put onto the Web and a different DOCTYPE (one
that corresponds to the syntax you try to use) in the version you submit
to validation, or maybe use a "DOCTYPE override" feature of a validator.

It's not morally wrong to lie to a clueless program. Mozilla does not
actually read the DTD, it only looks at the DOCTYPE declaration.

> [1] http://www.mozilla.org/docs/web-developer/quirks/doctypes.html

It says that Mozilla goes to full standards mode if I use any
<!DOCTYPE HTML SYSTEM ...>
which is yet another indication of the cluelessness of the sniffing idea.
(IE 6 has a similar feature.) But it implies that you can well use
HTML 4.01 Transitional, or any DTD for that matter, and get standards
mode, if you declare the document type that way.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Sunday, 27 February 2005 16:56:54 UTC