W3C home > Mailing lists > Public > public-xhtml2@w3.org > January 2008

Re: Last call comments on XHTML Role Attribute Module (PR#8024)

From: Shane McCarron <xhtml2-issues@mn.aptest.com>
Date: Mon, 28 Jan 2008 11:03:06 -0600
Message-Id: <200801281703.m0SH36n5013823@htmlwg.mn.aptest.com>
To: simonp@opera.com
CC: public-xhtml2@w3.org

Thanks very much for your comments, and apologies on the delay in replying.  
The dependency of this spec on CURIEs and the evolution of the CURIE draft
necessarily delayed our dealing with comments on the role specification.

Replies are embedded below:

> 
> I have some comments on:
> 
>     http://www.w3.org/TR/2007/WD-xhtml-role-20071004/
> 
> 
> Document conformance says:
> 
>     The document MUST conform to the constraints expressed in Appendix A -
>     DTD Implementation, combined with the constraints expressed in its host
>     language implementation.
> 
> It is unclear to me what this means. *No* document can conform to the  
> constraints expressed in that DTD, because e.g. it doesn't declare any  
> elements, and a document has to have at least one element to be  
> well-formed. So it has to be when that DTD is *combined* with the host  
> language's DTD, but this is not what the draft says.
> 
> In any case, I don't see why there is a DTD in the spec in the first  
> place. Why can't all conformance requirements be expressed in English  
> prose instead? What if the host language doesn't have a DTD?

XHTML Modules are required to include implementation(s) and a prose 
specification.  We have corrected the boilerplate text that you correctly 
note is inappropriate in this specification.

> 
> 
> Then it continues:
> 
>     If the host language is not in the XHTML namespace, the document MUST
>     contain an xmlns declaration for the XHTML Role Attribute Module
>     namespace [XMLNAMES].
> 
> Shouldn't that be s/xmlns/xmlns:*/, since attributes cannot be in a  
> namespace and not have a prefix (declaratively, anyway).
> 
> Furthermore, why require the namespace *declaration*? If I want to add a  
> namespaced role attribute with script, I shouldn't have to also add a  
> namespace declaration with script. The namespace declaration is completely  
> useless in that case.

There are two issues here.  First, how do we phase the requirement for 
declaring a namespace prefix.  We agree that "xmlns declaration" is a 
little colloquial.  However, we do not think that xmlns:* is appropriate 
either.  We have changed the language to indicate that you need to have a 
namespace declaration for the XHTML Namespace as required in the namespace 
spec.

As to requiring a namespace declaration at all... First, XHTML doesn't 
really envision the idea of adding attributes to a document after it is 
loaded (after DOMready or the LOAD event fires). 

Second, referring to an element or attribute using a namespace prefix that 
is NOT defined is invalid - so we cannot condone that.  You need a namespace 
declaration if you are going to reference the role attribute in its namespace.

Note however that if the host language includes the role attribute in its 
own namespace, no such declaration NOR prefixing is required.


> It should say that the attribute must be in the XHTML namespace, and not  
> say anything about namespace declarations.
> 
> 
> Host Language Conformance says:
> 
>     Finally, the attribute MUST be referenced using its namespace-qualified
>     form (e.g., <myml:myelement xhtml:role='definition'>a
>     term</myml:myelement>).
> 
> This seems to be different from the previous version of the draft  where  
> it seems to imply that it is OK for host languages to use the attribute in  
> no namespace:
> 
>     If the host language does not incorporate the XHTML Role Attribute
>     Module attribute into its own namespace, [...]
>       -- http://www.w3.org/TR/2006/WD-xhtml-role-20061113/
> 
> Why was this changed? Why can't other host languages use role="" in no  
> namespace?

We have changed this back.

> 
> 
> User Agent Conformance says:
> 
>     A conforming user agent MUST support all of the features required in
>     this specification.
> 
> As far as I can tell, there are no features required in this  
> specification, and therefore UAs can do nothing or anything and still be  
> conforming. Or to put it in another way, it seems to be impossible to  
> write test cases against this specification, and therefore it's impossible  
> to prove non-conformance.

There are no required features, you are correct.  We have removed the section.

> 
> Compact URIs says:
> 
>     A CURIE is comprised of two components, a prefix and a reference. The
>     prefix is separated from the reference by a colon (:). It is possible to
>     omit the prefix, and make use of the default prefix. It is also possible
>     to omit both the prefix and the colon, leaving just a reference.
> 
> This doesn't seem to match the production:
> 
>     curie       :=   [ prefix [ ':' ] ] reference
> 
> Shouldn't the production be:
> 
>     curie       :=   [ [ prefix ] ':' ] reference
> 
> ...to match the prose?

Yes, and thanks for noticing.  However, we have removed the entire section from
the document in favor of referencing the CURIE spec.  We have taken the liberty
of adding the remainder of your comments on CURIEs to the collection of comments
on that document, and will respond to them in that context.


> 
> The The XHTML Role Attribute section says:
> 
>     The role attribute takes as its value one or more whitespace separated
>     CURIEs.
> 
> What does "role attribute" mean? An attribute with the local name "role"  
> in no namespace? That is part of an element in the  
> http://www.w3.org/1999/xhtml namespace? An attribute with the local name  
> "role" in the http://www.w3.org/1999/xhtml namespace? What are UAs to do  
> with namespaced role that is specified on XHTML elements? What are they to  
> do with no-namespace role that is specified on non-XHTML elements?

The XHTML Modularization spec requires that you NOT use a prefixed version 
of an attribute in the XHTML namespace on an element that is in the XHTML 
namespace.

The core of your question seems to be "what does 'role attribute' mean"?  
In the context of this specification, the term "role attribute" is meant to 
be interpreted as any use of role that claims to conform to this 
specification, in whatever namespace it is being used.

> 
> What is "whitespace"? How are UAs to extract the CURIEs from the attribute  
> value (e.g. when other specs require UAs to do something with a specific  
> CURIE)?

Whitespace is a common term used in these specifications 
(see for example http://www.w3.org/TR/html401/struct/global.html#adef-class).  

> 
> 
> Then it continues:
> 
>     Any non-qualified value MUST be interpreted in the XHTML namespace, and
>     MUST be taken from the list defined in this section.
> 
> What is the XHTML namespace? (AFAICT, it could be one of  
> http://www.w3.org/1999/xhtml or http://www.w3.org/1999/xhtml/vocab# .)

That is correct.  The use of the term "namespace" there was unfortunate.

We have cleared up the text.

> 
> Are these UA requirements? If so, what does it mean to interpret a value  
> in the XHTML namespace? What are UAs to do with non-qualified values not  
> found in the list? What about CURIEs that have a prefix that is bound to  
> the "XHTML namespace"?

The CURIE spec clarifies this.  Basically, CURIEs with no prefix are 
permitted to be interpreted with a default prefix mapping.  What an 
application does with that interpretation is application specific.

> 
> What are UAs to do when an element has more than one value found in the  
> list?

As you have correctly pointed out, there are no UA behavior requirements 
in this spec.  So there is no guidance as to how single NOR multiple values 
are to be interpted.  This is the same as, for example, the class attribute 
in HTML 4 and XHTML.
Received on Monday, 28 January 2008 17:04:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 February 2010 18:12:47 GMT