Changes to XSD schema of PROV-Dictionary to comply with definition
authorTom De Nies <tom.denies@ugent.be>
Thu, 28 Mar 2013 17:55:35 +0100
changeset 6008 dcd0bd1a5cac
parent 6007 481a4b5ba423
child 6009 7275c1c5e057
Changes to XSD schema of PROV-Dictionary to comply with definition
dictionary/Overview.html
xml/schema/prov-dictionary.xsd
--- a/dictionary/Overview.html	Thu Mar 28 17:21:10 2013 +0100
+++ b/dictionary/Overview.html	Thu Mar 28 17:55:35 2013 +0100
@@ -2365,7 +2365,27 @@
 <h3>Dictionary</h3>
 <div class="glossary-ref" data-ref="glossary-dictionary"></div>
 <p>To specialize an Entity as a Dictionary, include a <code>prov:type</code> with the value "prov:Dictionary".</p>
+<pre class="schema-type">
+&lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Dictionary"  &gt;
+  &lt;xs:complexContent&gt;
+  &lt;xs:extension base="prov:Collection"&gt;&lt;/xs:extension&gt;
+  &lt;/xs:complexContent&gt;
+&lt;/xs:complexType&gt;
+</pre>
+<pre class="schema-usage">
+&lt;xs:element name="dictionary" type="prov:Dictionary" substitutionGroup="prov:internalElement" /&gt;
+</pre>
 <p>An EmptyDictionary is asserted with the <code>prov:type</code> "prov:EmptyDictionary" and denotes a Dictionary with no members.</p>
+<pre class="schema-type">
+&lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="EmptyDictionary"  &gt;
+  &lt;xs:complexContent&gt;
+  &lt;xs:extension base="prov:Dictionary"&gt;&lt;/xs:extension&gt;
+  &lt;/xs:complexContent&gt;
+&lt;/xs:complexType&gt;
+</pre>
+<pre class="schema-usage">
+&lt;xs:element name="emptyDictionary" type="prov:EmptyDictionary" substitutionGroup="prov:internalElement" /&gt;
+</pre>
 <pre class="example">
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -2389,17 +2409,19 @@
 
 
 <section id="term-KeyEntityPair">
-<h3>Key-Value Pair</h3>
+<h3>Key-Entity Pair</h3>
 <div class="glossary-ref" data-ref="glossary-keyEntityPair"></div>
-<p>Key-value pairs are used to identify the members of a dictionary.</p>
+<p>Key-entity pairs are used to identify the members of a dictionary.</p>
 <pre class="schema-type">
 &lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyEntityPair"  &gt;
-  &lt;xs:element name="entity" type="prov:IDRef" /&gt;
-  &lt;xs:element name="key" type="xs:anySimpleType" /&gt;
+  &lt;xs:sequence&gt;
+    &lt;xs:element name="entity" type="prov:IDRef" /&gt;
+    &lt;xs:element name="key" type="xs:anySimpleType" /&gt;
+  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
 </pre>
 <pre class="schema-usage">
-&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="keyEntityPair" type="prov:KeyEntityPair"/&gt;
+&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="keyEntityPair" type="prov:KeyEntityPair" substitutionGroup="prov:internalElement"/&gt;
 </pre>
 <pre class="example">
 &lt;prov:document&gt;
@@ -2432,12 +2454,12 @@
 &lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DictionaryMembership"&gt;
   &lt;xs:sequence&gt;
     &lt;xs:element name="dictionary" type="prov:IDRef"/&gt;
-	&lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" maxOccurs="unbounded"/&gt;
+    &lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" maxOccurs="unbounded"/&gt;
   &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
 </pre>
 <pre class="schema-usage">
-&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hadDictionaryMember" type="prov:DictionaryMembership"/&gt;
+&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hadDictionaryMember" type="prov:DictionaryMembership" substitutionGroup="prov:internalElement"/&gt;
 </pre>
 <pre class="example">
 &lt;prov:document
