W3C home > Mailing lists > Public > www-validator@w3.org > August 2002

Re: validator does NOT validate XHTML 1.0

From: Terje Bless <link@pobox.com>
Date: Mon, 19 Aug 2002 03:28:47 +0200
To: W3C Validator <www-validator@w3.org>
cc: "Devon Y." <vehementpetal@hotmail.com>
Message-ID: <r01050300-1015-025AD712B31311D6B8DC00039300CF5C@[]>

Devon Y. <vehementpetal@hotmail.com> wrote:

>This morning I discovered that XHTML docs without the XHTML namespace, 
>validate on the W3's http://validator.w3.org/. This is 100% wrong
>according to the XHTML 1.0 Recommendation, which says "The root element
>of the document must contain an xmlns declaration for the XHTML
>namespace [XMLNS]." (http://www.w3.org/TR/xhtml1/#docconf). I can only
>imagine how much this error is (and will be) affecting websites.

I'm afraid the XHTML Reccomendation does not adequately reflect the
accompanying DTD. The definition in the DTD is:

<!ATTLIST html
  id          ID             #IMPLIED
  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

That is, the "xmlns" attribute on the "html" element is "FIXED". This means
it can be omitted and will then be implicitly understood to have the value
from the DTD, or it can be included and will generate an error if it is
different from the value in the DTD. Just try to Validate a document with a
bogus value for the "xmlns" attribute.

It's quite possible that the HTML WG intended to express an "Additional
Constraint", above what is possible to express in a DTD, but that is a
different matter and not one we can do a whole lot about I'm afraid.

Terje, you are a sick and twisted individual, and I
think I speak for all of us when I say, "Thank you!"

               -- John Gruber <gruber@barebones.com>
Received on Thursday, 22 August 2002 18:22:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:34 UTC