Re: Question from the RDF-in-XHTML task force on the HTML Role Attribute

From: Ben Adida <ben@mit.edu>
Subject: Question from the RDF-in-XHTML task force on the HTML Role Attribute
Date: Mon, 17 Oct 2005 08:09:46 -0400

> Hi SWIG members,
> 
> The RDF-in-XHTML Task Force is facing an issue on which we could use  
> the opinion of more RDF experts.
> 
> Specifically, we're considering assigning a RDF property to the ROLE  
> attribute in HTML, for example:
> 
> ==========
> <div role="dcterms:abstract">
> .... the summary of the document....
> </div>
> ==========
> 
> would yield a triple:
> 
> ==========
> _:div0 xhtml2:role dcterms:abstract .
> ==========
> 
> The question is, what should xhtml2:role be? Should it be simply  
> rdf:type? Should it be xhtml2:role with no relationship to rdf:type?  
> How should we go about making this decision? Are there guidelines for  
> subclassing rdf:type?
> 
> Thanks for your help,
> 
> -Ben Adida
> Chair, RDF-in-XHTML Task Force

Interesting question.

I did a Google search for "html role attribute" and the highest-ranked document
was http://www.sagehill.net/docbookxsl/GraphicSelection.html.  This document
has the following use of role:

<mediaobject  id="MousePicture">  1  
  <imageobject  role="html">  2
    <imagedata  format="PNG"  fileref="mouse.png"/>  3
  </imageobject>
  <imageobject  role="fo">
    <imagedata  format="PDF"  fileref="mouse.pdf"/>
  </imageobject>
</mediaobject>

Making xhtml2:role be rdf:type, or a subclass of rdf:type, would have the
effect of making html and fo both be classes.  Do you really want to have a
class for html and a class for fo?  


I then found the normative section for the role attribute, in XHTML2!
I enclose the entire section:

> 25.2. Role Collection
> 
> role = QName
>     This attribute describes the relationship the current element (and its
>     contents) has to the value of the about attribute or its default value. It
>     is used by applications and assistive technologies to determine the purpose
>     of UI widgets. In the case of a web page it may be declarative as a
>     function of particular elements or it may be an attribute which is
>     configurable by the page author. Additionally, role information may be used
>     to define each action which may be performed on an element. This allows a
>     user to make informed decisions on which actions may be taken on an element
>     and activate the selected action in a device independent way.
> 
>     Example
> 
> <nl role="wai:sitemap">
>     <li href="downloads">Downloads</li>
>     <li href="docs">Documentation</li>
>     <li href="news">News</li>
> </nl>
> 
>     Additional roles may be defined through the use of this attribute. Roles
>     shall be defined as qnames referencing RDF definitions for them. The RDF
>     definition can be used define what the object is, how you would interact
>     with it, how it relates to other elements, and what other objects it is
>     like or sub classes. This defines the basis for taxonomies defined amongst
>     common sets of document elements. For example, dynamic web content often
>     recreates GUI widgets using combinations of web page elements, style
>     sheets, and script thus applying different meaning to the elements. This
>     has benefits for the intraction between web content, user agents, and
>     assistive technologies by providing for a discoverable interaction
>     model. For example, this model can be used to allow a screen reader to
>     provide a speech interface based on real semantics. The user agent could
>     use the information to create device navigation mappings.
> 
>     Authors may use the following relationship names, listed here with their
>     conventional interpretations. User agents, search engines, etc. may
>     interpret these relationships in a variety of ways. For example, user
>     agents may provide access to linked documents through a navigation bar.
> 
>     Users may extend this collection of relationships. However, extensions must
>     be defined in their own namespace, and the relationship names must be
>     referenced in documents as qualified names (e.g., dc:creator for the Dublin
>     Core "creator" relationship).
> 
>     The following attributes will be standard. They are designed to define
>     pertinent parts of a document for the purpose of accessibility. User agents
>     may incorporate device equivalents, such as key mappings in the case of a
>     desktop user agent, to navigate to these sections of a document.
> 
>     main
>         This defines the main content of a document.
>     secondary
>         This is any unique section of the document. In the case of a portal,
>         this may include but not be limited to: show times; current weather; or
>         stocks to watch.
>     navigation
>         This is the navigation bar on a web document. This is typically a list
>         of links to other pages on the site or other areas of the same
>         document.
>     banner
>         A banner is usually defined as the advertisement at the top of a web
>         page. The banner content typically contains the site or company logo
>         and other key advertisements for the site.
>     contentinfo
>         This is information about the content on the page. For example,
>         footnotes, copyrights, links to privacy statements, etc. would belong
>         here.
>     note
>         The content is parenthetic or ancillary to the main content of the
>         resource.
>     seealso
>         Indicates that the element contains content that is related to the main
>         content of the page.
>     search
>         This is the search section of a web document. This is typically a form
>         used to submit search requests about the site or is a more general
>         Internet wide search service.

I had a very hard time making even partial sense out of this.  The about
attribute is used in meta elements, and may have no relationship to the current
element.  I don't believe that there is any notion of an "RDF definition" in
the RDF documents.  I submit that before determining whether role maps to
rdf:type or not, that the RDF-in-XHTML spend some time trying to get a
comprehensible normative section for the use of role in XHTML2.


In any case, it appears that role provides a three-way relationship
where its attribute value is the property.   This makes it seem as if the
triple in the first use of role above should be 

	? html ? 

and not

	? xhtml2:role html

(In this I agree with Pete Johnston.)


Peter F. Patel-Schneider

Received on Monday, 17 October 2005 13:33:20 UTC