Minor revision to datatype for objectNumber in defaultCollectionObject.
<interleave>
<element name="objectNumber">
- <choice>
- <data type="string" />
- <empty />
- </choice>
+ <!--
+ This declaration specifies that the value of this element must never be empty (blank).
+ If that's not accurate, it should be redefined, perhaps to match other elements below.
+
+ Note: In a site- or instance-specific declaration - not in the default
+ definition here - we might wish to specify a regex-type pattern here for
+ further constraining valid object numbers.
+ -->
+ <data type="normalizedString">
+ <param name="minLength">1</param>
+ </data>
</element>
<optional>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+ serviceErrorResponse.rng
+
+ A schema defining the representation of the data returned,
+ as an error response, to a call to a service.
+
+ This schema was created for the CollectionSpace system,
+ http://www.collectionspace.org/
+
+ It is written in the XML syntax of the RELAX NG schema language,
+ http://relaxng.org/
+
+ $Author$
+ $Revision$
+ $Date$
+
+-->
+
+<!-- The result of the operation. -->
+<element name="error"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+ <!--
+ A service-dependent result code, which must be
+ at least one character in length.
+ -->
+ <element name="errorCode">
+ <data type="normalizedString">
+ <param name="minLength">1</param>
+ </data>
+ </element>
+
+ <!--
+ An (optional) service-dependent message,
+ presumably corresponding to the result code.
+ -->
+ <element name="errorMessage">
+ <choice>
+ <empty/>
+ <data type="normalizedString" />
+ </choice>
+ </element>
+
+</element>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+ serviceErrorResponse.xml
+
+ A hypothetical instance of an error response from a call to a service.
+
+ This document was created for the CollectionSpace system,
+ http://www.collectionspace.org/
+
+ $Author$
+ $Revision$
+ $Date$
+
+-->
+
+<!--
+ Note: this root element may require a namespace, and it and its
+ child elements may require the corresponding namespace prefix.
+-->
+<error>
+ <errorCode>1005</errorCode>
+ <errorMessage></errorMessage>
+</error>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-
- serviceResponse.rng
-
- A schema defining the representation of the data returned in
- response to a request. This may include a result code and
- message, as well as a block containing any arbitrary XML-based data.
-
- This schema was created for the CollectionSpace system,
- http://www.collectionspace.org/
-
- It is written in the XML syntax of the RELAX NG schema language,
- http://relaxng.org/
-
- $Author$
- $Revision$
- $Date$
-
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
- <start>
-
- <element
- name="response">
-
- <!-- ######################### -->
- <!-- Result -->
- <!-- ######################### -->
-
- <!-- The result of the operation. -->
- <element name="result">
-
- <!--
- A service-dependent result code, which must be
- at least one character in length.
- -->
- <element name="resultCode">
- <data type="normalizedString">
- <param name="minLength">1</param>
- </data>
- </element>
-
- <!--
- An (optional) service-dependent message,
- presumably corresponding to the result code.
- -->
- <element name="resultMessage">
- <choice>
- <empty/>
- <data type="normalizedString" />
- </choice>
- </element>
-
- </element>
-
-
- <!-- ######################### -->
- <!-- Data -->
- <!-- ######################### -->
-
- <!--
- The data returned to the caller after performing the operation.
-
- The data may be any one of the following:
- - Empty (blank);
- - Any text; or
- - Any combination of elements, each of which may have attributes,
- text nodes, and child elements.
- -->
-
- <!--
- Note: we may want to add a MIME type attribute, and to consider how to
- structure this for potentially returning multipart MIME data or the like,
- for use cases where we might need to return multiple media objects, etc.
- -->
- <element name="data">
- <choice>
- <empty/>
- <text/>
- <ref name="anyElement"/>
- </choice>
- </element>
-
- </element>
-
- </start>
-
- <!--
- See the "Name Classes" section in the RELAX NG tutorial,
- http://relaxng.org/tutorial-20011203.html#IDAFLZR
- -->
- <define name="anyElement">
- <element>
- <anyName/>
- <zeroOrMore>
- <choice>
- <attribute>
- <anyName/>
- </attribute>
- <text/>
- <ref name="anyElement"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
-
-</grammar>
-
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-
- serviceResponse.xml
-
- A hypothetical instance of an serviceResponse document.
-
- This document was created for the CollectionSpace system,
- http://www.collectionspace.org/
-
- $Author$
- $Revision$
- $Date$
-
--->
-
-<!--
- Note: this root element may require a namespace, and it and its
- child elements may require the corresponding namespace prefix.
--->
-<response>
- <result>
- <resultCode>1005</resultCode>
- <resultMessage></resultMessage>
- </result>
- <!--
- The 'data' element below may be empty, contain any text,
- or consist of any XML element, which may have attributes,
- text nodes, and child elements.
- -->
- <data>foo</data>
-</response>