added embedded xml schema declarations and xml examples to all features in component 1.
--- a/xml/prov-xml.html Thu Oct 25 10:02:47 2012 -0600
+++ b/xml/prov-xml.html Thu Oct 25 15:39:24 2012 -0600
@@ -212,8 +212,8 @@
<script>
$(function() {
- $("div.schema-type").before("<p>Type definition in XML:</p>");
- $("div.schema-usage").before("<p>Usage in XML:</p>");
+ $("pre.schema-type").before("<p>Type definition in XML Schema:</p>");
+ $("pre.schema-usage").before("<p>Usage in XML:</p>");
});
</script>
@@ -705,65 +705,433 @@
<section id="term-Entity">
<h4>Entity</h4>
<div class="glossary-ref" data-ref="glossary-entity"></div>
-<div class="schema-type" data-name="prov:Entity" data-include="schema/prov.xsd" data-oninclude="insertSchema_Entity"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_entity"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Entity.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Entity">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:value"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="entity" type="prov:Entity"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on Example 16 from http://www.w3.org/TR/prov-dm/#anexample-entity -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#"
+ xmlns:tr="http://example.com/ns/tr#">
+
+ <prov:entity prov:id="tr:WD-prov-dm-20111215">
+ <prov:type>document</prov:type>
+ <ex:version>2</ex:version>
+ </prov:entity>
+
+</prov:document>
+</pre>
</section> <!-- end term-Entity -->
<section id="term-Activity">
<h3>Activity</h3>
<div class="glossary-ref" data-ref="glossary-activity"></div>
-<div class="schema-type" data-name="prov:Activity" data-include="schema/prov.xsd" data-oninclude="insertSchema_Activity"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_activity"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Activity.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Activity">
+ <xs:sequence>
+ <xs:element name="startTime" type="xs:dateTime" minOccurs="0"/>
+ <xs:element name="endTime" type="xs:dateTime" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="activity" type="prov:Activity"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on PROV-DM's Example 17 from http://www.w3.org/TR/prov-dm/#anexample-activity
+ see also http://www.w3.org/TR/prov-dm/#type_Activity -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#">
+
+ <prov:activity prov:id="a1">
+ <prov:startTime>2011-11-16T16:05:00</prov:startTime>
+ <prov:endTime>2011-11-16T16:06:00</prov:endTime>
+ <prov:type>ex:edit</prov:type>
+ <ex:host>server.example.org</ex:host>
+ </prov:activity>
+
+</prov:document>
+</pre>
</section> <!-- end term-Activity -->
<section id="term-Generation">
<h4>Generation</h4>
<div class="glossary-ref" data-ref="glossary-generation"></div>
-<div class="schema-type" data-name="prov:Generation" data-include="schema/prov.xsd" data-oninclude="insertSchema_Generation"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_wasGeneratedBy"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Generation.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Generation">
+ <xs:sequence>
+ <xs:element name="entity" type="prov:EntityRef"/>
+ <xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
+ <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:role"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="wasGeneratedBy" type="prov:Generation"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Example 18 from http://www.w3.org/TR/prov-dm/#anexample-generation1 -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#">
+
+ <prov:entity prov:id="e1"/>
+
+ <prov:activity prov:id="a1"/>
+
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="e1"/>
+ <prov:activity prov:ref="a1"/>
+ <prov:time>2001-10-26T21:32:52</prov:time>
+ <ex:port>p1</ex:port>
+ </prov:wasGeneratedBy>
+
+ <prov:entity prov:id="e2"/>
+
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="e2"/>
+ <prov:activity prov:ref="a1"/>
+ <prov:time>2001-10-26T10:00:00</prov:time>
+ <ex:port>p2</ex:port>
+ </prov:wasGeneratedBy>
+
+ <!-- Example 19, http://www.w3.org/TR/prov-dm/#anexample-generation2 -->
+
+ <prov:entity prov:id="e"/>
+
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="e"/>
+ <prov:time>2001-10-26T21:32:52</prov:time>
+ </prov:wasGeneratedBy>
+
+</prov:document>
+</pre>
</section> <!-- end term-Generation -->
<section id="term-Usage">
<h3>Usage</h3>
<div class="glossary-ref" data-ref="glossary-usage"></div>
-<div class="schema-type" data-name="prov:Usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_Usage"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_used"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Usage.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Usage">
+ <xs:sequence>
+ <xs:element name="activity" type="prov:ActivityRef"/>
+ <xs:element name="entity" type="prov:EntityRef" minOccurs="0"/>
+ <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:role"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="used" type="prov:Usage"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on Example 20 from http://www.w3.org/TR/prov-dm/#anexample-usage -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#">
+
+ <prov:activity prov:id="a1"/>
+
+ <prov:entity prov:id="e1"/>
+
+ <prov:entity prov:id="e2"/>
+
+ <prov:used>
+ <prov:activity prov:ref="a1"/>
+ <prov:entity prov:ref="e1"/>
+ <prov:time≶2011-11-16T16:00:00</prov:time>
+ <ex:parameter>p1</ex:parameter>
+ </prov:used>
+
+ <prov:used>
+ <prov:activity prov:ref="a1"/>
+ <prov:entity prov:ref="e2"/>
+ <prov:time>2011-11-16T16:00:01</prov:time>
+ <ex:parameter>p2</ex:parameter>
+ </prov:used>
+
+</prov:document>
+</pre>
</section> <!-- end term-Usage -->
<section id="term-Communication">
<h3>Communication</h3>
<div class="glossary-ref" data-ref="glossary-communication"></div>
-<div class="schema-type" data-name="prov:Communication" data-include="schema/prov.xsd" data-oninclude="insertSchema_Communication"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_wasInformedBy"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Communication.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Communication">
+ <xs:sequence>
+ <xs:element name="informed" type="prov:ActivityRef"/>
+ <xs:element name="informant" type="prov:ActivityRef"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="wasInformedBy" type="prov:Communication"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on Example 21 from http://www.w3.org/TR/prov-dm/#anexample-communication -->
+
+<prov:document xmlns:prov="http://www.w3.org/ns/prov#">
+
+ <prov:activity prov:id="a1">
+ <prov:type>traffic regulations enforcing<prov:type>
+ </prov:activity>
+
+ <prov:activity prov:id="a2">
+ <prov:type>fine paying, check writing, and mailing</prov:type>
+ </prov:activity>
+
+ <prov:wasInformedBy>
+ <prov:informed prov:ref="a2"/>
+ <prov:informant prov:ref="a1"/>
+ </prov:wasInformedBy>
+
+</prov:document>
+</pre>
</section> <!-- end term-Communication -->
<section id="term-Start">
<h4>Start</h4>
<div class="glossary-ref" data-ref="glossary-start"></div>
-<div class="schema-type" data-name="prov:Start" data-include="schema/prov.xsd" data-oninclude="insertSchema_Start"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_wasStartedBy"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Start.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Start">
+ <xs:sequence>
+ <xs:element name="activity" type="prov:ActivityRef"/>
+ <xs:element name="trigger" type="prov:EntityRef" minOccurs="0"/>
+ <xs:element name="starter" type="prov:ActivityRef" minOccurs="0"/>
+ <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:role"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="wasStartedBy" type="prov:Start"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on PROV-DM's Example 22 from http://www.w3.org/TR/prov-dm/#anexample-start1
+ see also http://www.w3.org/TR/prov-dm/#type_WasStartedBy -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#">
+
+ <prov:entity prov:id="e1">
+ <prov:type>email message</prov:type>
+ </prov:entity>
+
+ <prov:activity prov:id="a1">
+ <prov:type>Discuss</prov:type>
+ </prov:activity>
+
+ <prov:wasStartedBy>
+ <prov:activity prov:ref="a1"/>
+ <prov:trigger prov:ref="e1"/>
+ <prov:time>2011-11-16T16:05:00</prov:time>
+ </prov:wasStartedBy>
+
+ <prov:used>
+ <prov:activity prov:ref="a1"/>
+ <prov:entity prov:ref="e1"/>
+ </prov:used>
+
+ <prov:activity prov:id="a0">
+ <prov:type>Write</prov:type>
+ </prov:activity>
+
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="e1"/>
+ <prov:activity prov:ref="a0"/>
+ </prov:wasGeneratedBy>
+
+ <prov:wasStartedBy>
+ <prov:activity prov:ref="a1"/>
+ <prov:trigger prov:ref="e1"/>
+ <prov:starter prov:ref="a0"/>
+ <prov:time>2011-11-16T16:05:00</prov:time>
+ </prov:wasStartedBy>
+
+ <prov:wasStartedBy>
+ <prov:activity prov:ref="a1"/>
+ <prov:starter prov:ref="a0"/>
+ <prov:time>2011-11-16T16:05:00</prov:time>
+ </prov:wasStartedBy>
+
+</prov:document>
+</pre>
</section> <!-- end term-Start -->
<section id="term-End">
<h4>End</h4>
<div class="glossary-ref" data-ref="glossary-end"></div>
-<div class="schema-type" data-name="prov:End" data-include="schema/prov.xsd" data-oninclude="insertSchema_End"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_wasEndedBy"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Entity.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="End">
+ <xs:sequence>
+ <xs:element name="activity" type="prov:ActivityRef"/>
+ <xs:element name="trigger" type="prov:EntityRef" minOccurs="0"/>
+ <xs:element name="ender" type="prov:ActivityRef" minOccurs="0"/>
+ <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:role"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="wasEndedBy" ype="prov:End"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on PROV-DM's Example 25 from http://www.w3.org/TR/prov-dm/#term-End
+ see also http://www.w3.org/TR/prov-dm/#type_WasEndedBy -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#">
+
+ <prov:entity prov:id="e1">
+ <prov:type>approval document</prov:type>
+ </prov:entity>
+
+ <prov:activity prov:id="a1">
+ <prov:type>Editing</prov:type>
+ </prov:activity>
+
+ <prov:wasEndedBy>
+ <prov:activity prov:ref="a1"/>
+ <prov:trigger prov:ref="e1"/>
+ </prov:wasEndedBy>
+
+</prov:document>
+</pre>
</section> <!-- end term-End -->
<section id="term-Invalidation">
<h3>Invalidation</h3>
<div class="glossary-ref" data-ref="glossary-invalidation"></div>
-<div class="schema-type" data-name="prov:Invalidation" data-include="schema/prov.xsd" data-oninclude="insertSchema_Invalidation"></div>
-<div class="schema-usage" data-include="schema/prov.xsd" data-oninclude="insertSchema_wasInvalidatedBy"></div>
-<!-- <pre class="example" data-include="../examples/eg-40-xml-examples-by-term/xml/Invalidation.xml" data-oninclude="formatExample"></pre> -->
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Invalidation">
+ <xs:sequence>
+ <xs:element name="entity" type="prov:EntityRef"/>
+ <xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
+ <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="prov:location"/>
+ <xs:element ref="prov:role"/>
+ <xs:element ref="prov:label"/>
+ <xs:element ref="prov:type"/>
+ <xs:any namespace="##other"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute ref="prov:id"/>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element mlns:xs="http://www.w3.org/2001/XMLSchema" name="wasInvalidatedBy" type="prov:Invalidation"/>
+</pre>
+<pre class="example">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- based on PROV-DM's Example 26 from http://www.w3.org/TR/prov-dm/#anexample-invalidation1
+ see also http://www.w3.org/TR/prov-dm/#type_WasInvalidatedBy -->
+
+<prov:document
+ xmlns:prov="http://www.w3.org/ns/prov#"
+ xmlns:ex="http://example.com/ns/ex#"
+ xmlns:bbc="http://www.bbc.co.uk/news/">
+
+ <prov:entity prov:id="ex:The-Painter"/>
+
+ <prov:agent prov:id="ex:Picasso"/>
+
+ <prov:wasAttributedTo>
+ <prov:entity prov:ref="ex:The-Painter" />
+ <prov:agent prov:ref="ex:Picasso" />
+ </prov:wasAttributedTo>
+
+ <prov:activity prov:id="ex:crash"/>
+
+ <prov:wasInvalidatedBy>
+ <prov:entity prov:ref="ex:The-Painter"/>
+ <prov:activity prov:ref="ex:crash"/>
+ <prov:time>1998-09-03T01:31:00</prov:time>
+ <ex:circumstances>plane accident</ex:circumstances>
+ </prov:wasInvalidatedBy>
+
+</prov:document>
+</pre>
</section> <!-- end term-Invalidation -->
</section> <!-- end component1 -->
@@ -920,8 +1288,7 @@
<section id="term-Membership">
<h3>Membership</h3>
<div class="glossary-ref" data-ref="glossary-membership"></div>
-<div class="schema-type">
- <pre>
+<pre class="schema-type">
<xs:complexType name="Membership">
<xs:sequence>
<xs:element name="collection" type="prov:EntityRef"/>
@@ -929,12 +1296,9 @@
</xs:sequence>
</xs:complexType>
</pre>
-</div>
-<div class="schema-usage">
- <pre>
+<pre class="schema-usage">
<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hadMember" type="prov:Membership"/>
- </pre>
-</div>
+</pre>
<pre class="example">
<?xml version="1.0" encoding="UTF-8"?>