|
Posted by Jukka K. Korpela on 02/02/02 11:48
Andy Dingley <dingbat@codesmiths.com> scripsit:
>> It is wrong*) because it is contrary to actual facts. That is,
>> neither the document type declaration nor the DTD**) says such a
>> thing, in principle or in practice.
>
> OK, now I see your point (to some extent).
I'm afraid you don't. Either the statement was correct, or it wasn't. If it
were correct, the person who presented it, or someone else, could have given
arguments for it. I don't need to disprove it; you need to prove it, and you
cannot.
> The DTD clearly doesn't
> tell the browser anything because it doesn't even get loaded.
That's actually irrelevant, though it might make the point clearer for
psychological reasons. The DTD is a formal description of markup syntax,
nothing more, nothing less. It says absolutely nothing about the meaning of
any element, still less how it should be processed. Besides, the original
question was about "doctype", which commonly means document type declaration
(<!DOCTYPE ...>), _not_ a DTD.
> So how would you feel about this:
> "The document type declaration (*) tells the web browser what type
> the document is and what set of rules to use when displaying the
> website."
>
> What's wrong with that?
It's simply incorrect. (It's even more incorrect than you intended; you
wrote "website" though you meant "web page".)
> Commonplace browsers _do_ categorise the content offered,
That does not make a document type declaration tell them anything.
You can compare this with a situation where a server sends some data to a
browser, declaring, in HTTP headers, the data to be plain text, text/plain.
Some browsers are known to look at the last part of the URL, or the start of
the actual content of the data, and decide to treat the data as an HTML
document, text/html. This is clearly a violation of the protocol, and
authors may need to take appropriate actions to avoid it, so they may need
information about this misfeature. But it would be incorrect and
inappropriate to say, for example, that a URL ending of ".htm" or data
content starting with "<html>" tells the web browser what type the document
is and what set of rules to use when displaying the
website.
If you think that, for example, the document type declaration
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
really tells the web browser what type the document is and what set of rules
to use when displaying the website, then what _is_ this type and what _are_
these rules? The declaration is known to throw IE into "quirks mode", but
this is simply what the browser does, not based on anything that the
declaration tells. Besides, what the browser does hasn't even been publicly
documented by the vendor. (The existing material on this by Microsoft is
grossly incomplete, and they say that it is intentionally so.) If the
declaration really tells the browser to go to "quirks mode", should be blame
those browsers that do no such thing?
--
Yucca, http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|