From RDFa Working Group Wiki
Jump to: navigation, search

Some potential examples for a cookbook:

Page Metadata

  <head profile=""
           prefix="og: dc: xsd:">
    <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" />

Atom Feed Metadata

  <feed xmlns="" xmlns:h=""
           prefix="dc: foaf: xsd:">
    <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 rel="dc:contributor">
          <h:meta property="foaf:name">Kim Flottum</h:meta>
        <h:meta property="dc:issued" content="2009-03-16" datatype="xsd:date" />

Representing People

Toby needs to chase up danbri about getting an official FOAF profile.

With a link:

 <a profile="" typeof="Person"
       rel="homepage" href=""
       property="name">Alice Jones</a>

Without a link:

 <span profile="" typeof="Person"
       property="name">Alice Jones</span>

Without a link and using @content:

 <span profile="" 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="" typeof="Event">
    <span property="start" content="2010-11-05" datatype="xsd:date">5 Nov 2010</span>
    <span property="summary">Bonfire Night!</span>

Representing Lists

E.g., the list of authors for an article.

<div prefix="bibo: dc: foaf:">
  <span about="" typeof="bibo:Article">
    <em rel="bibo:authorList">
      <span rel="rdf:_1">
        <span about="" property="foaf:name">Knud Möller</span>,
      <span rel="rdf:_2">
        <span about="" property="foaf:name">Tom Heath</span>,
      <span rel="rdf:_3">
        <span about="" property="foaf:name">Siegfried Handschuh</span> and 
      <span rel="rdf:_4">
        <span about="" property="foaf:name">John Domingue</span>:
    <strong property="dc:title">Recipes for Semantic Web Dog Food - The ESWC and ISWC Metadata Projects</strong>

I know this is not pretty - it would be cool if RDFa supported rdf:li.