Add PROV-DICTIONARY XML examples as eg-44-xml-dict
authorCurt Tilmes <Curt.Tilmes@nasa.gov>
Wed, 30 Jan 2013 13:56:15 -0500
changeset 5457 86eaaca67451
parent 5456 d4bb1838c7e2
child 5458 df85cd75a1e7
Add PROV-DICTIONARY XML examples as eg-44-xml-dict
examples/eg-44-xml-dict/xml/Dict-4-Empty.xml
examples/eg-44-xml-dict/xml/Dict-5-KeyValuePair.xml
examples/eg-44-xml-dict/xml/Dict-6-Membership.xml
examples/eg-44-xml-dict/xml/Dict-7-Insertion.xml
examples/eg-44-xml-dict/xml/Dict-8-Removal.xml
examples/eg-44-xml-dict/xml/Makefile
examples/eg-44-xml-dict/xml/ex.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/Dict-4-Empty.xml	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,17 @@
+<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#">
+
+  <!-- d0 is an empty dictionary -->
+  <prov:entity prov:id="d0">
+    <prov:type xsi:type="xsd:QName">prov:EmptyDictionary</prov:type>
+  </prov:entity>
+
+  <!-- d1 is a dictionary, with (so far) unknown content -->
+  <prov:entity prov:id="d1">
+    <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
+  </prov:entity>
+
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/Dict-5-KeyValuePair.xml	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,20 @@
+<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"/>
+  
+  <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:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/Dict-6-Membership.xml	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,30 @@
+<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="d">
+    <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
+  </prov:entity>
+
+  <prov:hadDictionaryMember>
+    <prov:dictionary prov:ref="d"/>
+    <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>
+
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/Dict-7-Insertion.xml	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,39 @@
+<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>
+  
+  <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>
+  
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/Dict-8-Removal.xml	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,41 @@
+<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>
+  
+  <prov:derivedByRemovalFrom>
+    <prov:newDictionary prov:ref="d2"/>
+    <prov:oldDictionary prov:ref="d1"/>
+    <prov:key>k1</prov:key>
+    <prov:key>k2</prov:key>
+  </prov:derivedByRemovalFrom>
+  
+</prov:document>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/Makefile	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,4 @@
+SCHEMA = ex.xsd
+
+validate: 
+	xmllint --noout --schema $(SCHEMA) *.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-44-xml-dict/xml/ex.xsd	Wed Jan 30 13:56:15 2013 -0500
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Just for validation of examples -->
+
+<xs:schema targetNamespace="http://example.com/ns/ex#"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns="http://example.com/ns/ex#"
+           elementFormDefault="qualified"
+           attributeFormDefault="qualified">
+
+    <xs:import namespace="http://www.w3.org/ns/prov#"
+            schemaLocation="../../../xml/schema/prov.xsd"/>
+
+    <xs:element name="how" type="xs:string" />
+
+    <xs:element name="content" type="xs:string" />
+
+    <xs:element name="version" type="xs:string" />
+
+    <xs:element name="host" type="xs:string" />
+
+    <xs:element name="port" type="xs:string" />
+
+    <xs:element name="parameter" type="xs:string" />
+
+    <xs:element name="circumstances" type="xs:string" />
+
+    <xs:element name="name" type="xs:string" />
+
+    <xs:element name="employee" type="xs:string" />
+
+    <xs:element name="label" type="xs:string" />
+
+    <xs:element name="perfrating" type="xs:string" />
+
+    <xs:element name="vizcolor" type="xs:string" />
+
+</xs:schema>