Re: Using the CLASS attribute - Request for Feedback

Dan Connolly wrote:
> On Thu, 2006-10-12 at 15:10 -0400, Ben Adida wrote:
>> Hi all,
>>
>> This is a request for feedback on a pending decision of the task force.
>>
>> All active members of the task force are currently in agreement that the
>> CLASS attribute in HTML should be viewed as an rdf:type declaration on
>> that element. Of course, we want to do this such that no unexpected
>> triples are produced by unsuspecting HTML authors.
> [...]
>> Please send your feedback in response to this message. There's good
>> precedent for using the CLASS attribute in this way (eRDF,
>> microformats), and we feel that the result should never yield anything
>> unexpected to the HTML author.
> 
> Microformats uses the class attribute in several ways; the idiom
> you describe is only one of them. Here's an excerpt
> from a recent itinerary of mine:
> 
>  <span class='summary'><a class='url'
> 
> href='https://bwi.flightview.com/fvSabreVT/fvCPL.exe?vthost=1W&amp;acid=393&amp;qtype=htm&amp;AL=AA&amp;Find1=Track+Flight'>AMERICAN AIRLINES FLT:393</a></span>
> 
> and the GRDDL transformation turns that into...
> 
>       <c:Vevent>
>         <c:summary>AMERICAN AIRLINES FLT:393</c:summary>
>         <c:url
> r:resource="https://bwi.flightview.com/fvSabreVT/fvCPL.exe?vthost=1W&amp;acid=393&amp;qtype=htm&amp;AL=AA&amp;Find1=Track+Flight"/>
> 
> 
> If I understand this proposal, I would (also?) get triples a la...
> 
>  _:span1 rdf:type :summary.
>  _:anchor2 rdf:type :url .
> 
> which is very much unexpected.
> 

Maybe that's the very reason we have GRDDL for which is to have specific
logic to extract semantics from existing web pages. However, if someone
were to use the same combination (e.g. just "fn") in a @class in a
webpage GRDDL will extract a vcard and that was very much unexpected.

Microformats uses @class for both types and predicates and only a
specific extraction mechanism is capable of understanding the
difference. I like that (GRDDL) and actually drives me to wrestle with
the problem (I think) that whether we use @class or not, we still use
rel/rev/href/meta/property and there's always going to be the question
whether extracted triples from the page were expected or not.

The answer to this problem as discussed in the RDFa weekly calls is that
your unexpected triples are local to that document and therefore do not
interfere with any applications (thank you NS, or better yet URIs). Of
course, unless the application does understand what
http://www.example.org/somepage/url means. At least we end up with a
consistent/generic mechanism to extract RDF from HTML and if people
agree on an ontology then they'll end up with a common set of triples
the publisher meant to add to her page. We expect people using a
specific predicate anyways for the expected cases:

<span class="foaf:name">

Your point does remind me I have to change my test work to not do an
isomorphic graph test and instead test that the a subset of the expected
triples is found in the extracted graph. I think that's harder than the
isomorphic test though. Any suggestions?

-Elias

Received on Thursday, 12 October 2006 21:47:49 UTC