W3C home > Mailing lists > Public > www-html-editor@w3.org > July to September 2006

XHTML Modularization 1.1: 9 errors with the 'id' attribute (Specification + DTD + XML Schemas)

From: Alexandre Alapetite <alexandre@alapetite.net>
Date: Mon, 31 Jul 2006 01:22:19 +0200
To: <www-html-editor@w3.org>
Message-ID: <000101c6b42f$014b1c00$f9043f50@athlon1100>

Dear HTML editors,
Please read bellow the 9 error reports regarding the 'id' attribute in the working draft for XHTML Modularization. Errors are in
the specification and/or in the DTD and/or in XML Schemas.

1) The XHTML Modularization 1.1 specification does not list the 'id' attribute for the 'script' element as I think it should
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/abstract_modules.html#s_scriptmodule].

Indeed, chapter I section 5 says "Added the id attribute to every element"
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/changes.html#a_changes].
The DTD does allow this 'id' attribute for 'script'. See
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/dtd_module_defs.html#a_module_Scripting] and line 40 of
xhtml-script-1.mod
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/DTD/xhtml-script-1.mod].

Lines 37-45 of xhtml-script-1.mod (no problem):

 <!ATTLIST %script.qname;
       %XHTML.xmlns.attrib;
       %id.attrib;
       charset      %Charset.datatype;       #IMPLIED
       type         %ContentType.datatype;   #REQUIRED
       src          %URI.datatype;           #IMPLIED
       defer        ( defer )                #IMPLIED
 >


Since there is still no XML Schema driver (e.g. XHTML Basic 1.1, XHTML 1.1) to test XHTML Modularization, it is pretty hard to
review the XML Schemas for XHTML Modularization.

2) Anyway, the XML Schema does contain the same mistake as the specification: the 'id' element has not been added for the
'script' element. See
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/schema_module_defs.html#a_smodule_Scripting] and lines 39 to 50 of
xhtml-script-1.xsd
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/SCHEMA/xhtml-script-1.xsd].

Lines 39-50 of xhtml-script-1.xsd (see line added for 'id'):

    <xs:attributeGroup name="xhtml.script.attlist">
        <xs:attribute name="charset" type="xh11d:Charset"/>
        <xs:attribute name="type" type="xh11d:ContentType" use="required"/>
        <xs:attribute name="src" type="xh11d:URI"/>
        <xs:attribute name="defer">
            <xs:simpleType>
                <xs:restriction base="xs:NMTOKEN">
                    <xs:enumeration value="defer"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attributeGroup ref="xhtml.id"/><!-- Line added for 'id' -->
    </xs:attributeGroup>


3) While both the DTD and the specification are OK for the 'id' element for the 'style' element, the XML Schema is not...
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/abstract_modules.html#s_stylemodule]
See 'id' missing in
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/schema_module_defs.html#a_smodule_Style_Sheet] and lines 39 to 44 of
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/SCHEMA/xhtml-style-1.xsd]

Lines 39-44 of xhtml-style-1.xsd (see line added for 'id'):

    <xs:attributeGroup name="xhtml.style.attlist">
        <xs:attributeGroup ref="xhtml.title"/>
        <xs:attributeGroup ref="xhtml.I18n.attrib"/>
        <xs:attributeGroup ref="xhtml.id"/><!-- Line added for 'id' -->
        <xs:attribute name="type" type="xh11d:ContentType" use="required"/>
        <xs:attribute name="media" type="xh11d:MediaDesc"/>
    </xs:attributeGroup


4) While the specification is fine, there are 3 additional similar errors for the 'id' element in XML Schemas for the 'html',
'head' and 'title' elements.
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/abstract_modules.html#s_structuremodule]. See 'id' missing in
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/schema_module_defs.html#a_smodule_Structure] and
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/SCHEMA/xhtml-struct-1.xsd].

Example for 'title', lines 24-28 of xhtml-struct-1.xsd (see line added for 'id'):

    <xs:attributeGroup
        name="xhtml.title.attlist">
        <xs:attributeGroup
            ref="xhtml.I18n.attrib"/>
        <xs:attributeGroup
            ref="xhtml.id"/><!-- Line added for 'id' -->
    </xs:attributeGroup>


5) Those 3 errors about the 'id' element for the 'html', 'head' and 'title' elements are also in the DTD. See 'id' missing in
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/dtd_module_defs.html#a_module_Structure] and
[http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/DTD/xhtml-struct-1.mod]

Example for 'head', lines 73-77 of xhtml-struct-1.mod (no 'id', should contain %id.attrib;):

 <!ATTLIST %head.qname;
       %XHTML.xmlns.attrib;
       %I18n.attrib;
       %profile.attrib;
 >

Should be like:

 <!ATTLIST %head.qname;
       %XHTML.xmlns.attrib;
       %I18n.attrib;
       %profile.attrib;
       %id.attrib;
 >


Once again, the only proper way to test those DTDs and XML Schemas correctly is to provide stable drivers, to compile and to run
them on a pool of test documents.

I have written to the Quality Assurance Dev group to ask them if they could maybe ensure this task to be done
[http://lists.w3.org/Archives/Public/public-qa-dev/2006Jul/0021.html].

Cordially,
Alexandre
http://alexandre.alapetite.net
Received on Sunday, 30 July 2006 23:22:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:55 GMT