W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > September 2009

Re: Testing Google's Rich Snippets RDFa support

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Wed, 16 Sep 2009 18:51:41 +0100
Message-ID: <4AB125AD.7010400@cam.ac.uk>
To: Toby Inkster <tai@g5n.co.uk>
CC: Othar Hansson <othar@othar.com>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Toby Inkster wrote:
> On 16 Sep 2009, at 18:19, Philip Taylor wrote:
>> Are you suggesting that Google should intentionally violate the RDFa 
>> specification? Or are you suggesting the RDFa specification should be 
>> relaxed to allow implementers freedom in handling invalid documents? I 
>> think it must be one or the other, as long as Google is claiming to 
>> implement RDFa.
> Neither. I am claiming that implementers will often want to implement a 
> superset of RDFa. e.g. they'll want to parse RDFa plus some other HTML 
> semantics (like <blockquote@cite>, <title>, etc).

Ah, that sounds like a valid option. I assume by "superset" you mean 
specifically that the set of RDF triples extracted is a superset of the 
default graph defined by RDFa.

But in that case, your earlier proposal ...

> The best way to forgive webmasters who forget to declare the 'v' CURIE
> prefix would be to pre-populate the "list of URI mappings" which is
> described as initially empty in
> <http://www.w3.org/TR/rdfa-syntax/#sec_5.5.>.

... seems to fail for input like:

   <div xmlns:example="http://example.com/">
     <span typeof="example:foo">
       <span typeof="v:Person"> <!-- undeclared prefix v -->
         <span property="example:bar">baz</span>

Per RDFa, the second typeof must be ignored entirely, so the example:bar 
property will be associated with the example:foo, resulting in some 
triples in the default graph. If the prefix 'v' was pre-populated, the 
second typeof would set a new subject and the example:foo would have no 
properties, so the result would not be a superset of the default graph.

I can't think of any straightforward modifications to the RDFa 
processing model that would be forgiving to authors who forget to 
declare prefixes, without sometimes violating the spec by failing to 
extract triples that are meant to be in the default graph. (But maybe 
I'm just not thinking hard enough!)

(I suppose it would always be possible to run the proper RDFa processing 
model once, then run it again in error-forgiveness mode, then union the 
results, which would guarantee it's a superset, but that really doesn't 
sound like a good idea...)

Philip Taylor
Received on Wednesday, 16 September 2009 17:52:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:33 UTC