Primer: Added surrounding document to PROV-XML examples
authorSimon Miles <simon.miles@kcl.ac.uk>
Tue, 19 Feb 2013 18:22:52 +0000
changeset 5599 ae3d6ffd61c7
parent 5598 02fa1b4e58d3
child 5600 1f5287b50759
Primer: Added surrounding document to PROV-XML examples
primer/Primer.html
--- a/primer/Primer.html	Tue Feb 19 17:57:23 2013 +0000
+++ b/primer/Primer.html	Tue Feb 19 18:22:52 2013 +0000
@@ -49,7 +49,7 @@
     subtitle   :  "",
  
     // if you wish the publication date to be other than today, set this
-    publishDate:  "2012-12-11",
+    //publishDate:  "2012-12-11",
  
     // if the specification's copyright date is a range of years, specify
     // the start date here:
@@ -158,6 +158,7 @@
 <li> <a href="http://www.w3.org/TR/2013/WD-prov-dc-20130312/">PROV-DC</a> (To be published as Note) provides a mapping between PROV and Dublic Core Terms [[PROV-DC]];</li>
 <li> <a href="http://www.w3.org/TR/2013/WD-prov-links-20130312/">PROV-LINKS</a> (To be published as Note) introduces a mechanism to link across bundles [[PROV-LINKS]].</li>
 </ul>
+</section>
 
   <section> 
    <h2>Introduction</h2>
@@ -450,42 +451,6 @@
     the context (location) rather than content of the file that differs between the entities
     in this case.
    </p>
-   <!--
-   <h3>Alternate Entities and Specialization</h3>
-   <p>
-    Entities are defined in a flexible way in PROV, allowing for different
-    perspectives to be taken as appropriate for the application. The following
-    are examples illustrating this idea.
-   </p>
-   <ul>
-    <li>The same entity can appear with different descriptions in a provenance record
-     because each appearance emphasizes different aspects of the entity, e.g.
-     a book may be described by its title in one place and by its author and publication date
-     in another.</li>
-    <li>The same entity can evolve over time into different 
-     versions, e.g. a document that is repeatedly updated and has 
-     subsequent releases over time.</li>
-    <li>The same entity can be copied 
-     or replicated, e.g. a document may be copied to several directories.</li>
-    <li>An entity can go through different incarnations, e.g.
-     a committee producing a report may have a set of members when the report 
-     is first released and have a different set of members when an update of
-     the report is released.</li>
-   </ul>
-   <p>
-    In all these situations, 
-    the more specific entities (the versions, copies, incarnations) can be said in PROV to be <i>specializations</i>
-    of the more general entity (the book, the document or the committee as a general entity).
-    The specific entities in each example are also <i>alternates</i> of each other, as they are specializations
-    of the same general entity.
-    Being aware that two entities are alternates allows those
-    consuming the PROV data to know that understanding the provenance of one entity is salient
-    to understanding the provenance of the other.  Knowing that alternate entities are 
-    specializations of another allows a consumer of PROV to refer to the general entity
-    with a unique identifier even though it is specified as different alternates 
-    throughout the provenance records.
-   </p>
-   -->
   </section>   
 
  </section>
