Re: Getting beyond the ping pong match (was RE: Cleaning House)

On May 4, 2007, at 1:47 PM, Jonas Sicking wrote:

> Maciej Stachowiak wrote:
>> On May 4, 2007, at 9:30 AM, John Foliot - wrote:
>>> One of the most exciting (to me) developments in the XHTML camp  
>>> is the
>>> emergence of the ROLE attribute - as it now provides a means of  
>>> "explaining"
>>> what something is or does... To quote the W3C spec:
>>> "The role attribute takes as its value one or more white-space  
>>> separated
>>> QNames. The attribute describes the role(s) the current element  
>>> plays in the
>>> context of the document. <snip> It could also be used as a  
>>> mechanism for
>>> annotating portions of a document in a domain specific way (e.g.,  
>>> a legal
>>> term taxonomy)."
>> The purpose of the "role" attribute is addressed in HTML5 by the  
>> "class" attribute, along with predefined classes.
> Personally I think this was a very poor decision. The problem is  
> that you have user names and standard names mixed in the same  
> namespace. So there's a big risk that the user accidentally ends up  
> marking semantic meaning to their elements simply by wanting to  
> style them.

The "role" attribute also mixes user names and standard names.  
Although it says that user names must be in an XML namespace to be  
conforming. It may be that "class" has problems, but I don't think  
inventing a second attribute to do basically the same thing with  
slightly different syntax is a very good solution.

> The only thing that can be done to help this problem (other than by  
> using the role attribute) is to use really obscure names for  
> predefined classes, which doesn't seem like a great idea either.

One simple way to avoid the standard and authors clashing would be to  
reverse the assumption of "role" and require predefined class names  
to have a special prefix, "html:example", "html:copyright" and so  
forth. Or we could use a shorter prefix like w3 or just plain : for  
the standard names, especially if we think predefined classes might  
be used in non-HTML languages that have a class attribute.


Received on Friday, 4 May 2007 21:32:55 UTC