@@ -2482,12 +2504,16 @@
   &lt;xs:sequence&gt;
     &lt;xs:element name="newDictionary" type="prov:IDRef"/&gt;
     &lt;xs:element name="oldDictionary" type="prov:IDRef"/&gt;
-	&lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" maxOccurs="unbounded"/&gt;
+    &lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" maxOccurs="unbounded"/&gt;
+    &lt;xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/&gt;
+    &lt;xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/&gt;
+    &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/&gt;
   &lt;/xs:sequence&gt;
+  &lt;xs:attribute ref="prov:id"/&gt;
 &lt;/xs:complexType&gt;
 </pre>
 <pre class="schema-usage">
-&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByInsertionFrom" type="prov:Insertion"/&gt;
+&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByInsertionFrom" type="prov:Insertion" substitutionGroup="prov:internalElement"/&gt;
 </pre>
 <pre class="example">
 &lt;prov:document
@@ -2541,11 +2567,15 @@
     &lt;xs:element name="newDictionary" type="prov:IDRef"/&gt;
     &lt;xs:element name="oldDictionary" type="prov:IDRef"/&gt;
     &lt;xs:element name="key" type="xs:anySimpleType" maxOccurs="unbounded" /&gt;
+    &lt;xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/&gt;
+    &lt;xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/&gt;
+    &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/&gt;
   &lt;/xs:sequence&gt;
+  &lt;xs:attribute ref="prov:id"/&gt;
 &lt;/xs:complexType&gt;
 </pre>
 <pre class="schema-usage">
-&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByRemovalFrom" type="prov:Removal"/&gt;
+&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByRemovalFrom" type="prov:Removal" substitutionGroup="prov:internalElement"/&gt;
 </pre>
 <pre class="example">
 &lt;prov:document
--- a/xml/schema/prov-dictionary.xsd	Thu Mar 28 17:21:10 2013 +0100
+++ b/xml/schema/prov-dictionary.xsd	Thu Mar 28 17:55:35 2013 +0100
@@ -49,10 +49,15 @@
 	<!-- Insertion -->
 	<xs:complexType name="Insertion">
 	  <xs:sequence>
-		<xs:element name="newDictionary" type="prov:IDRef"/>
-		<xs:element name="oldDictionary" type="prov:IDRef"/>
-		<xs:element name="keyEntityPair" type="prov:KeyEntityPair" maxOccurs="unbounded"/>
-	  </xs:sequence>
+      <xs:element name="newDictionary" type="prov:IDRef"/>
+      <xs:element name="oldDictionary" type="prov:IDRef"/>
+      <xs:element name="keyEntityPair" type="prov:KeyEntityPair" maxOccurs="unbounded"/>
+      <!-- prov attributes -->
+      <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+    <xs:attribute ref="prov:id"/>
 	</xs:complexType>
 	
 	<xs:element name="derivedByInsertionFrom" type="prov:Insertion" substitutionGroup="prov:internalElement"/>
@@ -60,10 +65,15 @@
 	<!-- Removal -->
 	<xs:complexType name="Removal">
 	  <xs:sequence>
-		<xs:element name="newDictionary" type="prov:IDRef"/>
-		<xs:element name="oldDictionary" type="prov:IDRef"/>
-		<xs:element name="key" type="xs:anySimpleType" maxOccurs="unbounded" />
+      <xs:element name="newDictionary" type="prov:IDRef"/>
+      <xs:element name="oldDictionary" type="prov:IDRef"/>
+      <xs:element name="key" type="xs:anySimpleType" maxOccurs="unbounded" />
+      <!-- prov attributes -->
+      <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
 	  </xs:sequence>
+    <xs:attribute ref="prov:id"/>
 	</xs:complexType>
 	
 	<xs:element name="derivedByRemovalFrom" type="prov:Removal" substitutionGroup="prov:internalElement"/>