]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-20: Added our Release 0.1 namespace to the RELAX NG schema document and exampl...
authorAron Roberts <aron@socrates.berkeley.edu>
Sat, 14 Mar 2009 00:24:15 +0000 (00:24 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Sat, 14 Mar 2009 00:24:15 +0000 (00:24 +0000)
Generated a W3C XML Schema (XSD) schema document for service error responses.

sandbox/aron/schema/serviceErrorResponse.rng
sandbox/aron/schema/serviceErrorResponse.xml
sandbox/aron/schema/serviceErrorResponse.xsd [new file with mode: 0644]

index 2af4835404681aafc9249b7673d04109eb8c5c39..0e8fe88a213c79ad62fb58f6804c7c4c538020e8 100644 (file)
@@ -21,6 +21,7 @@
 
 <!-- The result of the operation. -->
 <element name="error"
+       ns="http://collectionspace.org/hello"
        xmlns="http://relaxng.org/ns/structure/1.0"
        datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
 
index 2904c361ec8e1958b667ff2fff5036a88afeb6b0..8d619181f0e2d5a1b585726535801f3a8d737442 100644 (file)
@@ -19,7 +19,8 @@
        Note: this root element may require a namespace, and it and its
        child elements may require the corresponding namespace prefix.
 -->
-<error>
+<error
+       xmlns="http://collectionspace.org/hello">
        <errorCode>1005</errorCode>
        <errorMessage></errorMessage>
 </error>
diff --git a/sandbox/aron/schema/serviceErrorResponse.xsd b/sandbox/aron/schema/serviceErrorResponse.xsd
new file mode 100644 (file)
index 0000000..f081537
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://collectionspace.org/hello" xmlns="http://collectionspace.org/hello">
+  <xs:element name="error">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="errorCode"/>
+        <xs:element ref="errorMessage"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="errorCode">
+    <xs:simpleType>
+      <xs:restriction base="xs:normalizedString">
+        <xs:minLength value="1"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+  <xs:element name="errorMessage">
+    <xs:simpleType>
+      <xs:union memberTypes="xs:normalizedString">
+        <xs:simpleType>
+          <xs:restriction base="xs:token">
+            <xs:length value="0"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:union>
+    </xs:simpleType>
+  </xs:element>
+</xs:schema>