- From: Andrea Vedaldi <joseph@lukyland.net>
- Date: Wed, 14 May 2003 02:06:20 +0200
- To: www-html-editor@w3.org
There could be a quite serious bug in the xhtml-qname-1.mod file
(http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-qname-1.mod).
Indeed, not only is the comment at line 107 wrong (as
already noted in this mailing list), but also the entity
XHTML.xmlns.attrib can be broken:
!-- Declare a parameter entity %NS.decl.attrib; containing all
XML namespace declaration attributes used by XHTML, including
a default xmlns attribute when prefixing is inactive.
-->
<![%XHTML.prefixed;[
<!ENTITY % XHTML.xmlns.attrib
"%NS.decl.attrib;
%XLINK.xmlns.attrib;"
>
]]>
<!ENTITY % XHTML.xmlns.attrib
"xmlns %URI.datatype; #FIXED '%XHTML.xmlns;'
%XLINK.xmlns.attrib;"
>
The comment refers to another piece of code. Moreover, when
XHTML.prefixed is
set to IGNORE, the XHTML.xmlns.attrib definition doesn't include, as it
should, the NS.decl.attrib entity.
For example, a XML file like
<!DOCTYPE html
PUBLIC "-//AuthorName/DTD XHTML MyType 1.0//EN"
"xhtml-mytype.dtd"
[
<!ENTITY % MyType.prefixed "INCLUDE">
<!ENTITY % MyType.prefix "mt">
]
>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:mt="http://www.somewhere.org/xmlns/mytype" >
</html>
can't be correctly validated because XHTML.prefixed=IGNORE _but_
MyType.prefixed=INCLUDE.
The latest version of Xerces complains that the xmlns:mt attribute is
not defined for the <html>
element.
Indeed the XHTML.xmlns.attrib doesn't nclude the necessary declaration
of the
xmlns:mt attribute. The most easy solution to this problem is to change
the preceding piece
of code with something like
<![%XHTML.prefixed;[
<!ENTITY % XHTML.xmlns.attrib
"%NS.decl.attrib;
%XLINK.xmlns.attrib;"
>
]]>
<!ENTITY % XHTML.xmlns.attrib
"xmlns %URI.datatype; #FIXED '%XHTML.xmlns;'
%NS.decl.attrib;
%XLINK.xmlns.attrib;"
>
Is this correct or I'm misunderstanding something?
Received on Wednesday, 14 May 2003 04:52:30 UTC