Re: The validator doesn't allow multiple namespace declarations...

"Lars Wilhelmsen" <lars@sral.org> wrote:

>  I have a problem with the validator;
>  it doesn't validate XHTML (Transitional) documents
>  with multiple namespace declarations;
> 
> This works:
>  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> 
> This doesn't: :(
>  <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:lw="http://www.sral.org/foo/lw/"
>     xml:lang="en" lang="en">

"3.1.2 Using XHTML with other namespaces" [1] of XHTML 1.0 spec says:

   The XHTML namespace may be used with other XML namespaces as per
   [XMLNAMES], although such documents are not strictly conforming XHTML
   1.0 documents as defined above.

Your document could be well-formed but cannot be a valid XHTML 1.0
Transitional document.  Unless you want to develop your own document
type that additionally defines elements and attributes from your
namespace as per "Modularization of XHTML" [2], you'd better live
with "well-formed but not valid" situation for now, or consider
schema-based validation instead of DTD-based validation.

[1] http://www.w3.org/TR/xhtml1/#well-formed
[2] http://www.w3.org/TR/xhtml-modularization/

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Friday, 1 February 2002 00:26:13 UTC