@@ -616,13 +581,16 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:entity prov:id="ex:article"&gt;
-	&lt;dct:title&gt;Crime rises in cities&lt;/dct:title&gt;
-  &lt;/prov:entity&gt;
-  &lt;prov:entity prov:id="ex:dataSet1"/&gt;
-  &lt;prov:entity prov:id="ex:regionList"/&gt;
-  &lt;prov:entity prov:id="ex:composition"/&gt;
-  &lt;prov:entity prov:id="ex:chart1"/&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:entity prov:id="ex:article"&gt;
+      &lt;dct:title&gt;Crime rises in cities&lt;/dct:title&gt;
+    &lt;/prov:entity&gt;
+    &lt;prov:entity prov:id="ex:dataSet1"/&gt;
+    &lt;prov:entity prov:id="ex:regionList"/&gt;
+    &lt;prov:entity prov:id="ex:composition"/&gt;
+    &lt;prov:entity prov:id="ex:chart1"/&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -686,7 +654,10 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:activity prov:id="ex:compile"/&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:activity prov:id="ex:compile"/&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -732,8 +703,11 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:activity prov:id="ex:compose"/&gt;
-  &lt;prov:activity prov:id="ex:illustrate"/&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:activity prov:id="ex:compose"/&gt;
+    &lt;prov:activity prov:id="ex:illustrate"/&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -800,18 +774,21 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:used&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:entity prov:ref="ex:dataset1"/&gt;
-  &lt;/prov:used&gt;
-  &lt;prov:used&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:entity prov:ref="ex:regionList"/&gt;
-  &lt;/prov:used&gt;
-  &lt;prov:wasGeneratedBy&gt;
-    &lt;prov:entity prov:ref="ex:composition"/&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-  &lt;/prov:wasGeneratedBy&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:used&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:entity prov:ref="ex:dataset1"/&gt;
+    &lt;/prov:used&gt;
+    &lt;prov:used&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:entity prov:ref="ex:regionList"/&gt;
+    &lt;/prov:used&gt;
+    &lt;prov:wasGeneratedBy&gt;
+      &lt;prov:entity prov:ref="ex:composition"/&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+    &lt;/prov:wasGeneratedBy&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -856,14 +833,17 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:used&gt;
-    &lt;prov:activity prov:ref="ex:illustrate"/&gt;
-    &lt;prov:entity prov:ref="ex:composition"/&gt;
-  &lt;/prov:used&gt;
-  &lt;prov:wasGeneratedBy&gt;
-    &lt;prov:entity prov:ref="ex:chart1"/&gt;
-    &lt;prov:activity prov:ref="ex:illustrate"/&gt;
-  &lt;/prov:wasGeneratedBy&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:used&gt;
+      &lt;prov:activity prov:ref="ex:illustrate"/&gt;
+      &lt;prov:entity prov:ref="ex:composition"/&gt;
+    &lt;/prov:used&gt;
+    &lt;prov:wasGeneratedBy&gt;
+      &lt;prov:entity prov:ref="ex:chart1"/&gt;
+      &lt;prov:activity prov:ref="ex:illustrate"/&gt;
+    &lt;/prov:wasGeneratedBy&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -919,14 +899,17 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:wasAssociatedWith&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:agent prov:ref="ex:derek"/&gt;
-  &lt;/prov:wasAssociatedWith&gt;
-  &lt;prov:wasAssociatedWith&gt;
-    &lt;prov:activity prov:ref="ex:illustrate"/&gt;
-    &lt;prov:agent prov:ref="ex:derek"/&gt;
-  &lt;/prov:wasAssociatedWith&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:wasAssociatedWith&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:agent prov:ref="ex:derek"/&gt;
+    &lt;/prov:wasAssociatedWith&gt;
+    &lt;prov:wasAssociatedWith&gt;
+      &lt;prov:activity prov:ref="ex:illustrate"/&gt;
+      &lt;prov:agent prov:ref="ex:derek"/&gt;
+    &lt;/prov:wasAssociatedWith&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -976,11 +959,14 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:agent prov:id="ex:derek"&gt;
-    &lt;prov:type&gt;prov:Person&lt;/prov:type&gt;
-    &lt;foaf:givenName&gt;Derek&lt;/foaf:givenName&gt;
-    &lt;foaf:mbox&gt;mailto:derek@example.org&lt;/foaf:mbox&gt;
-  &lt;/prov:agent&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:agent prov:id="ex:derek"&gt;
+      &lt;prov:type&gt;prov:Person&lt;/prov:type&gt;
+      &lt;foaf:givenName&gt;Derek&lt;/foaf:givenName&gt;
+      &lt;foaf:mbox&gt;mailto:derek@example.org&lt;/foaf:mbox&gt;
+    &lt;/prov:agent&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1030,14 +1016,17 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:agent prov:id="ex:chartgen"&gt;
-    &lt;prov:type&gt;prov:Organization&lt;/prov:type&gt;
-    &lt;foaf:name&gt;Chart Generators Inc&lt;/foaf:name&gt;
-  &lt;/prov:agent&gt;
-  &lt;prov:actedOnBehalfOf&gt;
-    &lt;prov:delegate prov:ref="ex:derek"/&gt;
-    &lt;prov:responsible prov:ref="ex:chartgen"/&gt;
-  &lt;/prov:actedOnBehalfOf&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:agent prov:id="ex:chartgen"&gt;
+      &lt;prov:type&gt;prov:Organization&lt;/prov:type&gt;
+      &lt;foaf:name&gt;Chart Generators Inc&lt;/foaf:name&gt;
+    &lt;/prov:agent&gt;
+    &lt;prov:actedOnBehalfOf&gt;
+      &lt;prov:delegate prov:ref="ex:derek"/&gt;
+      &lt;prov:responsible prov:ref="ex:chartgen"/&gt;
+    &lt;/prov:actedOnBehalfOf&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1087,10 +1076,13 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:wasAttributedTo&gt;
-    &lt;prov:entity prov:ref="ex:chart1"/&gt;
-    &lt;prov:agent prov:ref="ex:derek"/&gt;
-  &lt;/prov:wasAttributedTo&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:wasAttributedTo&gt;
+      &lt;prov:entity prov:ref="ex:chart1"/&gt;
+      &lt;prov:agent prov:ref="ex:derek"/&gt;
+    &lt;/prov:wasAttributedTo&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
 
