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 14:22:22 +0100
To: Ian Hickson <ian@hixie.ch>
Cc: W3C Validator <www-validator@w3.org>
Message-ID: <3e142934.325679131@smtp.bjoern.hoehrmann.de>

* Ian Hickson wrote:
>On Thu, 31 Oct 2002, Bjoern Hoehrmann wrote:
>> 
>> "Why do I need a document type declaration?"
>> "The Validator won't validate without."
>
>No, it's:
>
>   "Why do I need a document type declaration?"
>   "Your document is invalid without one."

Indeed, but the validator says

  I could not parse this document, because it does not include a DOCTYPE
  Declaration. A DOCTYPE Declaration is mandatory for most current
  markup languages and without such a declaration it is impossible to
  validate this document.

>> 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
>
>No offense, but that is _hopelessly_ naiive.

I don't think so...

>You can't know whether the <html> element has a particular attribute until
>after you've parsed the document, and you can't parse the document until
>after you've decided whether it's HTML or XHTML.

I won't disagree from a theoretical point of view, but the Validator
already pre-parses the document entity using a tag-soup parser. Not
without problems, as you state below.

>[...]

>Furthermore, the HTML working group has stated that user agents (and the
>validator is a user agent) should not attempt to detect XHTML in text/html
>documents.

You don't suggest to adhere to this statement and thus treat XHTML
documents as if they were HTML documents, do you?
Received on Thursday, 31 October 2002 08:22:09 GMT

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