XSD for the pz2 format
authorDennis Schafroth <dennis@indexdata.com>
Fri, 22 Mar 2013 10:08:36 +0000 (11:08 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Fri, 22 Mar 2013 10:08:36 +0000 (11:08 +0100)
etc/pz2.xsd [new file with mode: 0644]

diff --git a/etc/pz2.xsd b/etc/pz2.xsd
new file mode 100644 (file)
index 0000000..d24b937
--- /dev/null
@@ -0,0 +1,31 @@
+<xs:schema 
+          attributeFormDefault="unqualified" 
+          elementFormDefault="qualified" 
+          xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
+          targetNamespace="http://www.indexdata.com/pazpar2/1.0"
+          xmlns:xs="http://www.w3.org/2001/XMLSchema"
+>
+
+  <xs:element name="collection" type="pz:collection" />
+
+  <xs:complexType name="collection">
+    <xs:sequence>
+      <xs:element name="record" type="pz:record" minOccurs="1" maxOccurs="unbounded" />
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="record">
+    <xs:sequence>
+      <xs:element name="metadata" type="pz:metadata" minOccurs="1" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="metadata">
+    <xs:simpleContent>
+      <xs:extension base="xs:string">
+       <xs:attribute type="xs:string" name="type" use="required" />
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+
+</xs:schema>