Started XML serialization for PROV-DICTIONARY
authorTom De Nies <tom.denies@ugent.be>
Thu, 10 Jan 2013 18:24:25 +0100
changeset 5419 0b3618a85778
parent 5418 b3bdc7cf24c1
child 5420 d1bc3cbaeb24
Started XML serialization for PROV-DICTIONARY
dictionary/prov-dictionary.html
--- a/dictionary/prov-dictionary.html	Thu Jan 10 17:12:04 2013 +0000
+++ b/dictionary/prov-dictionary.html	Thu Jan 10 18:24:25 2013 +0100
@@ -2424,7 +2424,84 @@
 
 <section id="dictionary-xml-schema"> 
 <h2>XML Schema Dictionary</h2>
-The XML serialization of Dictionary will follow once this document has passed a first round of internal review by the Working Group.
+<section id="term-Dictionary">
+<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>
+<p>An EmptyDictionary is asserted with the <code>prov:type</code> "prov:EmptyCollection" and denotes a Dictionary with no members.</p>
+<pre class="example">
+&lt;prov:document
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:prov="http://www.w3.org/ns/prov#"
+    xmlns:ex="http://example.com/ns/ex#"&gt;
+
+  &lt;!-- d0 is an empty dictionary --&gt;
+  <b>&lt;prov:entity prov:id="d0"&gt;
+    &lt;prov:type xsi:type="xsd:QName"&gt;prov:EmptyDictionary&lt;/prov:type&gt;
+  &lt;/prov:entity&gt;</b>
+
+  &lt;!-- d1 is a dictionary, with unknown content --&gt;
+  <b>&lt;prov:entity prov:id="d1"&gt;
+    &lt;prov:type xsi:type="xsd:QName"&gt;prov:Dictionary&lt;/prov:type&gt;
+  &lt;/prov:entity&gt;</b>
+
+&lt;/prov:document&gt;
+</pre>
+</section>  <!-- end term-Collection -->
+
+<section id="term-DictionaryMembership">
+<h3>Dictionary Membership</h3>
+<div class="glossary-ref" data-ref="glossary-dictionarymembership"></div>
+<pre class="schema-type">
+&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:EntityRef"/&gt;
+    &lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyValuePair" maxOccurs="unbounded" &gt;
+      &lt;xs:element name="entity"      type="prov:EntityRef" /&gt;
+      &lt;xs:element name="key"      type="xs:String" /&gt;
+    &lt;/xs:complexType&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="keyValuePair" type="prov:KeyValuePair"/&gt;
+&lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hadDictionaryMember" type="prov:DictionaryMembership"/&gt;
+</pre>
+<pre class="example">
+&lt;prov:document
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:prov="http://www.w3.org/ns/prov#"&gt;
+
+  &lt;prov:entity prov:id="e0"/&gt;
+  &lt;prov:entity prov:id="e1"/&gt;
+  &lt;prov:entity prov:id="e2"/&gt;
+
+  &lt;prov:entity prov:id="d"&gt;
+    &lt;prov:type xsi:type="xsd:QName"&gt;prov:Dictionary&lt;/prov:type&gt;
+  &lt;/prov:entity&gt;
+
+  <b>&lt;prov:hadDictionaryMember&gt;
+    &lt;prov:dictionary prov:ref="d"/&gt;
+    &lt;prov:keyValuePair&gt
+      &lt;prov:entity prov:ref="e0"/&gt;
+      &lt;prov:key&gt;k0&lt;/prov:key&gt;
+    &lt;/prov:keyValuePair&gt
+    &lt;prov:keyValuePair&gt
+      &lt;prov:entity prov:ref="e1"/&gt;
+      &lt;prov:key&gt;k1&lt;/prov:key&gt;
+    &lt;/prov:keyValuePair&gt
+    &lt;prov:keyValuePair&gt
+      &lt;prov:entity prov:ref="e2"/&gt;
+      &lt;prov:key&gt;k2&lt;/prov:key&gt;
+    &lt;/prov:keyValuePair&gt
+  &lt;/prov:hadDictionaryMember></b>
+
+&lt;/prov:document&gt;
+</pre>
+</section>  <!-- end term-Membership -->
+
 </section>
 
 <section id="dictionary-constraints">