W3C home > Mailing lists > Public > www-validator@w3.org > October 2002

Re: Beta: Fatal Error: No DOCTYPE specified!

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 31 Oct 2002 12:13:01 +0100
To: Terje Bless <link@pobox.com>
Cc: W3C Validator <www-validator@w3.org>
Message-ID: <3e100402.316157490@smtp.bjoern.hoehrmann.de>

* Terje Bless wrote:
>Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
>
>>Just ignore what I've written before and answer me, why and for whom is
>>it better if the validator refuses to validate instead of defaulting to
>>the most loose document type for validation?
>
>"For everyone involved!"
>
>It encourages authors to include a DOCTYPE. It dissuades well-meaning
>people from telling authors "Oh the DOCTYPE thingy is just some obscure
>technical mumbo-jumbo. Just ignore it."

"Why do I need a document type declaration?"
"The Validator won't validate without."

I don't see the encouragement.

>For any example I can give you of how the guessing would fail, you'll just
>give me a counter-example of how I could detect it ("Just look for
>xmlns=foo..."), but the problem is that there is a potentially infinite
>number of special cases that would need to be taken into account.

Let me repeat:

  if element html has attribute xmlns='http://www.w3.org/1999/xhtml'
    default to XHTML 1.0 Transitional
  else
    default to HTML 4.01 Transitional

It is possible to implement this and there are no special cases. As an
alternative you can distinguish between HTML 4 Transitional and HTML 4
Frameset rather than to care about XHTML since it is unlikely to find
doctype-less XHTML documents on the web, this is not all that important.
However, if some author had intentions different to this behaivour, he
shall include a document type declaration or select a different document
type declaration from the validator provided menu.

Authors who not hava a document type declaration in their documents
usually don't know what it is supposed to be used for and if they care
to insert one because somebody says them to do so, they don't know what
document type declaration would fit their needs. Does the Validator help
them when refusing to validate such documents? Not at all.

A validator newcomer usually tries to validate popular sites to check
whether validation is worth the time and in how far the validator could
be helpful. Since most popular sites don't care too much about character
encoding specifications and document type declarations, it will hear the
validator saying "I won't validate" this, and that page and page. The
benefit of the MarkUp Validator is -- no benefit. He will in my humble
opinion leave with a shake of the head trying to find something more
worthwile.

>The final and most important reason for not guessing is that doing so
>_will_ give users misleading information. It _will_ report errors that do
>not exist, and it will _not_ give error messages about things that are in
>fact illegal. This latter is actively harmfull; it creates confusion and
>dissuades authors from Validating their markup.

Neither is true. The validator will report the missing document type
declaration as error and all errors found for the default document type.

>Even should you somehow convince me that guessing is preferable behaviour
>for the Validator, you'll never convince me to /maintain/ such code because
>it's simply too incredibly much dirty work for very dubious benefit.

You are talking about a best guess, I just want a reasonable default.
That's two different things, and I agree, a best guess is a little
harder to implement and maintain than a reasonable default, but that's
just not what I am talking about.

However, we both made out points, I think no defaulting is a usability
nightmare while you think it improves usability. I will just point
people at better tools, i.e., the WDG HTML Validator.
Received on Thursday, 31 October 2002 06:12:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:04 GMT