Re: OMITTAG NO error when validating

# Ignore this line: ikke sensitiv (not classified)

Jonas Isberg <d97ji@efd.lth.se> wrote:

>When trying to validate this page:
>http://validator.w3.org/check?uri=http://www.efd.lth.se/~d97ji/test.html
>I'm getting to following error:
>-------
>Uh oh! I got the following unknown
>error: 
>/usr/local/bin/nsgmls:http://www.efd.lth.se/%7Ed97ji/ny.dtd:148:24:E:
> omitted tag minimization parameter can be omitted only if
>    "OMITTAG NO" is specified on the SGML declaration Please 
>make sure you specified the DOCTYPE properly! 

You'll note that the validator (actually, it's nsgmls that's complaining,
but... ;D) is complaining about the DTD and not the document itself. The
reason being that the document is served as HTML, but doesn't contain any of
the triggers that makes the validator go into what I'd term "Stupid,
W3C-imposed, (X)HTML Bugwards Compatibility Mode".

XHTML (an application of XML) tries to masquerade as HTML (an application of
SGML) to exploit browsers lack of strict parsing code and make a "smooth"
transition from HTML to XHTML. This is pure idiocy IMO, but them's the
breaks. *shrug*

Anyway, the validator has a special mode it goes into when it detects XHTML,
but, and here's the kicker, *only* for XHTML. If you try to explot the same
trick with some other XML document, it'll fail miserably. SGML, /might/ (in
fact, should) work. Try serving the document up as text/xml or
application/xml and it'll likely validate (but most browsers will probably
choke on it); or you could use a SGML DTD in a HTML document.

I'll try and find some workaround and submit a patch.

Received on Thursday, 17 August 2000 05:04:38 UTC