Add an ex.xsd schema to validate XML examples that use the ex: namespace.
authorCurt Tilmes <Curt.Tilmes@nasa.gov>
Fri, 14 Sep 2012 08:54:29 -0400
changeset 4464 7009af43e1aa
parent 4463 394932b3ba52
child 4465 31b59066eb69
Add an ex.xsd schema to validate XML examples that use the ex: namespace.
examples/eg-40-xml-examples-by-term/xml/Plan.xml
examples/eg-40-xml-examples-by-term/xml/ex.xsd
--- a/examples/eg-40-xml-examples-by-term/xml/Plan.xml	Fri Sep 14 08:40:44 2012 -0400
+++ b/examples/eg-40-xml-examples-by-term/xml/Plan.xml	Fri Sep 14 08:54:29 2012 -0400
@@ -20,14 +20,14 @@
 			<prov:activity prov:ref="a"/>
 			<prov:agent prov:ref="ag1"/>
 			<prov:role>loggedInUser</prov:role>
-			<!--<ex:how>webapp<ex:how>-->
+			<ex:how>webapp</ex:how>
 		</prov:wasAssociatedWith>
 		<prov:wasAssociatedWith>
 			<prov:activity prov:ref="a"/>
 			<prov:agent prov:ref="ag2"/>
 			<prov:plan prov:ref="ex:wf"/>
 			<prov:role>designer</prov:role>
-			<!--<ex:content>project1<ex:content>-->
+			<ex:content>project1</ex:content>
 		</prov:wasAssociatedWith>
 	</prov:dependencies>
 </prov:records>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-40-xml-examples-by-term/xml/ex.xsd	Fri Sep 14 08:54:29 2012 -0400
@@ -0,0 +1,18 @@
+<?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:schema>