Last call comments on XHTML Role Attribute Module

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?


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.

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?


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.


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?

Why is one if prefix and the colon allowed to be omitted? Shouldn't both  
have to be omitted, i.e.:

    curie       :=   [ prefix ':' ] reference

...?


Then it continues:

    A CURIE is a representation of a full IRI. This IRI is obtained by
    concatenating the IRI associated with the prefix with the reference. The
    result MUST be a syntactically valid IRI [IRI].

What does it mean when it isn't? What does it mean when the CURIE uses a  
prefix that is not declared? How is CURIE equivalence performed? By  
normalizing the two resulting IRIs? Which normalization rules are to be  
used, in that case?

If normalization rules are to be performed, then it is utterly impossible  
to write style sheets or scripts that target a specific CURIE. It is  
already impossible to write style sheets for QNames in content. Writing  
scripts for QNames in content is possible but it's a great hassle.

It is a great hassle because the DOM doesn't have any knowledge of QNames  
in content, and whether a namespace declaration is in scope can change  
over time.

CURIEs have the same problem, but much worse since an IRI can be split  
anywhere to form a CURIE, and it could use uppercase letters in the domain  
name, specify a default port, use percentage-escaping, etc., etc.

Authors will likely use the same prefixes anyway (e.g., the root element  
start tag in RSS 1.0 is always <rdf:RDF>, even though the prefix could be  
anything... it's just cargo-cult copy-paste boilerplate), and they  
effectively *have to* use the same prefixes if they want to have sane  
style sheets or scripts that target roles. By extension, it is likely that  
some implementors will treat the role as an opaque string with a fixed  
prefix and ignore the namespace declaration and the IRI (cf. some feed  
readers only recognize RSS 1.0 if the prefix is "rdf:").

Why are CURIEs used at all, as opposed to opaque strings with fixed  
prefixes?


Then it continues:

    The CURIE prefix '_' is reserved.

Why is it reserved if CURIEs aren't opaque strings?


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?

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)?


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# .)

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"?

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


Cheers,
-- 
Simon Pieters
Opera Software

Received on Friday, 26 October 2007 16:03:13 UTC