@@ -1209,11 +1201,14 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:used&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:entity prov:ref="ex:dataSet1"/&gt;
-    &lt;prov:role&gt;ex:dataToCompose&lt;/prov:role&gt;
-  &lt;/prov:used&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:used&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:entity prov:ref="ex:dataSet1"/&gt;
+      &lt;prov:role&gt;ex:dataToCompose&lt;/prov:role&gt;
+    &lt;/prov:used&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1260,11 +1255,14 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:used&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:entity prov:ref="ex:regionList"/&gt;
-    &lt;prov:role&gt;ex:regionsToAggregateBy&lt;/prov:role&gt;
-  &lt;/prov:used&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:used&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:entity prov:ref="ex:regionList"/&gt;
+      &lt;prov:role&gt;ex:regionsToAggregateBy&lt;/prov:role&gt;
+    &lt;/prov:used&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1319,16 +1317,19 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:wasAssociatedWith&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:agent prov:ref="ex:derek"/&gt;
-    &lt;prov:role&gt;ex:analyst&lt;/prov:role&gt;
-  &lt;/prov:wasAssociatedWith&gt;
-  &lt;prov:wasGeneratedBy&gt;
-    &lt;prov:entity prov:ref="ex:composition"/&gt;
-    &lt;prov:activity prov:ref="ex:compose"/&gt;
-    &lt;prov:role&gt;ex:composedData&lt;/prov:role&gt;
-  &lt;/prov:wasGeneratedBy&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:wasAssociatedWith&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:agent prov:ref="ex:derek"/&gt;
+      &lt;prov:role&gt;ex:analyst&lt;/prov:role&gt;
+    &lt;/prov:wasAssociatedWith&gt;
+    &lt;prov:wasGeneratedBy&gt;
+      &lt;prov:entity prov:ref="ex:composition"/&gt;
+      &lt;prov:activity prov:ref="ex:compose"/&gt;
+      &lt;prov:role&gt;ex:composedData&lt;/prov:role&gt;
+    &lt;/prov:wasGeneratedBy&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1388,12 +1389,15 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;entity prov:id="dataSet2"/&gt;
-  &lt;prov:wasDerivedFrom&gt;
-    &lt;prov:generatedEntity prov:ref="ex:dataSet2"/&gt;
-    &lt;prov:usedEntity prov:ref="ex:dataSet1"/&gt;
-    &lt;prov:type&gt;prov:Revision&lt;/prov:type&gt;
-  &lt;/prov:wasDerivedFrom&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;entity prov:id="dataSet2"/&gt;
+    &lt;prov:wasDerivedFrom&gt;
+      &lt;prov:generatedEntity prov:ref="ex:dataSet2"/&gt;
+      &lt;prov:usedEntity prov:ref="ex:dataSet1"/&gt;
+      &lt;prov:type&gt;prov:Revision&lt;/prov:type&gt;
+    &lt;/prov:wasDerivedFrom&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1440,10 +1444,13 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:wasDerivedFrom&gt;
-    &lt;prov:generatedEntity prov:ref="ex:chart2"/&gt;
-    &lt;prov:usedEntity prov:ref="ex:dataSet2"/&gt;
-  &lt;/prov:wasDerivedFrom&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:wasDerivedFrom&gt;
+      &lt;prov:generatedEntity prov:ref="ex:chart2"/&gt;
+      &lt;prov:usedEntity prov:ref="ex:dataSet2"/&gt;
+    &lt;/prov:wasDerivedFrom&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>and that the new chart is a revision of the original one:
@@ -1486,12 +1493,15 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;entity prov:id="chart2"/&gt;
-  &lt;prov:wasDerivedFrom&gt;
-    &lt;prov:generatedEntity prov:ref="ex:chart2"/&gt;
-    &lt;prov:usedEntity prov:ref="ex:chart1"/&gt;
-    &lt;prov:type&gt;prov:Revision&lt;/prov:type&gt;
-  &lt;/prov:wasDerivedFrom&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;entity prov:id="chart2"/&gt;
+    &lt;prov:wasDerivedFrom&gt;
+      &lt;prov:generatedEntity prov:ref="ex:chart2"/&gt;
+      &lt;prov:usedEntity prov:ref="ex:chart1"/&gt;
+      &lt;prov:type&gt;prov:Revision&lt;/prov:type&gt;
+    &lt;/prov:wasDerivedFrom&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1552,13 +1562,16 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:activity prov:id="ex:correct"/&gt;
-  &lt;prov:agent prov:id="ex:edith"&gt;
-    &lt;prov:type&gt;prov:Person&lt;/prov:type&gt;
-  &lt;/prov:agent&gt;
-  &lt;prov:entity prov:id="ex:instructions"&gt;
-    &lt;prov:type&gt;prov:Plan&lt;/prov:type&gt;
-  &lt;/prov:entity&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:activity prov:id="ex:correct"/&gt;
+    &lt;prov:agent prov:id="ex:edith"&gt;
+      &lt;prov:type&gt;prov:Person&lt;/prov:type&gt;
+    &lt;/prov:agent&gt;
+    &lt;prov:entity prov:id="ex:instructions"&gt;
+      &lt;prov:type&gt;prov:Plan&lt;/prov:type&gt;
+    &lt;/prov:entity&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <div class="turtle example">
@@ -1614,15 +1627,18 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:wasAssociatedWith&gt;
-    &lt;prov:activity prov:ref="ex:correct"/&gt;
-    &lt;prov:agent prov:ref="ex:edith"/&gt;
-    &lt;prov:plan prov:ref="ex:instructions"/&gt;
-  &lt;/prov:wasAssociatedWith&gt;
-  &lt;prov:wasGeneratedBy&gt;
-    &lt;prov:entity prov:ref="ex:dataSet2"/&gt;
-    &lt;prov:activity prov:ref="ex:correct"/&gt;
-  &lt;/prov:wasGeneratedBy&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:wasAssociatedWith&gt;
+      &lt;prov:activity prov:ref="ex:correct"/&gt;
+      &lt;prov:agent prov:ref="ex:edith"/&gt;
+      &lt;prov:plan prov:ref="ex:instructions"/&gt;
+    &lt;/prov:wasAssociatedWith&gt;
+    &lt;prov:wasGeneratedBy&gt;
+      &lt;prov:entity prov:ref="ex:dataSet2"/&gt;
+      &lt;prov:activity prov:ref="ex:correct"/&gt;
+    &lt;/prov:wasGeneratedBy&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1680,14 +1696,17 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:wasGeneratedBy&gt;
-    &lt;prov:entity prov:ref="ex:chart1"/&gt;
-    &lt;prov:time&gt;2012-03-02T10:30:00&lt;/prov:time&gt;
-  &lt;/prov:wasGeneratedBy&gt;
-  &lt;prov:wasGeneratedBy&gt;
-    &lt;prov:entity prov:ref="ex:chart2"/&gt;
-    &lt;prov:time&gt;2012-04-01T15:21:00&lt;/prov:time&gt;
-  &lt;/prov:wasGeneratedBy&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:wasGeneratedBy&gt;
+      &lt;prov:entity prov:ref="ex:chart1"/&gt;
+      &lt;prov:time&gt;2012-03-02T10:30:00&lt;/prov:time&gt;
+    &lt;/prov:wasGeneratedBy&gt;
+    &lt;prov:wasGeneratedBy&gt;
+      &lt;prov:entity prov:ref="ex:chart2"/&gt;
+      &lt;prov:time&gt;2012-04-01T15:21:00&lt;/prov:time&gt;
+    &lt;/prov:wasGeneratedBy&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
 
