W3C home > Mailing lists > Public > www-html-editor@w3.org > October to December 2007

XHTML Role Attribute Module: new values and namespaces

From: Elliotte Harold <elharo@metalab.unc.edu>
Date: Sat, 06 Oct 2007 17:52:04 -0400
Message-ID: <47080384.3080200@metalab.unc.edu>
To: www-html-editor@w3.org

There's a a deep and serious problem with section 4.1, Extending the 
collection of roles. This section states:

It is possible to define additional role values. Such values MUST be 
defined in their own namespace.

We've been down this road before in other specs such as XPointer, W3C 
Schemas and XPath. There is nothing in the Namespaces spec that in any 
way indicates that a qualified name may apear in an attribute value. 
There is no standard way to indicate the namespace mappings in scope for 
an attribute *value* as distinct from an attribute *name*.

1. If it it is your intention that such values inherit the namespace 
bindings of their parent element, this must be explicitly stated. There 
is nothing in the namespaces spec to indicate that applications can 
apply namespace bindings to attribute values.

2. This approach only works if these values only appear in an actual 
XHTML document. If it is ever the intention to use such role values 
outside of XHTML (or some XML-host language) you're hosed. XPath and 
XPointer both foundered on these shoals.

3. Even if the role attribute value only has meaning within an XML host 
language, embedding QNames in attribute values is still a pragmatically 
bad idea. We have almost ten years of experience with multiple 
specifications to prove that QNames in attribute values confuse users 
and complexify implementations.

Please find another way to achieve your worthy goals without depending 
on namespace prefix resolution in attribute values. I suggest simply 
abandoning the CURIE mechanism and making the role values full, absolute 
URIs. Unlike XPath, there really isn't a compelling reason for an 
abbreviated syntax here. There'll usually only be one of these on any 
given element. It's more like an href attribute than anything else. 
People have no trouble using full URIs in those when appropriate.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/
Received on Saturday, 6 October 2007 21:52:20 GMT

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