W3C home > Mailing lists > Public > www-validator@w3.org > September 2007

Odd warning for esoteric DTD

From: Philip TAYLOR <Philip-and-LeKhanh@Royal-Tunbridge-Wells.Org>
Date: Mon, 24 Sep 2007 16:42:50 +0100
Message-ID: <46F7DAFA.8090507@Royal-Tunbridge-Wells.Org>
To: www-validator@w3.org



When Netscape 4 was still ubiquitous, I created an augmented
version of the HTML 4.01 DTD which added four attributes that
Netscape required if the page were to be rendered correctly.

Although the need for this is long past, the DTD is still
used by a number of legacy pages, and I had occasion today
to attempt to validate one.  I was surprised when I was
told :

>    1.  Warning Unable to Determine Parse Mode!
> 
>       It was not possible to reliably choose a parsing mode for this document, because:
>           * the MIME Media Type (text/html) can be used for XML or SGML document types
>           * the Document Type (-//PT//DTD HTML 4.01 Augmented//EN) is not in the validator's catalog
>           * No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document.
> 
>       The validator is falling back to SGML mode.

Apart from being less than certain that the statement
"the MIME Media Type (text/html) can be used for XML"
is true, I am more concerned that the validator is
required to assume that a document sent as "text/html"
and not containing an XML declaration could still
nonetheless be XML, and therefore be forced to
"unreliably" choose a parsing mode and issue a warning
as a result ...

Philip Taylor
Received on Monday, 24 September 2007 15:42:42 GMT

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