This is an archive of an inactive wiki and cannot be modified.

RDFa Use Cases and Requirements


This is the workspace for RDFa Use Cases and Requirements.

1. Use Case: Publishing FOAF information

Tim has a web page,, where he blogs and provides contact information, links to his friends, etc... He would like to augment the human-readable data with a structured version of this information. In particular, Tim wants to be sure that, as he updates his set of HTML links to friends' blogs, the structured version of this information stays the same.

Tim is told that the Friends-Of-A-Friends (FOAF) vocabulary exists to express these kinds of relationships. Thus, he publishes the following HTML:

<div xmlns:foaf="" id="me" about="#me" class="foaf:Person">

You've reached <a rel="foaf:homepage foaf:weblog">my homepage and blog</a>.
My name is <span property="foaf:name">Tim Barnard-Li<span>.

<h3>Blog Roll</h3>
<ul rel="foaf:knows">
  <li><a href="">Alice</a></li>
  <li><a href="">Bob</a></li>


2. Use Case: HTML widgets

Creative Commons (CC) lets people license their content under more permissive rules than default copyright. Certain conditions may be placed by authors, e.g. giving the original author proper credit upon redistribution, limiting uses to non-commercial purposes, etc. Much of the content licensed under CC is HTML-based, and users wish to display the CC icon and license link inline. To facilitate this process, CC delivers a chunk of HTML that users can cut-and-paste into their web page. Importantly, this chunk must be self-contained: it cannot require modifications to the HEAD of the document.

<div xmlns:cc="">

This document is available under a
<a rel="cc:license" href="">
  CC License

You should provide attribution to 
<a property="cc:attributionName" rel="cc:attributionLink" href="">


3. Use Case: Selling an item (online classifieds)

4. Use Case: Dynamic browser behavior

(should this be simply part of a separate use case that is more end-to-end?)

5. Use Case: from IBM/Elias (TBD)

6. Use Case: Web-based cut&paste

7. Use Case: Describing software projects

Apache some day decides to offer their project descriptions in HTML/RDFa. An existing DOAP description (e.g. Tomcat DOAP document) is turned into an HTML page using RDFa, as follows:

<div xmlns:doap="" xmlns:foaf="" xmlns:rdf="">
  <div about="" class="doap:Project">
   The <a rel="doap:homepage" href="" property="doap:name">Apache Tomcat</a> 
   is a <span property="doap:shortdesc">a Java Servlet and Java Servet Pages specifications implementation.</span>

Note: Could also be aligned with tagging, cf Yet Another Semantic Gap

8. Use Case: Semantic Wiki

8.1. System generated Metadata

There are certain metadata entities available on a Wiki page as title, author(s), subject(s), etc. These could be automatically made available either using a system macro or a common Wiki Interchange Format.

8.2. User generated Metadata

A W3C working group decides to enhance their Use Case (UC) descriptions to enable a semantic search. The UC are maintained on a MoinMoin Wiki. To use RDFa in a Wiki page, the SafeHTML-macro is used to embed HTML code directly into the Wiki raw text. A UC header then might look like:

[[SafeHTML(<span xmlns:dc="">
    <span about="">
        <a href="" rel="dc:creator">MichaelHausenblas</a>, ...<br />
        <span property="dc:subject" datatype="xsd:string">scalability, video-blogging, GEO-tracking</span>

Each Wiki page that contains RDFa is marked as belonging to certain Category, e.g. CategoryRDFaInside. It is then possible to execute a query (on the merged RDF graph) using the following SPARQL statement to find out who (dc:creator) works on which (dc:subject) topic:

PREFIX  dc: <>

SELECT ?person ?topics 
       ?page dc:creator  ?person ;
             dc:subject  ?topics .

The result of the above stated query would then be something like:




"scalability, video-blogging, GEO-tracking" ^^<xsd:string>

9. Use Case: Citations


10. Use Case: PDF metadata reuse

With XMP it is possible to add RDF-based metadata to a PDF document. When the PDF document is converted into HTML, the embedded metadata can be represented using RDFa (Note: there are rumors that Adobe plans to launch a new XMP version, soon).

11. Use Case: Metadata on Mobil Devices

HTML (or parts of it) may be displayed on mobile devices (as cell phones, PDAs, etc.). In this realm, simple RDF-based vocabularies as CC/PP may be used for negotation matters and the like. Regarding server-side support, libraries as DELI exist that support the on-the-fly creation of HTML content using e.g. Apache Cocoon in combintation with DELI-in-Apache. Instead of doing the work twice, RDFa can be used to embed the information directly in the so created HTML-code.

12. Use Case: Blogs

RDFa can be seen as the natural successor of today's Blog Formats.

13. Use Case: Publishing

Foo Magazine ships content to aggregators and business partners using XHTML 2, because the greater structural possibilities over XHTML 1 make it easier to group components of an article (e.g. pictures, recipes, sidebars of book excerpts) into individual elements of an XHTML file. They want to pull some content from their repository, and instead of sprinkling the metadata throughout the document, they want to insert a block of workflow and rights re-use metadata about the document and its components into a single point in the XHTML file and then ship the document off to a business partner. (Many schemas have a header element separate from the body element so that the header element can be a placeholder for document metadata; it's a natural place for it.) The sample XML shown here has a little metadata about the document itself, a little about one subcomponent (a recipe) and a little about a subcomponent of that, a picture within the recipe.

<html xmlns:fm=""
  <meta property='fm:newsStandDate='2006-04-03'/>
  <meta property='pr:coverDate='2007-02-24'/>
  <meta about="#recipe13941">
   <meta property="fm:ComponentID">XZ3214</meta>
   <meta property="fm:ComponentType">Recipe</meta>
   <meta property="fm:RecipeID">r003423</meta>
  <meta about="#pic9932">
    <meta property="dc:creator">Joe Smith</meta>
    <meta property="pr:embargoDate">2007-03-12</meta>
  <h>Add Some Tex Mex Sizzle to Your Kid's Lunch</h>
  <section id='recipe22143'>
   <h>Amigo Corn Dogs</h>
    <img id="pic9932" src=""/>
     <!-- li, p, etc. -->
  <section id='recipe13941'>
   <h>EZ Bean Tacos</h>
   <!-- li, p, etc. -->
  <!-- more content -->

Based on Bob DuCharme's posting on 2006-12-15.