Warning:
This wiki has been archived and is now read-only.

PROV-O as RDFa

From Provenance WG Wiki
Jump to: navigation, search

This page lists a series of recipes for adding provenance mark-up to your webpages. Here we will be using RDFa Lite and the PROV-O vocabulary.

Template

We need to define the namespace to be used for prov markup. You can do this in the body of the html document

<body prefix="prov: http://www.w3.org/ns/prov#">

Entity

Find the things on the page that you want to describe the provenance of or are important parts of the provenance. To let systems know that these are part of the provenance we give them a type of prov:Entity. Here are two examples:


<img typeof="prov:Entity" alt="graph of civic participation" src="graph.png"/>


<a typeof="prov:Entity"
   href="http://www.guardian.co.uk/news/datablog/2012/nov/02/happiness-index-how-much-trust-government">
   interesting post</a>

Agent

As part of the provenance, we may want to know who was responsible for a particular entity or activity. These are called prov:agents. PROV provides three subclass of agent for people, organizations and software. Here's an example of identifying a person for provenance. Here we use the the rdfa resource tag to give a URL to the person.

<span resource="#ami" typeof="prov:Person">
Ami Sedghi  
</span>

Derivation

We may want to express in a web page that a particular element is derived from another part of the web. We can do this using prov:wasDerivedFrom. The following shows how an image can described as being derived from the content to which it's linked to.


<div resource="graph.png" typeof="prov:Entity">
   <a property="prov:wasDerivedFrom"
      href="http://www.guardian.co.uk/news/datablog/2012/nov/02/happiness-index-how-much-trust-government#highcharts-0">
        <img alt="graph of civic participation" src="graph.png"/>
   </a>
</div>

Attribution

To express how for example a person was responsible for a given document, PROV supports marking up pages with attribution information. Here's an example:


<a typeof="prov:Entity"
   href="http://www.guardian.co.uk/news/datablog/2012/nov/02/happiness-index-how-much-trust-government"> 
   interesting post
   <span property="prov:wasAttributedTo" resource="#ami"></span>
</a>

Quotation

Quotes are commonly used on the Web. PROV can be used to provide explicit machine processable information about where a quotation came from. Here's an example:


<blockquote typeof="prov:Entity">
   To be, or not to be: that is the question:
   <span property="prov:wasQuotedFrom" resource="http://shakespeare.mit.edu/hamlet/hamlet.3.1.html"></span>
</blockquote>

Another example:


<blockquote typeof="prov:Entity">   
   ....
   <span property="prov:wasQuotedFrom"
         resource="http://www.guardian.co.uk/news/datablog/2012/nov/02/happiness-index-how-much-trust-government"></span>
</blockquote>

Activities

Sometimes, we may want to document how a page or element on a page was produced. This can be done using prov:Activity and the corresponding prov:wasGeneratedBy and prov:used properties. For example, we might want to say that an image was created by taking a screen capture. To do that we first define the screen capture activity:


<span resource="#screencapture" typeof="prov:Activity">
</span>

We can describe when the screen capture activity start and ended. For example:


<span resource="#screencapture" typeof="prov:Activity">
   <span property="prov:endedAtTime"
         datatype="xsd:dateTime">2012-04-25T03:40:00Z</span>
</span>


We can define what entities the screen capture activity used:

<span resource="#screencapture" typeof="prov:Activity">
    <span property="prov:used"
          resource="http://www.guardian.co.uk/news/datablog/2012/nov/02/happiness-index-how-much-trust-government#highcharts-0">
    </span>
</span>

Finally, we can link the activity to the image that it generated.


<div resource="graph.png" typeof="prov:Entity">
  ...
 <span property="prov:wasGeneratedBy" resource="#screencapture"></span>
</div>