XHTML Role Module LC Comments (PR#8025)

Reference:
http://www.w3.org/TR/2007/WD-xhtml-role-20071004/

It might be a few hours late, but I wanted to remark that the DTD
implementation is a little cumbersome. Currently it would look like this:


<!-- bring in the Role Attribute Module -->
<!ENTITY % xhtml-role.mod
    PUBLIC "-//W3C//ENTITIES XHTML Role Attribute 1.0//EN"
        "http://www.w3.org/MarkUp/DTD/xhtml-role-1.mod">
%xhtml-role.mod;
<!ENTITY % xhtml-role-qname.mod
    PUBLIC "-//W3C//ENTITIES XHTML Role Attribute Qnames 1.0//EN"
       "http://www.w3.org/MarkUp/DTD/xhtml-role-qname-1.mod">
%xhtml-role-qname.mod;

<!-- add the 'role' attribute to common elements -->
<!ENTITY %Common.extra.attrib "%xhtml-role.attrs.qname;">


I understand that the universal approach of the role module does allow it
to be included in other languages and thus the extension of
Common.extra.attrib cannot be achieved within the module because that
would be too XHTML specific. On the other hand that's exactly what other
modules like the target module do.

Alas it is quite inconvenient to manually implement both xhtml-role-1.mod
and xhtml-role-qname-1.mod. Since xhtml-role-1.mod "does nothing," I would
like to suggest to include the call of xhtml-role-qname-1.mod within
xhtml-role-1.mod:


<!-- bring in the Role Attribute Module -->
<!ENTITY % xhtml-role.mod
    PUBLIC "-//W3C//ENTITIES XHTML Role Attribute 1.0//EN"
        "http://www.w3.org/MarkUp/DTD/xhtml-role-1.mod">
%xhtml-role.mod;

<!-- add the 'role' attribute to common elements -->
<!ENTITY %Common.extra.attrib "%xhtml-role.attrs.qname;">


With xhtml-role-1.mod looking like this:

<!--
...................................................................... -->
<!-- XHTML Role Module
.................................................... -->
<!-- file: xhtml-role-1.mod
     This is XHTML Role - the Role Attribute Module for XHTML.
     Copyright 2006 W3C (MIT, ERCIM, Keio), All Rights Reserved.
     This DTD module is identified by the PUBLIC and SYSTEM identifiers:
       PUBLIC "-//W3C//ENTITIES XHTML Role Attribute 1.0//EN"
       SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-role-1.mod"
     Revisions:
     (none)
     .......................................................................
-->

<!-- bring in the Qualified Name module (required) -->
<!ENTITY % xhtml-role-qname.mod
	PUBLIC "-//W3C//ENTITIES XHTML Role Attribute Qnames 1.0//EN"
       "http://www.w3.org/MarkUp/DTD/xhtml-role-qname-1.mod">
%xhtml-role-qname.mod;

<!-- end of xhtml-role-1.mod -->


Also I would like to point out that there might be a conflict with WAI
roles and states, though this could be based on my limited knowledge of
the DTD syntax. If the role attribute is bolted onto XHTML elements with

  <!ENTITY %Common.extra.attrib "%xhtml-role.attrs.qname;">

but Common.extra.attrib also needs to be appended by

  <!ENTITY %Common.extra.attrib "%aaa.attrs.qname;">

the latter overwrites the first. Or could this be solved by using ATTLIST?


That said I do very much appreciate the role attribute as it is closing a
semantic gap and adds accessibility. Also with a single attribute a lot of
bloated extra elements in HTML5 can be avoided.

Best regards,
  Martin Kliehm

Received on Saturday, 27 October 2007 15:00:01 UTC