- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Tue, 18 Oct 2005 00:37:48 +0100
- To: "'Sandro Hawke'" <sandro@w3.org>
- Cc: <semantic-web@w3.org>, "'public-rdf-in-xhtml task force'" <public-rdf-in-xhtml-tf@w3.org>
Sandro, The XHTML role attribute was originally devised to help with accessibility [1]. The idea was that you could put this attribute onto any element and tell some processor what this element was doing. This would go for script elements as much as for divs and spans. So in real-world usage, you might put role="hint" onto a div element, and a server processor would know that when converting this particular HTML document for a blind user--perhaps to VoiceXML--it should do something clever with this 'hint'. That's all far enough, and as I'm sure you'll agree, there is nothing controversial here in saying, for example: _:div0 xh:role wai:hint . (The WAI group is involved in defining a taxonomy that can be used as objects in such statements.) However, the tricky bit comes next; if some elements are playing the 'role' of a toolbar or menu on an XHTML page, is it legitimate to say that they really 'are' toolbars or menus. In other words, simply by having a role predicate, does our div also get an additional triple: _:div0 rdf:type wai:hint . The way that this extra triple is obtained is of course up for discussion too--it could be that xh:role is owl:sameAs rdf:type, or there is a hierarchy, or whatever--but that's not the question we need to resolve first; initially we're keen to hear from the RDF community whether it would be fair to say: if something plays the role of a toolbar, then it *is* a toolbar Now, just in case people think we should just flip a coin and move on to more interesting topics, I'll give you some of the arguments that make this problematic. The main argument *against* this is that we may now get other statements that are not helpful, by inference. Let's say that we have the following XForms mark-up: <xf:input ref="surname"> <xf:label>Surname:</xf:label> <xf:hint>Please enter your name</xf:hint> </xf:input> And let's say that we have agreed that the XForms specification provides us with a ready-made taxonomy of controls (by that I mean that their behaviour is defined abstractly and in a device-independent way). We can therefore add roles to our XHTML 1.1 mark-up, as follows: <label for="sn" role="xf:label">Surname:</label> <input id="sn" name="surname" role="xf:input" /> <div role="xf:hint">Please enter your name</div> If a server was dealing with an ordinary HTML browser, it could pass this code straight through, perhaps adding a reference to an external JavaScript file on the way to help implement the hint. But with this definition a server could also build the XForms mark-up we had, or an VoiceXML page. So the role attribute has successfully helped to indicate to a server what each element is doing. But although the div is playing the role of an XForms hint, it is not actually a hint, and to infer that it was could be problematic. For a start, in an HTML browser, the div needs event handlers defined to help the div hide and show itself in response to mouse movements. The server therefore needs to know that this div is an 'aspiring' hint, but it is not 'actually' a hint. The argument *for* having some form of equivalence between xh:role and rdf:type is that it makes for a very handy shorthand. There are many situations when writing RDF/A where you want to say that a div is playing the role of a foaf:Person or a calendar entry, or whatever. At the moment this is long-winded, and has to be done something like this: <div> <link rel="rdf:type" href="[foaf:Person]" /> Ben Adida </div> (This uses the new CURIE syntax--it's still under discussion, but for now think of it as a way of putting QName-like strings into places where URIs normally go.) As you can see, this could get a bit much in situations where the primary purpose of the mark-up is to carry a lot of metadata (as discovered by Steven Pemberton who originally proposed this). Anyway, sorry that was so long, but I'm keen to ensure that people know why we are discussing this, so that we can get a wide range of input on this. To summarise, the positions I can see on this issue so far, are: Either: * if something plays the role of something then it *is* an instance of that thing; Or: * just because something has a purpose of X, doesn't mean it that it is an example of X. I would add another line of discussion to this second position, which is that we could still obtain the 'Pemberton-shorthand' in some other way, such as adding another attribute, along the same lines as 'a' in N3. Of course there may be other views, but I hope we can get some comments on these. Regards, Mark [1] As far as I am aware the proposal originates from T. V. Raman--at least the first draft I ever saw was authored by him (but apologies if anyone else was also involved). I then worked with Raman on a subsequent draft that brought in RDF and QNames, the idea being to make use of XForms and other taxonomies, and also to help servers work out how to transpose, if necessary. Eventually the whole thing was brought into XHTML 2. Mark Birbeck CEO x-port.net Ltd. e: Mark.Birbeck@x-port.net t: +44 (0) 20 7689 9232 w: http://www.formsPlayer.com/ b: http://internet-apps.blogspot.com/ Download our XForms processor from http://www.formsPlayer.com/ > -----Original Message----- > From: public-rdf-in-xhtml-tf-request@w3.org > [mailto:public-rdf-in-xhtml-tf-request@w3.org] On Behalf Of > Sandro Hawke > Sent: 17 October 2005 20:58 > To: Ben Adida > Cc: semantic-web@w3.org; public-rdf-in-xhtml task force > Subject: Re: Question from the RDF-in-XHTML task force on the > HTML Role Attribute > > > > Ben Adida writes [to www-rdf-interest]: > > > Here's a better example that's more related to one of our issues in > > serializing FOAF documents: > > > > =========== > > <div role="foaf:Person"> > > Ben Adida > > </div> > > =========== > > > > which would yield a triple: > > > > =========== > > _:div0 xhtml2:role foaf:Person . > > =========== > > This is hard to understand without seeing the other triples > would be generated. What is the proposed relationship > between _:div0 and the literal "Ben Adida"? > > -- sandro > > > >
Received on Monday, 17 October 2005 23:44:23 UTC