--- a/dictionary/prov-dictionary.html Thu Jan 10 18:24:25 2013 +0100
+++ b/dictionary/prov-dictionary.html Fri Jan 11 10:10:34 2013 +0100
@@ -1162,9 +1162,9 @@
<section id="dictionary-ontological-definition">
<h2>Ontological Definition of Dictionary</h2>
-
+<p>In this section, the ontological definition of <code>prov:Dictionary</code> is given, in order to extend [[PROV-O]] with dictionaries.</p>
<p> A <code><a class="qname"
-href='#Dictionary'>prov:Dictionary</a></code> is an <code
+ href='#Dictionary'>prov:Dictionary</a></code> is a <code
class="repeated">prov:Entity</code> that acts as a container to some members,
which are themselves entities.
Specifically, a dictionary is composed of set of key-value pairs, where a
@@ -1509,6 +1509,7 @@
<dt>is subclass of</dt>
<dd>
<a title="http://www.w3.org/ns/prov#Dictionary" href="#Dictionary" class="owlclass">prov:Dictionary</a>
+ <a title="http://www.w3.org/ns/prov#EmptyCollection" href="http://www.w3.org/TR/2012/CR-prov-o-20121211/#EmptyCollection" class="owlclass">prov:EmptyCollection</a>
</dd>
</dl>
</div>
@@ -2424,11 +2425,12 @@
<section id="dictionary-xml-schema">
<h2>XML Schema Dictionary</h2>
+In this section, we provide the XML Schema to use dictionaries with the [[PROV-XML]] serialization.
<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>
+<p>An EmptyDictionary is asserted with the <code>prov:type</code> "prov:EmptyDictionary" and denotes a Dictionary with no members.</p>
<pre class="example">
<prov:document
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -2448,24 +2450,58 @@
</prov:document>
</pre>
-</section> <!-- end term-Collection -->
+</section> <!-- end XML:Dictionary -->
+
+
+<section id="term-KeyValuePair">
+<h3>Key-Value Pair</h3>
+<div class="glossary-ref" data-ref="glossary-keyValuePair"></div>
+<p>Key-value pairs are used to identify the members of a dictionary.</p>
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyValuePair" >
+ <xs:element name="entity" type="prov:EntityRef" />
+ <xs:element name="key" type="xs:String" />
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="keyValuePair" type="prov:KeyValuePair"/>
+</pre>
+<pre class="example">
+<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#">
+
+ <prov:entity prov:id="e0"/>
+ <prov:entity prov:id="e1"/>
+
+ <b><prov:keyValuePair>
+ <prov:entity prov:ref="e0"/>
+ <prov:key>k0</prov:key>
+ </prov:keyValuePair>
+
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e1"/>
+ <prov:key>k1</prov:key>
+ </prov:keyValuePair></b>
+
+</pre>
+</section> <!-- end XML:KeyValuePair -->
<section id="term-DictionaryMembership">
<h3>Dictionary Membership</h3>
<div class="glossary-ref" data-ref="glossary-dictionarymembership"></div>
+<p>The members of a dictionary are specified by listing all the key-value pairs inside a <code>prov:DictionaryMembership</code> element</p>
<pre class="schema-type">
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DictionaryMembership">
<xs:sequence>
- <xs:element name="dictionary" type="prov:EntityRef"/>
- <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyValuePair" maxOccurs="unbounded" >
- <xs:element name="entity" type="prov:EntityRef" />
- <xs:element name="key" type="xs:String" />
- </xs:complexType>
+ <xs:element name="dictionary" type="prov:EntityRef"/>
+ <xs:element name="keyValuePair type="prov:KeyValuePair" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</pre>
<pre class="schema-usage">
-<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="keyValuePair" type="prov:KeyValuePair"/>
<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hadDictionaryMember" type="prov:DictionaryMembership"/>
</pre>
<pre class="example">
@@ -2502,6 +2538,124 @@
</pre>
</section> <!-- end term-Membership -->
+<section id="term-Insertion">
+<h3>Insertion</h3>
+<div class="glossary-ref" data-ref="glossary-insertion"></div>
+<p>To specify that one dictionary was derived by insertion of key-value pairs into another one, a <code>prov:Insertion</code> element is used.</p>
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Insertion">
+ <xs:sequence>
+ <xs:element name="newDictionary" type="prov:EntityRef"/>
+ <xs:element name="oldDictionary" type="prov:EntityRef"/>
+ <xs:element name="keyValuePair type="prov:KeyValuePair" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByInsertionFrom" type="prov:Insertion"/>
+</pre>
+<pre class="example">
+<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#">
+
+ <prov:entity prov:id="e0"/>
+ <prov:entity prov:id="e1"/>
+ <prov:entity prov:id="e2"/>
+
+ <prov:entity prov:id="d1">
+ <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
+ </prov:entity>
+
+ <prov:entity prov:id="d2">
+ <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
+ </prov:entity>
+
+ <prov:hadDictionaryMember>
+ <prov:dictionary prov:ref="d1"/>
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e0"/>
+ <prov:key>k0</prov:key>
+ </prov:keyValuePair>
+ </prov:hadDictionaryMember>
+
+ <b><prov:derivedByInsertionFrom>
+ <prov:newDictionary prov:ref="d2"/>
+ <prov:oldDictionary prov:ref="d1"/>
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e1"/>
+ <prov:key>k1</prov:key>
+ </prov:keyValuePair>
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e2"/>
+ <prov:key>k2</prov:key>
+ </prov:keyValuePair>
+ </prov:derivedByInsertionFrom></b>
+
+</prov:document>
+</pre>
+</section> <!-- end term-Insertion -->
+<section id="term-Removal">
+<h3>Removal</h3>
+<div class="glossary-ref" data-ref="glossary-insertion"></div>
+<p>To specify that one dictionary was derived by removal of key-value pairs from another one, a <code>prov:Removal</code> element is used.</p>
+<pre class="schema-type">
+<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Removal">
+ <xs:sequence>
+ <xs:element name="newDictionary" type="prov:EntityRef"/>
+ <xs:element name="oldDictionary" type="prov:EntityRef"/>
+ <xs:element name="key" type="xs:String" maxOccurs="unbounded" />
+ </xs:sequence>
+</xs:complexType>
+</pre>
+<pre class="schema-usage">
+<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByRemovalFrom" type="prov:Removal"/>
+</pre>
+<pre class="example">
+<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#">
+
+ <prov:entity prov:id="e0"/>
+ <prov:entity prov:id="e1"/>
+ <prov:entity prov:id="e2"/>
+
+ <prov:entity prov:id="d1">
+ <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
+ </prov:entity>
+
+ <prov:entity prov:id="d2">
+ <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
+ </prov:entity>
+
+ <prov:hadDictionaryMember>
+ <prov:dictionary prov:ref="d1"/>
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e0"/>
+ <prov:key>k0</prov:key>
+ </prov:keyValuePair>
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e1"/>
+ <prov:key>k1</prov:key>
+ </prov:keyValuePair>
+ <prov:keyValuePair>
+ <prov:entity prov:ref="e2"/>
+ <prov:key>k2</prov:key>
+ </prov:keyValuePair>
+ </prov:hadDictionaryMember>
+
+ <b><prov:derivedByRemovalFrom>
+ <prov:newDictionary prov:ref="d2"/>
+ <prov:oldDictionary prov:ref="d1"/>
+ <prov:key>k1</prov:key>
+ <prov:key>k2</prov:key>
+ </prov:derivedByRemovalFrom></b>
+
+</prov:document>
+</pre>
+</section> <!-- end term-Removal -->
</section>
<section id="dictionary-constraints">