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

Re: Beta: Fatal Error: No DOCTYPE specified!

From: Terje Bless <link@pobox.com>
Date: Wed, 30 Oct 2002 23:13:26 +0100
To: W3C Validator <www-validator@w3.org>
cc: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <a01060005-1021-D0203D94EC5411D6A2D300039300CF5C@[193.157.66.10]>

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." It lets me avoid having to do more
guesswork then what is allready necessary thanks to the HTML (and related)
WGs wonderfull attitude to these issues.

Most of all, it's been tried and found to simply not work. At all.

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. It simply
is not possible to do this, least of all by any automated means, especially
since the orginal author often has no idea what DOCTYPE they "intended" to
use.

The DOCTYPE Override popup has several positive effects. 1) It gives the
user a finite set of options to choose from. 2) It hints at which is
preferable (with the "Strict" vs. "Transitional" differentiation). 3) It
sends the strong message that a DOCTYPE is actually _important_ and not
just Yet Another Magic Incantation[tm]. 4) It still allows the user to
perform a Validation, but without giving him or her the false impression
that their document is something it's not (see next paragraph).

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.


The original code which guessed at the correct DOCTYPE -- code which, BTW,
predated XHTML and XML and broke completely when faced with it! -- was a
nightmare to maintain and was only finally ripped out of there when it
turned out to both a) not work and b) not be possible to maintain any more.
The whole ability to override or insert a DOCTYPE was precisely to allow us
to dispense with the guessing without "preventing" authors from validating
their markup.

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.


What I /may/ entertain though, is a separate tool, or an option, that will
let authors submit a file for "Guess what this is" treatment so they can
choose that DOCTYPE from the normal Validator popup (or just link to the
Validator with that DOCTYPE set in the override). This would fit in nicely
with various other ancillary tools, such as Tidy BTW, that it would be good
to provide __in_addition_to__ the main Validator.


-- 
"Python 2.0 beta 1 is now available from BeOpen PythonLabs.   There is a long
 list of new features since Python 1.6, released earlier today. We don't plan
 on any new releases in the next 24 hours."  - From Python 2.0b1 Announcement
Received on Wednesday, 30 October 2002 17:13:31 GMT

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