Thomas 'PointedEars' Lahn said:
Lasse Reichstein Nielsen wrote:
No, it should not. Without a system identifier, Quirks/Compatibility Mode
should be and is indeed triggered in all known browsers that support
DOCTYPE switching.
I don't know where you got that idea, but it is not, and never was,
the way the DOCTYPE switching worked.
The MSDN page that has been referred a few times already was the
original documentation of DOCTYPE switching when it was first
introduced in IE 5.5. There is no standard governing it. All later
implementations in later versions of IE and in other browsers have
chosen to be compatible with IE 5.5's DOCTYPE switch for purely
pragmatic reasons.
A DOCTYPE declaration without a system identifier, but with a puiblic
public identifier specifying a strict version of HTML 4 (4.0 or 4.01)
will trigger standards mode.
It happens that the system identifier, i.e. the DTD URL, makes the
difference.
It is defined that way in some cases, yes, and for a Strict version
of HTML 4, the system identifier doesn't make a difference ...
.... except in Mac IE 5, according to this page.
The reason why declaring HTML 4.0 without system identifier triggers
(Almost) Standards Compliance Mode is not well-founded IMHO. Even in
HTML 4.0, which has been obsoleted 6 years ago, the system identifier
was part of the specification.
DOCTYPE switching has never been formally reasoned. It was merely a
pragmatic way of allowing new pages to select standards mode while
breaking as few existing pages as possible. Whether you violate the
HTML standard by omitting the system identifier or not is not relevant
to whether standards mode CSS interpretation should be used. What
matters is that old pages is rendered in the way they are intended,
and new pages are rendered according to the CSS1 standard.
Personally, I would prefer as many DOCTYPE's as possible to trigger
standards mode, so an unsuspecting page author will not trigger quirks
mode unless he really means it. Making an absolutely correct HTML
DOCTYPE declaration a prerequisite for standards mode would be counter
to that wish.
(With "almost standards mode" we really have three modes now: As IE 5
did it, as IE 6 does it, and as the standard says. When IE 7 comes, we'll
probably have "almost, but not entirely, completely unlike standard mode"
too.)
/L