CLASS vs. ROLE

Hi all,

I had a thought today about CLASS vs. ROLE. Consider the example from  
the XHTML2 working draft [1]:

=======
<nl role="wai:sitemap">
     <li href="downloads">Downloads</li>
     <li href="docs">Documentation</li>
     <li href="news">News</li>
</nl>
=======

Now, is this saying that the NL *is* a sitemap in general, or is it  
saying that it's the current page's sitemap? I think it might be the  
latter, in which case, what we're really saying is:

<> wai:sitemap _:bnode0

and *not*

_:bnode0 rdfs:class wai:sitemap

In other words, my feeling is that CLASS designates an object with  
the current element as subject, while ROLE designates a predicate  
with the current element as object.

This seems to match the intended usage of ROLE, which is to say that  
something "plays the role of" for the current resource, and the  
historical use of CLASS, which specifies some semantic type for the  
current element without expressing a relationship to the current URI.

The example from the XHTML2 editor's draft then does pretty much what  
we expect, using RDFa Containers:

<> wai:sitemap _:bnode0.
_:bnode0 rdfs:class rdf:Alt.
_:bnode0 rdf:_1 <downloads>.
_:bnode0 rdf:_2 <docs>.
_:bnode0 rdf:_3 <news>.


Consider, in addition, and to follow up on Ivan's email a bit more,  
the following example (that I just made up):

=======
This page was authored by
<span role="dc:creator"><meta property="dc:name">Ben Adida</meta></span>
=======

which yields:

<> dc:creator _:bnode0.
_:bnode0 dc:name "Ben Adida".

which seems to be doing the right thing.

Thoughts?

-Ben

[1] http://www.w3.org/TR/xhtml2/mod-role.html

Received on Saturday, 13 May 2006 16:53:42 UTC