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

Re: xmlns

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Fri, 25 Jan 2002 15:32:17 +0900 (JST)
Message-Id: <20020125.153217.71086462.mimasa@w3.org>
To: frank.ellermann@t-online.de
Cc: www-validator@w3.org
Frank Ellermann <frank.ellermann@t-online.de> wrote:

> Hi, in http://www.w3.org/TR/REC-xml-names/ I found a nice way 
> to change the relevant XML namespace on the fly in a document.
> I tried this with attribute target= of <base> resp. align= of
> <img>, i.e. I used a validated XHTML 1.0 transitional document,
> modified it to be strict, and added xmlns="...transitional" to
> <base> and <img> (before target= resp. align=).

Note that XHTML 1.0 Strict and Transitional share the same
namespace "http://www.w3.org/1999/xhtml".  Declaring a namespace
doesn't help for your purpose.

> The validator recognized the additional namespace (shown in the
> header of the validator output), but marked these attributes as
> erroneous.  In my second attempt I moved xmlns="..." up to the
> <head> resp. <address>, but the validator still didn't like the
> xmlns=, base=, and align= attributes.

DTD-based validation and namespaces are not really compatible.
If you really want to perform DTD-based validation, whatever
namespaces you want to add, you have to declare necessary
elements and attributes appropriately in the internal or
external DTD subset, including the xmlns attribute.

If your REALLY have to do so, you might want to look at
"Modularization of XHTML", at:


Otherwise, you'd better consider schema-based validation or
live with "well-formed but not valid" for now.

Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Friday, 25 January 2002 02:40:05 UTC

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