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

Re: Testing Google's Rich Snippets RDFa support

From: Toby Inkster <tai@g5n.co.uk>
Date: Wed, 16 Sep 2009 09:37:58 +0100
To: Philip Taylor <pjt47@cam.ac.uk>
Cc: Othar Hansson <othar@othar.com>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Message-Id: <1253090278.7391.121.camel@ophelia2.g5n.co.uk>
On Tue, 2009-09-15 at 17:09 +0100, Philip Taylor wrote:
> Othar wrote:
>
> > We surely have errors in our parsing (thanks for finding several:
> > we'll look into these on Monday).  But we will also deviate from the
> > standard in some cases to be forgiving of webmaster errors.  For
> > example, we expect that some webmasters will forget the xmlns
> > attribute entirely.
> 
> "we will [...] deviate from the standard" makes me believe that the 
> above problems are an unavoidable consequence of Google's intentions, 
> rather than just unintentional transient fixable bugs, and therefore are 
> a serious concern (which is why I'm writing about it like this rather 
> than just listing bugs).

I think it's reasonable to build in a degree of laxity into an RDFa
parser. Postel's Law applies. ´╗┐But Google's current parsing algorithm
doesn't just forgive webmasters who make mistakes, but has the
presumably unintended consequence of punishing webmasters who publish
conforming but unexpected-by-Google RDFa.

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.>. Instead, Google appears to
ignore CURIE prefix mappings altogether.

I'd previously sent to Kavi Goel at Google a few test cases which
*ought* to be to *exactly* identical results by an RDFa processor, but
Google currently seems to handle differently to each other. I'll put
them on public record now:

        <div xmlns:v="http://rdf.data-vocabulary.org/"
          about="#joe" typeof="v:Person">
                <span property="v:name">Joe Bloggs</span>
                <span property="v:nickname">Joey</span>
        </div>

        <div xmlns:v="http://rdf.data-vocabulary.org/">
                <span about="#joe"
                  typeof="v:Person"
                  property="v:name">Joe Bloggs</span>
                <span about="#joe" property="v:nickname">Joey</span>
        </div>

        <div xmlns:v="http://rdf.data-vocabulary.org/">
                <span about="#joe"
                  property="v:name">Joe Bloggs</span>
                <span about="#joe" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                  rel="rdf:type" resource="[v:Person]"
                  property="v:nickname">Joey</span>
        </div>

        <div xmlns:v="http://rdf.data-vocabulary.org/"
          about="#joe" typeof="v:Person">
                <span xmlns:v="http://rdf.data-vocabulary.org/n"
                  property="v:ame">Joe Bloggs</span>
                <span xmlns:v="http://rdf.data-vocabulary.org/n"
                  property="v:ickname">Joey</span>
        </div>

        <div xmlns:v="http://rdf.data-vocabulary.org/"
          about="#joe" typeof="v:Person"
          property="v:nickname" content="Joey">
                <span property="v:name">Joe Bloggs</span>
                <span>Joey</span>
        </div>

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Wednesday, 16 September 2009 08:38:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 16 September 2009 08:38:53 GMT