Odd warning for esoteric DTD

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 UTC