W3C home > Mailing lists > Public > www-validator@w3.org > March 2008

Re: HTML-Validator - Non-valid Code passes the check

From: Frank Ellermann <nobody@xyzzy.claranet.de>
Date: Fri, 14 Mar 2008 17:16:53 +0100
To: www-validator@w3.org
Message-ID: <fre88j$8cj$1@ger.gmane.org>

Jens Schwartz wrote:

> ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length
> IMHO, following this definition the height and width attributes don't
> contain correct values because of the "px" notation.
> Am I right with this, or have I understood something wrong?

You are right, but when the W3C validator uses the DTD it means that
it checks CDATA, it would consider width="foobar" as valid.  It does
not read or rather not understand the comment in the DTD.

> another validator[4] recognizes the code above as non-valid.
> [4] http://validator.de.selfhtml.org/

Oops, I didn't know that selfhtml offers a validator.  But it is
obviously no pure DTD validator.  DTDs can't express details for
attribute values, e.g., URI is also CDATA, href="25%" is valid
as far as a DTD validator can judge it.

Test the selfhtml validator with some broken URIs, if it doesn't
report this it's a lousy wannabe-better-than-DTD validator... :-)  

Received on Friday, 14 March 2008 16:15:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:06 UTC