]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
Modified sample XML instance document for CollectionObject to match changes in schema.
authorAron Roberts <aron@socrates.berkeley.edu>
Mon, 16 Mar 2009 21:06:29 +0000 (21:06 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Mon, 16 Mar 2009 21:06:29 +0000 (21:06 +0000)
Updated comments, including reflecting new filenames.
Converted all horizontal tabs to 2 spaces.

sandbox/aron/schema/collectionObject.rng
sandbox/aron/schema/collectionObject.xml
sandbox/aron/schema/collectionObject.xsd
sandbox/aron/schema/collectionObjects.rng
sandbox/aron/schema/collectionObjects.xml
sandbox/aron/schema/hello.xsd
sandbox/aron/schema/serviceErrorResponse.rng
sandbox/aron/schema/serviceErrorResponse.xml

index e1d3c32ed2a5a14394293b3f6d5a2eab06c53797..c20542fa32a2f6cb0bb1c70886c65c5aae1b2067 100644 (file)
@@ -2,31 +2,31 @@
 
 <!--
 
-       collectionObject-full-ns.rng
-       
-       A schema defining the structure of an CollectionObject entity.
-               
-       This schema includes all of its components, rather than referring
-       to them via 'externalRef' references. As such, it can be used as the
-       basis for generating a W3C XML Schema (XSD) schema, via
-       James Clark's Trang utility (http://http://www.thaiopensource.com/relaxng/trang.html).
-       (Trang version 20081028 can't resolve such references.) 
-       
-       As a convenience, a 'rng-to-xsd.sh' script file, which trivially wraps Trang
-       to generate XSD from a RELAX NG schema, is provided elsewhere in this distribution.
-       
-       This schema also includes one rudimentary root namespace, scoped for the Release 0.1
-       "Hello World" demo.  We'll need to determine whether, and if so how, we can
-       accommodate multiple namespaces to compose entity objects from various schemas,
-       such as service metadata, and declarations for the default entity, a domain- or community-
-       provided entity, and site- or instance-specific version of an entity.
+  collectionObject.rng
+  
+  A schema defining the structure of an CollectionObject entity.
+    
+  This schema includes all of its components, rather than referring
+  to them via 'externalRef' references. As such, it can be used as the
+  basis for generating a W3C XML Schema (XSD) schema, via
+  James Clark's Trang utility (http://http://www.thaiopensource.com/relaxng/trang.html).
+  (Trang version 20081028 can't resolve such references.) 
+  
+  As a convenience, a 'rng-to-xsd.sh' script file, which trivially wraps Trang
+  to generate XSD from a RELAX NG schema, is provided elsewhere in this distribution.
+  
+  This schema also includes one rudimentary root namespace, scoped for the Release 0.1
+  "Hello World" demo.  We'll need to determine whether, and if so how, we can
+  accommodate multiple namespaces to compose entity objects from various schemas,
+  such as service metadata, and declarations for the default entity, a domain- or community-
+  provided entity, and site- or instance-specific version of an entity.
 
-       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/
-       
+  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: aron $
   $Revision: 57 $
   $Date: 2009-03-05 16:06:06 -0800 (Thu, 05 Mar 2009) $
 -->
 
 <element
-       name="collectionObject"
-       ns="http://collectionspace.org/hello"
-       xmlns="http://relaxng.org/ns/structure/1.0"
-       datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-       
-       
-       <!-- ######################################################################## -->
-       <!-- Service Metadata                                                         -->
-       <!-- ######################################################################## -->
-       
-       <!--
-               Data elements common to every entity object in the CollectionSpace system.
-               
-               This is an quickly conceived-of list for the Release 0.1 "Hello World" demo,
-               and is not intended to be definitive going forward; further definition
-               will be required.
-       -->
-       
-       <element
-               name="serviceMetadata">
-               
-               <!--
-                       A unique CollectionSpace system identifier (ID) for this
-                       entity record.  This is distinguished from any museum-created
-                       or other identifiers that might also be associated with it.
-                               
-                       Note: We may wish to think further about what this element name should be.
-               -->
-               <element name="collectionSpaceId">
-                       <!--
-                               Note: We may potentially wish to specify a regex-type pattern
-                               here for further validating these IDs.
-                       -->
-                       <data type="string" />
-               </element>
-               
-               <!--
-                       All of the data elements after this point are fully optional.
-                       
-                       It's possible we may never want or need to pass these in
-                       routine message payloads, and if so, this merely constitutes
-                       notes/documentation on a few representative types of data that
-                       we might additionally store as system metadata, beyond an identifier.
-                       
-                       It's also possible that we might offer a service to provide this
-                       system metadata for any object, so that, for instance, a client
-                       might be able to retrieve the full modification history for an object.
-                       This *may* even already be envisioned for an already defined or
-                       candidate service ...
-               -->
-               
-                       <!--
-                               A timestamp for the creation of this entity record, as specified in
-                               http://www.w3.org/TR/xmlschema-2/#dateTime
-                       -->
-                       <optional>
-                               <element name="created">
-                                       <choice>
-                                               <data type="dateTime" />
-                                               <empty />
-                                       </choice>
-                               </element>
-                       </optional>
-               
-                       <!-- The system Principal that created this entity record -->
-                       <optional>
-                               <element name="createdBy">
-                                       <choice>
-                                               <data type="string" />
-                                               <empty />
-                                       </choice>
-                               </element>
-                       </optional>
-       
-                       <!-- 
-                               Note: Do we also need 'acting as designate for' information here,
-                               for cases where one system Principal created this entity while
-                               acting as a designate for another Principal?
-                       -->
-               
-                       <!--
-                               A timestamp for the last modification of this entity record, as specified in
-                               http://www.w3.org/TR/xmlschema-2/#dateTime
-                       -->
-                       <optional>
-                               <element name="lastModified">
-                                       <choice>
-                                               <data type="dateTime" />
-                                               <empty />
-                                       </choice>
-                               </element>
-                       </optional>
-               
-                       <!-- The system Principal that created this entity record -->
-                       <optional>
-                               <element name="lastModifiedBy">
-                                       <choice>
-                                               <data type="string" />
-                                               <empty />
-                                       </choice>
-                               </element>
-                       </optional>
-       
-                       <!-- 
-                               Note: Do we also need 'acting as designate for' information here,
-                               for cases where one system Principal modified this entity while
-                               acting as a designate for another Principal?
-                       -->
-                       
-                       <!--
-                               Patrick mentioned the concept of 'valid to/from' timestamps.
-                               If this applied to entity objects, not to schema, we might
-                               explore that further as another possible type of system metadata. 
-                       -->
-                       
-       </element>
+  name="collectionObject"
+  ns="http://collectionspace.org/hello"
+  xmlns="http://relaxng.org/ns/structure/1.0"
+  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  
+  
+  <!-- ######################################################################## -->
+  <!-- Service Metadata                                                         -->
+  <!-- ######################################################################## -->
+  
+  <!--
+    Data elements common to every entity object in the CollectionSpace system.
+    
+    This is an quickly conceived-of list for the Release 0.1 "Hello World" demo,
+    and is not intended to be definitive going forward; further definition
+    will be required.
+  -->
+  
+  <element
+    name="serviceMetadata">
+    
+    <!--
+      A unique CollectionSpace system identifier (ID) for this
+      entity record.  This is distinguished from any museum-created
+      or other identifiers that might also be associated with it.
+        
+      Note: We may wish to think further about what this element name should be.
+    -->
+    <element name="collectionSpaceId">
+      <!--
+        Note: We may potentially wish to specify a regex-type pattern
+        here for further validating these IDs.
+      -->
+      <data type="string" />
+    </element>
+    
+    <!--
+      All of the data elements after this point are fully optional.
+      
+      It's possible we may never want or need to pass these in
+      routine message payloads, and if so, this merely constitutes
+      notes/documentation on a few representative types of data that
+      we might additionally store as system metadata, beyond an identifier.
+      
+      It's also possible that we might offer a service to provide this
+      system metadata for any object, so that, for instance, a client
+      might be able to retrieve the full modification history for an object.
+      This *may* even already be envisioned for an already defined or
+      candidate service ...
+    -->
+    
+      <!--
+        A timestamp for the creation of this entity record, as specified in
+        http://www.w3.org/TR/xmlschema-2/#dateTime
+      -->
+      <optional>
+        <element name="created">
+          <choice>
+            <data type="dateTime" />
+            <empty />
+          </choice>
+        </element>
+      </optional>
+    
+      <!-- The system Principal that created this entity record -->
+      <optional>
+        <element name="createdBy">
+          <choice>
+            <data type="string" />
+            <empty />
+          </choice>
+        </element>
+      </optional>
+  
+      <!-- 
+        Note: Do we also need 'acting as designate for' information here,
+        for cases where one system Principal created this entity while
+        acting as a designate for another Principal?
+      -->
+    
+      <!--
+        A timestamp for the last modification of this entity record, as specified in
+        http://www.w3.org/TR/xmlschema-2/#dateTime
+      -->
+      <optional>
+        <element name="lastModified">
+          <choice>
+            <data type="dateTime" />
+            <empty />
+          </choice>
+        </element>
+      </optional>
+    
+      <!-- The system Principal that created this entity record -->
+      <optional>
+        <element name="lastModifiedBy">
+          <choice>
+            <data type="string" />
+            <empty />
+          </choice>
+        </element>
+      </optional>
+  
+      <!-- 
+        Note: Do we also need 'acting as designate for' information here,
+        for cases where one system Principal modified this entity while
+        acting as a designate for another Principal?
+      -->
+      
+      <!--
+        Patrick mentioned the concept of 'valid to/from' timestamps.
+        If this applied to entity objects, not to schema, we might
+        explore that further as another possible type of system metadata. 
+      -->
+      
+  </element>
 
 
-       <!-- ######################################################################## -->
-       <!-- Default CollectionObject                                                 -->
-       <!-- ######################################################################## -->
+  <!-- ######################################################################## -->
+  <!-- Default CollectionObject                                                 -->
+  <!-- ######################################################################## -->
 
-       <!-- The default CollectionSpace schema for an entity object (extremely simplified). -->
+  <!-- The default CollectionSpace schema for an entity object (extremely simplified). -->
 
-       <element
-               name="defaultCollectionObject">
-               
-               <!--
-                       The following data elements are taken from the Basic section,
-                       Object ID Information sub-section, of the Object Data Entry wireframe
-                       
-                       See:
-                       
-                       http://wiki.collectionspace.org/display/collectionspace/Wireframes+-+Object+Data+Entry
-                       and
-                       http://wiki.collectionspace.org/display/collectionspace/Hello+World+(Release+0.1)+Functionality+Requirements
-                       
-               -->
-       
-               <!-- Allows child elements to appear in any order -->
-               <interleave>
-               
-                       <element name="objectNumber">
-                               <!--
-                                       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>
-       
-                       <element name="otherNumber">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-               
-                       <element name="briefDescription">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-               
-                       <element name="comments">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-               
-                       <element name="distinguishingFeatures">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-               
-                       <element name="objectName">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-               
-                       <element name="responsibleDepartment">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-               
-                       <element name="title">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-       
-               </interleave>
-                               
-       </element>      
+  <element
+    name="defaultCollectionObject">
+    
+    <!--
+      The following data elements are taken from the Basic section,
+      Object ID Information sub-section, of the Object Data Entry wireframe
+      
+      See:
+      
+      http://wiki.collectionspace.org/display/collectionspace/Wireframes+-+Object+Data+Entry
+      and
+      http://wiki.collectionspace.org/display/collectionspace/Hello+World+(Release+0.1)+Functionality+Requirements
+      
+    -->
+  
+    <!-- Allows child elements to appear in any order -->
+    <interleave>
+    
+      <element name="objectNumber">
+        <!--
+          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>
+  
+      <element name="otherNumber">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+    
+      <element name="briefDescription">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+    
+      <element name="comments">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+    
+      <element name="distinguishingFeatures">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+    
+      <element name="objectName">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+    
+      <element name="responsibleDepartment">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+    
+      <element name="title">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+  
+    </interleave>
+        
+  </element>  
 
-       <!-- A domain- or community-provided schema, if available, would go here -->
-       
-       <!-- An site- or instance-provided schema, if available, would go here. -->
-       
+  <!-- A domain- or community-provided schema, if available, would go here -->
+  
+  <!-- An site- or instance-provided schema, if available, would go here. -->
+  
     
 </element>
index 4fdd9d4889f213caa2c9fb02a4ad49a8889ba2ff..d266608e56ec5a16c6ef589de19329a0f931a0b3 100644 (file)
@@ -2,13 +2,13 @@
 
 <!--
 
-       collectionObject-ns.xml
+  collectionObject.xml
 
-       A hypothetical, skeletal instance of an CollectionObject payload,
-       represented as an XML document, in a rudimentary root namespace,
-       scoped for the Release 0.1 "Hello World" demo.
-       
-       This is created for the CollectionSpace system, http://www.collectionspace.org/
+  A hypothetical, skeletal instance of an CollectionObject payload,
+  represented as an XML document, in a rudimentary root namespace,
+  scoped for the Release 0.1 "Hello World" demo.
+  
+  This document was created for the CollectionSpace system, http://www.collectionspace.org/
 
   $Author: aron $
   $Revision: 509 $
 -->
 
 <collectionObject
-       xmlns="http://collectionspace.org/hello">
+  xmlns="http://collectionspace.org/hello">
+
 
-       <serviceMetadata>
-       
-               <!-- An entirely arbitrary examle -->
-               <collectionSpaceId>org.collectionspace.797220effa5fa160</collectionSpaceId>
-               
-       </serviceMetadata>
-       
-       
-       <!--
-               Data below was taken from the following item in the online catalog
-               of the Museum of the Moving Image in Astoria, NY:
-               
-               http://collection.movingimage.us/index.php?g=detail&object_id=64117
-               
-               The choice of this item was in turn inspired by William Gibson's short story,
-               The Gernsback Continuum:
-               
-               http://www.americanheritage.com/articles/magazine/it/1988/1/1988_1_34.shtml
-       -->
+  <serviceMetadata>
+  
+    <!-- An entirely arbitrary example -->
+    <collectionSpaceId>org.collectionspace.797220effa5fa160</collectionSpaceId>
+    
+  </serviceMetadata>
 
 
-       <defaultCollectionObject>
-       
-               <objectNumber>1984.021.0049</objectNumber>
-       
-               <objectName> Radio News, vol. 10, no. 2, August 1928</objectName>
-       
-               <!-- Linebreaks were added to the following description for readability -->
-               <briefDescription>Radio News, August 1928. The cover of this issue features an
+  <defaultCollectionObject>
+
+    <!--
+      Data below was taken from the following item in the online catalog
+      of the Museum of the Moving Image in Astoria, NY:
+      
+      http://collection.movingimage.us/index.php?g=detail&object_id=64117
+      
+      The choice of this item was in turn inspired by William Gibson's short story,
+      The Gernsback Continuum:
+      
+      http://www.americanheritage.com/articles/magazine/it/1988/1/1988_1_34.shtml
+    -->
+  
+    <objectNumber>1984.021.0049</objectNumber>
+  
+    <objectName> Radio News, vol. 10, no. 2, August 1928</objectName>
+  
+    <!-- Linebreaks were added to the following description for readability -->
+    <briefDescription>Radio News, August 1928. The cover of this issue features an
 illustration of a man and woman watching an early "radio movie." Text on
 the cover reads, "Radio's Greatest Magazine / Radio News / August 25
 Cents / Over 200 illustrations / Edited by Hugo Gernsback / Radio Movies
@@ -62,25 +62,12 @@ by an article about the radio movie receiver system invented by C.
 Francis Jenkins. The article includes drawings illustrating the layout
 of the sytem.</briefDescription>
 
-       </defaultCollectionObject>
-       
+   <otherNumber></otherNumber>
+   <comments></comments>
+   <distinguishingFeatures></distinguishingFeatures>
+   <responsibleDepartment></responsibleDepartment>
+   <title></title>
 
-<!--
-  <sampleMmiCollectionObject>
-  
-       <artifactClass>Books, literature, and periodicals</artifactClass>
-       
-       <format>Magazine</format>
-       
-       <material>Paper</material>
-       
-       <overallDimensions>
-               <height>11.75</height>
-               <width>8.75</width>
-               <measurementUnit>in</measurementUnit>
-       </overallDimensions>
-       
-  </sampleMmiCollectionObject>
--->  
+  </defaultCollectionObject>
   
 </collectionObject>
index cc8d30e17e2e6113b96e3cd16fc0ea7bfd718daf..4fb5a415cc9415c06f05cfb13635b90fd03d594c 100644 (file)
     <xs:complexType>
       <xs:sequence>
         <xs:element ref="hello:collectionSpaceId"/>
-        <xs:element ref="hello:created"/>
-        <xs:element ref="hello:createdBy"/>
-        <xs:element ref="hello:lastModified"/>
-        <xs:element ref="hello:lastModifiedBy"/>
+        <xs:element minOccurs="0" ref="hello:created"/>
+        <xs:element minOccurs="0" ref="hello:createdBy"/>
+        <xs:element minOccurs="0" ref="hello:lastModified"/>
+        <xs:element minOccurs="0" ref="hello:lastModifiedBy"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
     <xs:complexType>
       <xs:all>
         <xs:element ref="hello:objectNumber"/>
-        <xs:element minOccurs="0" ref="hello:otherNumber"/>
-        <xs:element minOccurs="0" ref="hello:briefDescription"/>
-        <xs:element minOccurs="0" ref="hello:comments"/>
-        <xs:element minOccurs="0" ref="hello:distinguishingFeatures"/>
-        <xs:element minOccurs="0" ref="hello:objectName"/>
-        <xs:element minOccurs="0" ref="hello:responsibleDepartment"/>
-        <xs:element minOccurs="0" ref="hello:title"/>
+        <xs:element ref="hello:otherNumber"/>
+        <xs:element ref="hello:briefDescription"/>
+        <xs:element ref="hello:comments"/>
+        <xs:element ref="hello:distinguishingFeatures"/>
+        <xs:element ref="hello:objectName"/>
+        <xs:element ref="hello:responsibleDepartment"/>
+        <xs:element ref="hello:title"/>
       </xs:all>
     </xs:complexType>
   </xs:element>
index d0116e585713832585cec64796ecde446cb9cfcf..2df8c8a2316a87882222143417085cdce4e7bbfb 100644 (file)
@@ -2,26 +2,26 @@
 
 <!--
 
-       collectionObjects.rng
-       
-       A schema defining the structure of an CollectionObject collection
-       (list of multiple CollectionObjects).
-       
-       This schema includes all of its components, rather than referring
-       to them via 'externalRef' references. As such, it can be used as the
-       basis for generating a W3C XML Schema (XSD) schema, via
-       James Clark's Trang utility (http://http://www.thaiopensource.com/relaxng/trang.html).
-       (Trang version 20081028 can't resolve such references.) 
-       
-       As a convenience, a 'rng-to-xsd.sh' script file, which trivially wraps Trang
-       to generate XSD from a RELAX NG schema, is provided elsewhere in this distribution.
+  collectionObjects.rng
+  
+  A schema defining the structure of an CollectionObject collection
+  (list of multiple CollectionObjects).
+  
+  This schema includes all of its components, rather than referring
+  to them via 'externalRef' references. As such, it can be used as the
+  basis for generating a W3C XML Schema (XSD) schema, via
+  James Clark's Trang utility (http://http://www.thaiopensource.com/relaxng/trang.html).
+  (Trang version 20081028 can't resolve such references.) 
+  
+  As a convenience, a 'rng-to-xsd.sh' script file, which trivially wraps Trang
+  to generate XSD from a RELAX NG schema, is provided elsewhere in this distribution.
 
-       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/
-       
+  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: aron $
   $Revision: 57 $
   $Date: 2009-03-05 16:06:06 -0800 (Thu, 05 Mar 2009) $
 -->
 
 <element
-       name="collectionObjects"
-       ns="http://collectionspace.org/hello"
-       xmlns="http://relaxng.org/ns/structure/1.0"
-       datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  name="collectionObjects"
+  ns="http://collectionspace.org/hello"
+  xmlns="http://relaxng.org/ns/structure/1.0"
+  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
 
-       <!--
-               Sanjay has used a different naming convention in the Person prototype,
-               which would be equivalent here to "collection-object-list-item", rather than
-               to "collectionObjectListItem", as used below.
-               
-               We may want to standardize on use of CamelCase or hyphenated lowercase throughout, or
-               else establish a convention for list items which is distinct from that convention.
-       -->
-       
-       <zeroOrMore>
-       
-               <element
-                       name="collectionObjectListItem">
-                       
-                       <element name="collectionSpaceId">
-                               <data type="string" />
-                       </element>
-       
-                       <element name="objectNumber">
-                               <data type="normalizedString">
-                                       <param name="minLength">1</param>
-                               </data>
-                       </element>
-       
-                       <element name="objectName">
-                               <choice>
-                                       <data type="string" />
-                                       <empty />
-                               </choice>
-                       </element>
-       
-                       <element name="uri">
-                               <data type="anyURI" />
-                       </element>
+  <!--
+    Sanjay has used a different naming convention in the Person prototype,
+    which would be equivalent here to "collection-object-list-item", rather than
+    to "collectionObjectListItem", as used below.
+    
+    We may want to standardize on use of CamelCase or hyphenated lowercase throughout, or
+    else establish a convention for list items which is distinct from that convention.
+  -->
+  
+  <zeroOrMore>
+  
+    <element
+      name="collectionObjectListItem">
+      
+      <element name="collectionSpaceId">
+        <data type="string" />
+      </element>
+  
+      <element name="objectNumber">
+        <data type="normalizedString">
+          <param name="minLength">1</param>
+        </data>
+      </element>
+  
+      <element name="objectName">
+        <choice>
+          <data type="string" />
+          <empty />
+        </choice>
+      </element>
+  
+      <element name="uri">
+        <data type="anyURI" />
+      </element>
 
-               </element>
-               
-       </zeroOrMore>
+    </element>
+    
+  </zeroOrMore>
     
 </element>
index abd74ef3501fcc9d0400630eb24ef756b4cf694b..3c77ddca0cb1a548a33dd850ce97cd0bbd5157e6 100644 (file)
@@ -2,13 +2,13 @@
 
 <!--
 
-       collectionObjects.xml
+  collectionObjects.xml
 
-       A hypothetical, skeletal instance of an CollectionObjects list payload,
-       represented as an XML document, in a rudimentary root namespace,
-       scoped for the Release 0.1 "Hello World" demo.
-       
-       This is created for the CollectionSpace system, http://www.collectionspace.org/
+  A hypothetical, skeletal instance of an CollectionObjects list payload,
+  represented as an XML document, in a rudimentary root namespace,
+  scoped for the Release 0.1 "Hello World" demo.
+  
+  This is  created for the CollectionSpace system, http://www.collectionspace.org/
 
   $Author: aron $
   $Revision: 509 $
 -->
 
 <collectionObjects
-       xmlns="http://collectionspace.org/hello">
-
-       <collectionObjectListItem>
-               <collectionSpaceId>org.collectionspace.797220effa5fa160</collectionSpaceId>
-               <objectNumber>1984.021.0049</objectNumber>
-               <objectName>Radio News, vol. 10, no. 2, August 1928</objectName>
-               <uri>/collectionObjects/1984.021.0049</uri>
-       </collectionObjectListItem>
-
-       <collectionObjectListItem>
-               <collectionSpaceId>org.collectionspace.68ac7dc8f9e743</collectionSpaceId>
-               <objectNumber>1997.005.0437</objectNumber>
-               <objectName>Toy, Gotham City Police Helicopter, 1992</objectName>
-               <uri>/collectionObjects/1997.005.0437</uri>
-       </collectionObjectListItem>
+  xmlns="http://collectionspace.org/hello">
+
+  <collectionObjectListItem>
+    <collectionSpaceId>org.collectionspace.797220effa5fa160</collectionSpaceId>
+    <objectNumber>1984.021.0049</objectNumber>
+    <objectName>Radio News, vol. 10, no. 2, August 1928</objectName>
+    <uri>/collectionObjects/1984.021.0049</uri>
+  </collectionObjectListItem>
+
+  <collectionObjectListItem>
+    <collectionSpaceId>org.collectionspace.68ac7dc8f9e743</collectionSpaceId>
+    <objectNumber>1997.005.0437</objectNumber>
+    <objectName>Toy, Gotham City Police Helicopter, 1992</objectName>
+    <uri>/collectionObjects/1997.005.0437</uri>
+  </collectionObjectListItem>
   
 </collectionObjects>
index fd13139851312c1785a3127fe15c01e04537cb99..f25188f447801342083182077663c2adca59c5e2 100644 (file)
@@ -7,23 +7,23 @@
   version="0.1"
 >
 
-       <!--
-               Including multiple schemas via an 'include' directive here does work,
-               but results in duplicate declarations for several data elements.
-               
-               As a workaround, both schemas are included in full here.  Several
-               child elements of collectionObject (a single entity) are merely
-               referenced from within collectionObjects (a list).
-       -->
-       
-       <!-- xs:include schemaLocation="collectionObject-ns-no-prefix.xsd"/ -->
-       <!-- xs:include schemaLocation="collectionObjects.xsd"/ -->
-       
-       <!--
-               Sanjay noted:
-               avoid XmlRootElement nightnmare, see
-               http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html
-       -->
+  <!--
+    Including multiple schemas via an 'include' directive here does work,
+    but results in duplicate declarations for several data elements.
+    
+    As a workaround, both schemas are included in full here.  Several
+    child elements of collectionObject (a single entity) are merely
+    referenced from within collectionObjects (a list).
+  -->
+  
+  <!-- xs:include schemaLocation="collectionObject-ns-no-prefix.xsd"/ -->
+  <!-- xs:include schemaLocation="collectionObjects.xsd"/ -->
+  
+  <!--
+    Sanjay noted:
+    avoid XmlRootElement nightnmare, see
+    http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html
+  -->
 
   <xs:element name="collectionObject">
     <xs:complexType>
     <xs:complexType>
       <xs:all>
         <xs:element ref="objectNumber"/>
-        <xs:element minOccurs="0" ref="otherNumber"/>
-        <xs:element minOccurs="0" ref="briefDescription"/>
-        <xs:element minOccurs="0" ref="comments"/>
-        <xs:element minOccurs="0" ref="distinguishingFeatures"/>
-        <xs:element minOccurs="0" ref="objectName"/>
-        <xs:element minOccurs="0" ref="responsibleDepartment"/>
-        <xs:element minOccurs="0" ref="title"/>
+        <xs:element ref="otherNumber"/>
+        <xs:element ref="briefDescription"/>
+        <xs:element ref="comments"/>
+        <xs:element ref="distinguishingFeatures"/>
+        <xs:element ref="objectName"/>
+        <xs:element ref="responsibleDepartment"/>
+        <xs:element ref="title"/>
       </xs:all>
     </xs:complexType>
   </xs:element>
     </xs:complexType>
   </xs:element>
   <!--
-       Note CamelCase here; Sanjay uses the style "collection-object-list-item", and
-       we can and should revert to that if needed.
+    Note CamelCase here; Sanjay uses the style "collection-object-list-item", and
+    we can and should revert to that if needed.
   -->
   <xs:element name="collectionObjectListItem">
     <xs:complexType>
index 0e8fe88a213c79ad62fb58f6804c7c4c538020e8..f3f4dc4a1abcb5be815360e6c3ada97009cbb61f 100644 (file)
@@ -2,16 +2,16 @@
 
 <!--
 
-       serviceErrorResponse.rng
+  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/
+  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$
 
 <!-- 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">
+  ns="http://collectionspace.org/hello"
+  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>
-       
+  <!--
+    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>
index 8d619181f0e2d5a1b585726535801f3a8d737442..f07d50b9c3b71e38b2774c1983070f5a6ee8efe4 100644 (file)
 -->
 
 <!--
-       Note: this root element may require a namespace, and it and its
-       child elements may require the corresponding namespace prefix.
+  Note: this root element may require a namespace, and it and its
+  child elements may require the corresponding namespace prefix.
 -->
 <error
-       xmlns="http://collectionspace.org/hello">
-       <errorCode>1005</errorCode>
-       <errorMessage></errorMessage>
+  xmlns="http://collectionspace.org/hello">
+  <errorCode>1005</errorCode>
+  <errorMessage></errorMessage>
 </error>