W3C home > Mailing lists > Public > public-xg-socialweb@w3.org > April 2010

Design rationale behind the current schema for Facebook Open Graph Protocol

From: Fabien Gandon <Fabien.Gandon@sophia.inria.fr>
Date: Fri, 30 Apr 2010 14:56:55 +0200
Message-ID: <4BDAD397.8000904@sophia.inria.fr>
To: Ivan Herman <ivan@w3.org>, David Recordon <recordond@gmail.com>, Dan Brickley <danbri@danbri.org>, public-xg-socialweb@w3.org, Tim Berners-Lee <timbl@w3.org>, Marie-Claire Forgue <mcf@w3.org>, Murray Maloney <murray@muzmo.com>, Peter Mika <pmika@yahoo-inc.com>, Richard Cyganiak <richard@cyganiak.de>, RaphaŽl Troncy <raphael.troncy@eurecom.fr>, jacobi@csail.mit.edu, Bernard Vatant <bernard.vatant@mondeca.com>, Toby A Inkster <tai@g5n.co.uk>
First of all, thank to all of you who sent us feedback.

The schema is served at http://opengraphprotocol.org/schema/ for clients 
accepting application/rdf+xml header.

To answer some of the questions, here is a summary of the design 
rationale behind the current version of the schema.

Let us take the current example on the OPG page:

<html xmlns:og="http://opengraphprotocol.org/schema/">
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" 
content="http://ia.media-imdb.com/images/rock.jpg" />

This code is indeed found in the header of the page 

If we want to keep that as simple as it is (no blank nodes, no 
additional href, no additional namespaces, etc.) the triples generated 
are datatypeproperties (use of <meta/>) attached directly to the page:

<http://www.imdb.com/title/tt0117500/> og:title "The Rock"
<http://www.imdb.com/title/tt0117500/> og:type "movie"
<http://www.imdb.com/title/tt0117500/> og:url 
<http://www.imdb.com/title/tt0117500/> og:image 

A direct mapping of these properties to dc :title, rdfs :type, etc. 
would imply triples annotating the page itself like which would be not 
exact and/or invalid:

<http://www.imdb.com/title/tt0117500/> dc:title "The Rock"
<http://www.imdb.com/title/tt0117500/> rdfs:type "movie"
<http://www.imdb.com/title/tt0117500/> foaf:homepage 
<http://www.imdb.com/title/tt0117500/> foaf:depiction 

Rather the triples should look like for instance:

_:a dc:title "The Rock"
_:a rdfs:type <http://opengraphprotocol.org/schema/Movie>
_:a foaf:homepage <http://www.imdb.com/title/tt0117500/>
_:a foaf:depiction <http://ia.media-imdb.com/images/rock.jpg>

Therefore, instead of forcing equivalent properties or sub-properties we 
have chosen a minimal ontological commitment that allows everyone to 
extend it as needed. To summarize : the idea behind the current version 
is that most mappings demand some tricky alignment like creating bnodes 
for Addresses or Objects while the RDFa code must remain very very 
simple. So we just capture the voc they use with their semantics and 
then have the mapping and translation done through rules (N3 rules, 
SPARQL Construct, RIF etc.) or other mechanisms e.g. have a rule to 
transfrom the ogp "keyword types" into URIs, have a rule to create a 
resource for the page and another one for the object, etc.

If we were to change the RDFa  markup better mapping could be done.

Feedback is more than welcome.


fabien, inria, http://fabien.info
Received on Friday, 30 April 2010 12:57:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:22:09 UTC