Design rationale behind the current schema for Facebook Open Graph Protocol

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/">
<head>
<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" />
...
</head>
...
</html>

This code is indeed found in the header of the page 
http://www.imdb.com/title/tt0117500/

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/"
<http://www.imdb.com/title/tt0117500/> og:image 
"http://ia.media-imdb.com/images/rock.jpg"

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/"
<http://www.imdb.com/title/tt0117500/> foaf:depiction 
"http://ia.media-imdb.com/images/rock.jpg"

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.

Cheers,

-- 
fabien, inria, http://fabien.info

Received on Friday, 30 April 2010 12:57:33 UTC