@@ -1735,10 +1754,13 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:activity prov:id="ex:correct"&gt;
-    &lt;prov:startTime&gt;2012-03-31T09:21:00&lt;/prov:startTime&gt;
-    &lt;prov:endTime&gt;2012-04-01T15:21:00&lt;/prov:endTime&gt;
-  &lt;/prov:activity&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:activity prov:id="ex:correct"&gt;
+      &lt;prov:startTime&gt;2012-03-31T09:21:00&lt;/prov:startTime&gt;
+      &lt;prov:endTime&gt;2012-04-01T15:21:00&lt;/prov:endTime&gt;
+    &lt;/prov:activity&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1797,14 +1819,17 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:entity prov:id="ex:quoteInBlogEntry"&gt;
-    &lt;prov:value&gt;Smaller cities have more crime than larger ones&lt;/prov:value&gt;
-  &lt;/prov:entity&gt;
-  &lt;prov:wasDerivedFrom&gt;
-    &lt;prov:generatedEntity prov:ref="ex:quoteInBlogEntry"/&gt;
-    &lt;prov:usedEntity prov:ref="ex:article"/&gt;
-    &lt;prov:type&gt;prov:Quotation&lt;/prov:type&gt;
-  &lt;/prov:wasDerivedFrom&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:entity prov:id="ex:quoteInBlogEntry"&gt;
+      &lt;prov:value&gt;Smaller cities have more crime than larger ones&lt;/prov:value&gt;
+    &lt;/prov:entity&gt;
+    &lt;prov:wasDerivedFrom&gt;
+      &lt;prov:generatedEntity prov:ref="ex:quoteInBlogEntry"/&gt;
+      &lt;prov:usedEntity prov:ref="ex:article"/&gt;
+      &lt;prov:type&gt;prov:Quotation&lt;/prov:type&gt;
+    &lt;/prov:wasDerivedFrom&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1853,11 +1878,14 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:entity prov:id="ex:articleV1"/&gt;
-  &lt;prov:specializationOf&gt;
-    &lt;prov:specificEntity prov:ref="ex:articleV1"/&gt;
-    &lt;prov:generalEntity prov:ref="ex:article"/&gt;
-  &lt;/prov:specializationOf&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:entity prov:id="ex:articleV1"/&gt;
+    &lt;prov:specializationOf&gt;
+      &lt;prov:specificEntity prov:ref="ex:articleV1"/&gt;
+      &lt;prov:generalEntity prov:ref="ex:article"/&gt;
+    &lt;/prov:specializationOf&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>
@@ -1906,14 +1934,17 @@
        set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
      </span></div>
     <pre>
-  &lt;prov:specializationOf&gt;
-    &lt;prov:specificEntity prov:ref="ex:articleV2"/&gt;
-    &lt;prov:generalEntity prov:ref="ex:article"/&gt;
-  &lt;/prov:specializationOf&gt;
-  &lt;prov:alternateOf&gt;
-    &lt;prov:alternate1 prov:ref="ex:articleV1"/&gt;
-    &lt;prov:alternate2 prov:ref="ex:articleV2"/&gt;
-  &lt;/prov:alternateOf&gt;
+  &lt;prov:document&gt;
+    ...
+    &lt;prov:specializationOf&gt;
+      &lt;prov:specificEntity prov:ref="ex:articleV2"/&gt;
+      &lt;prov:generalEntity prov:ref="ex:article"/&gt;
+    &lt;/prov:specializationOf&gt;
+    &lt;prov:alternateOf&gt;
+      &lt;prov:alternate1 prov:ref="ex:articleV1"/&gt;
+      &lt;prov:alternate2 prov:ref="ex:articleV2"/&gt;
+    &lt;/prov:alternateOf&gt;
+  &lt;/prov:document&gt;
     </pre>
    </div>
    <p>