Warning:
This wiki has been archived and is now read-only.
Cookbook/Examples
From RDFa Working Group Wiki
< Cookbook
Some potential examples for a cookbook:
Contents
Page Metadata
<head profile="http://www.w3.org/1999/xhtml/vocab"
prefix="og: http://ogp.me/ns# dc: http://purl.org/dc/terms/ xsd: http://www.w3.org/2001/XMLSchema#">
<title>Site Title: Page Title</title>
<meta property="dc:title og:title" content="Page Title" />
<meta property="dc:description og:description" content="Description of the page" />
<meta property="dc:created" content="2010-11-03T22:44:00Z" datatype="xsd:dateTime" />
<meta property="dc:modified" content="2010-11-03T22:46:12Z" datatype="xsd:dateTime" />
</head>
Atom Feed Metadata
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:h="http://www.w3.org/1999/xhtml"
prefix="dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ xsd: http://www.w3.org/2001/XMLSchema#">
<title>My Feed</title>
<entry typeof="">
<title property="dc:title">Getting Started with Bee Keeping</title>
...
<!-- this entry quotes from a book -->
<link rel="dc:references" href="urn:isbn:978-0470430651">
<h:meta property="dc:title" content="Beekeeping For Dummies" />
<h:meta rel="dc:creator">
<h:meta property="foaf:name">Howland Blackiston</h:meta>
</h:meta>
<h:meta rel="dc:contributor">
<h:meta property="foaf:name">Kim Flottum</h:meta>
</h:meta>
<h:meta property="dc:issued" content="2009-03-16" datatype="xsd:date" />
</link>
</entry>
</feed>
Representing People
Toby needs to chase up danbri about getting an official FOAF profile.
With a link:
<a profile="http://xmlns.com/foaf-profile/2010" typeof="Person"
rel="homepage" href="http://alice.example.com/"
property="name">Alice Jones</a>
Without a link:
<span profile="http://xmlns.com/foaf-profile/2010" typeof="Person"
property="name">Alice Jones</span>
Without a link and using @content:
<span profile="http://xmlns.com/foaf-profile/2010" typeof="Person"
property="name" content="Alice Jones">Ally</span>
Representing Products
Something with GR...
Representing Events
Toby wants to create a nice profile for marking up events using Yves Raimond's ontology.
<div profile="http://example.com/event" typeof="Event"> <span property="start" content="2010-11-05" datatype="xsd:date">5 Nov 2010</span> <span property="summary">Bonfire Night!</span> </div>
Representing Lists
E.g., the list of authors for an article.
<div prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ foaf:http://xmlns.com/foaf/0.1/"> <span about="http://data.semanticweb.org/conference/iswc-aswc/2007/tracks/in-use/papers/795" typeof="bibo:Article"> <em rel="bibo:authorList"> <span rel="rdf:_1"> <span about="http://data.semanticweb.org/person/knud-moeller" property="foaf:name">Knud Möller</span>, </span> <span rel="rdf:_2"> <span about="http://data.semanticweb.org/person/tom-heath" property="foaf:name">Tom Heath</span>, </span> <span rel="rdf:_3"> <span about="http://data.semanticweb.org/person/siegfried-handschuh" property="foaf:name">Siegfried Handschuh</span> and </span> <span rel="rdf:_4"> <span about="http://data.semanticweb.org/person/john-domingue" property="foaf:name">John Domingue</span>: </span> </em> <strong property="dc:title">Recipes for Semantic Web Dog Food - The ESWC and ISWC Metadata Projects</strong> </span> </div>
I know this is not pretty - it would be cool if RDFa supported rdf:li.