cansas1d.xsd

From canSAS

This XML Schema defines the rules for the canSAS 1-D reduced small-angle scattering data format in XML. Refer to the Documentation for more explanation. Where the documentation and this XML Schema differ, the XML Schema takes precedence.

XML Schema: cansas1d.xsd

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xsd-documentation.xsl" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
   targetNamespace="http://www.smallangles.net/cansas1d"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:tns="http://www.smallangles.net/cansas1d"
   elementFormDefault="qualified">

   <complexType name="floatUnitType">
      <simpleContent>
         <extension base="float">
            <attribute name="unit" type="string" use="required">
               <annotation>
                  <documentation>
                     <DT>@unit</DT>
                     <DD>
                        Data unit to be given in standard SI
                        abbreviations (e.g., m, cm, mm, nm, K)
                        with the following exceptions:
                        <OL>
                           <LI>um=micrometres</LI>
                           <LI>C=celsius</LI>
                           <LI>A=Angstroms</LI>
                           <LI>percent=%.</LI>
                           <LI>fraction</LI>
                           <LI>a.u.=arbitrary units</LI>
                           <LI>
                              none=no units are relevant (such
                              as dimensionless)
                           </LI>
                        </OL>
                     </DD>
                  </documentation>
               </annotation>
            </attribute>
         </extension>
      </simpleContent>
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <group name="positionGroup">
      <sequence>
         <annotation>
            <documentation>
               <DT>x, y, z</DT>
               <DD>
                  Coordinates for (x, y, z) values representing a
                  position or dimension. Unit must be specified
                  for each.
               </DD>
            </documentation>
         </annotation>
         <element name="x" type="tns:floatUnitType" minOccurs="0"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>position/x</DT>
                  <DD>
                     [0..1] Translation in the horizontal
                     direction, orthogonal to Y and Z. Positive X
                     direction increases as defined by Y and Z.
                     Unit must be specified.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="y" type="tns:floatUnitType" minOccurs="0"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>position/y</DT>
                  <DD>
                     [0..1] Translation along the vertical
                     gravitational direction. Positive direction
                     increases upward. Unit must be specified.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="z" type="tns:floatUnitType" minOccurs="0"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>position/z</DT>
                  <DD>
                     [0..1] Translation along the beam direction.
                     Positive direction increases from source
                     towards detector. Unit must be specified.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
   </group>

   <complexType name="positionType">
      <group ref="tns:positionGroup" />
      <attribute name="name" type="string" use="optional" />
   </complexType>

   <group name="orientationGroup">
      <sequence>
         <annotation>
            <documentation>
               <DT>roll, pitch, yaw</DT>
               <DD>
                  Coordinates for (roll, pitch, yaw) values
                  representing an orientation or rotation. Unit
                  must be specified for each.
               </DD>
            </documentation>
         </annotation>
         <element name="roll" type="tns:floatUnitType" minOccurs="0"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>orientation/roll</DT>
                  <DD>
                     [0..1] Rotation about about the Z axis. Unit
                     must be specified.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="pitch" type="tns:floatUnitType" minOccurs="0"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>orientation/pitch</DT>
                  <DD>
                     [0..1] Rotation about about the X axis. Unit
                     must be specified.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="yaw" type="tns:floatUnitType" minOccurs="0"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>orientation/yaw</DT>
                  <DD>
                     [0..1] Rotation about about the Y axis. Unit
                     must be specified.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
   </group>

   <complexType name="orientationType">
      <group ref="tns:orientationGroup" />
      <attribute name="name" type="string" use="optional" />
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <complexType name="IdataType">
      <sequence>
         <element name="Q" minOccurs="1" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/Q</DT>
                  <DD>
                     [1..1] Q = (4 pi / lambda) sin(theta)
                     <br />
                     where lambda is the wavelength of the
                     radiation and 2theta is the angle through
                     which the detected radiation has been
                     scattered.
                  </DD>
               </documentation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/Q/@unit</DT>
                  <DD>
                     [1..1] Required unit for Q. (See @unit for
                     details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="I" minOccurs="1" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/I</DT>
                  <DD>
                     [1..1] Intensity of the detected radiation.
                  </DD>
               </documentation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/I/@unit</DT>
                  <DD>
                     [1..1] Required unit for I. (See @unit for
                     details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="Qdev" minOccurs="1" maxOccurs="1"
            type="tns:floatUnitType" default="0">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/Qdev</DT>
                  <DD>
                     [0..1] Estimated standard deviation of Q.
                     Must specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASdata/Idata/Qdev/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for Qdev. (See @unit
                     for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="Idev" minOccurs="1" maxOccurs="1"
            type="tns:floatUnitType" default="0">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/Idev</DT>
                  <DD>
                     [1..1] Estimated standard deviation of I.
                     Must specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASdata/Idata/Idev/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for Idev. (See @unit
                     for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="Qfwhm" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType" default="0">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/Qfwhm</DT>
                  <DD>
                     [0..1] Q resolution of this datum, defined
                     as full-width in Q at half-maximum
                     intensity. Must specify the unit as an
                     attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASdata/Idata/Qfwhm/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for Qfwhm. (See @unit
                     for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="Qmean" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType" default="0">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata/Qmean</DT>
                  <DD>
                     [0..1] Mean value of Q for this datum. Must
                     specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASdata/Idata/Qmean/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for Qmean. (See @unit
                     for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="Shadowfactor" minOccurs="0" maxOccurs="1"
            type="float" default="1.0">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASdata/Idata/Shadowfactor
                  </DT>
                  <DD>
                     [0..1] Describes the adjustment due to the
                     beam stop penumbra. (This definition needs
                     revision. NIST?) NOTE: There is no "unit"
                     attribute.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
   </complexType>

   <complexType name="SASdataType">
      <sequence>
         <element name="Idata" minOccurs="1" maxOccurs="unbounded"
            type="tns:IdataType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata/Idata</DT>
                  <DD>
                     [1..inf] Idata describes a single SAS data
                     point.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
      <attribute name="name" type="string" use="optional">
         <annotation>
            <documentation>
               <DT>/SASroot/SASentry/SASdata/@name</DT>
               <DD>
                  [0..1] Optional string attribute to identify
                  this particular SASdata.
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <complexType name="SASsampleType">
      <sequence>
         <element name="ID" minOccurs="1" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/ID</DT>
                  <DD>
                     [1..1] Text string that identifies this
                     sample.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="thickness" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/thickness</DT>
                  <DD>
                     [0..1] Thickness of this sample. Must
                     specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/thickness/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for thickness. (See
                     @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="transmission" minOccurs="0" maxOccurs="1"
            type="float">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/transmission
                  </DT>
                  <DD>
                     [0..1] Transmission (1-attenuation) of this
                     sample. Express this as a fraction, not as a
                     percentage. NOTE: there is not "unit"
                     attribute.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="temperature" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/temperature</DT>
                  <DD>
                     [0..1] Temperature of this sample. Must
                     specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/temperature/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for temperature. (See
                     @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="position" minOccurs="0" maxOccurs="1"
            type="tns:positionType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/position</DT>
                  <DD>
                     [0..1] Location in X, Y, and Z of the
                     sample. Must specify the unit as an
                     attribute to each position.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/position/@name
                  </DT>
                  <DD>
                     Optional attribute to name this position.
                  </DD>
               </documentation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/position/x</DT>
                  <DD>[0..1] Location of the sample in X.</DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/position/x/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of x.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/position/y</DT>
                  <DD>[0..1] Location of the sample in Y.</DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/position/y/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of y.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/position/z</DT>
                  <DD>
                     [0..1] Location of the sample in Z. While
                     this is allowed by the standard, it does not
                     make much sense for small-angle scattering.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/position/z/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of z.
                     (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="orientation" minOccurs="0" maxOccurs="1"
            type="tns:orientationType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/orientation</DT>
                  <DD>
                     [0..1] Orientation (rotation) of the sample.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/@name
                  </DT>
                  <DD>
                     Optional attribute to name this orientation.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/roll
                  </DT>
                  <DD>
                     [0..1] Optional rotation of the sample about
                     the Z axis (roll).
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/roll/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of
                     roll. (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/pitch
                  </DT>
                  <DD>
                     [0..1] Optional rotation of the sample about
                     the X axis (pitch).
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/pitch/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of
                     pitch. (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/yaw
                  </DT>
                  <DD>
                     [0..1] Optional rotation of the sample about
                     the Y axis (yaw).
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASsample/orientation/yaw/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of
                     yaw. (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="details" minOccurs="0"
            maxOccurs="unbounded">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample/details</DT>
                  <DD>
                     [0..inf] Text string to supply additional
                     sample details.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
      <attribute name="name" type="string" use="optional">
         <annotation>
            <documentation>
               <DT>/SASroot/SASentry/SASsample/@name</DT>
               <DD>
                  [0..1] Optional attribute to name this sample.
                  (Should be the same as SASsample/ID)
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <complexType name="SASprocessType">
      <sequence>
         <element name="name" minOccurs="0" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASprocess/name</DT>
                  <DD>
                     [0..1] Optional name for this data
                     processing or analysis step.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="date" minOccurs="0" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASprocess/date</DT>
                  <DD>
                     [0..1] Optional date for this data
                     processing or analysis step. *** SHOULD WE
                     SPECIFY THE FORMAT FOR THE DATE? ***
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="description" minOccurs="0" maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASprocess/description
                  </DT>
                  <DD>
                     [0..1] Optional description for this data
                     processing or analysis step.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="term" minOccurs="0" maxOccurs="unbounded">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASprocess/term</DT>
                  <DD>
                     [0..1] This is used to specify the value of
                     a single variable, parameter, or term
                     related to the SASprocess step.
                  </DD>
               </documentation>
            </annotation>
            <complexType>
               <simpleContent>
                  <extension base="string">
                     <attribute name="name" type="string"
                        use="required">
                        <annotation>
                           <documentation>
                              <DT>
                                 /SASroot/SASentry/SASprocess/term/@name
                              </DT>
                              <DD>
                                 [1..1] Name of the term.
                              </DD>
                           </documentation>
                        </annotation>
                     </attribute>
                     <attribute name="unit" type="string"
                        use="optional">
                        <annotation>
                           <documentation>
                              <DT>
                                 /SASroot/SASentry/SASprocess/term/@unit
                              </DT>
                              <DD>
                                 [1..1] Unit (string) of the
                                 term. (See @unit for
                                 details.)
                              </DD>
                           </documentation>
                        </annotation>
                     </attribute>
                  </extension>
               </simpleContent>
            </complexType>
         </element>
         <element name="SASprocessnote" minOccurs="1"
            maxOccurs="unbounded">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASprocess/SASprocessnote
                  </DT>
                  <DD>
                     [1..inf] This element is used to describe
                     anything about SASprocess that is not
                     already described.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
      <attribute name="name" type="string" use="optional">
         <annotation>
            <documentation>
               <DT>/SASroot/SASentry/SASprocess/@name</DT>
               <DD>
                  [0..1] Optional attribute to provide a name for
                  this SASprocess. It is redundant with
                  /SASroot/SASentry/SASprocess/name but it is not
                  the same. It should probably be removed.
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <complexType name="SASsourceType">
      <sequence>
         <element name="radiation" minOccurs="1" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/radiation
                  </DT>
                  <DD>
                     [1..1] Name of the radiation used (neutron,
                     X-ray, synchrotron X-ray, Cu Ka X-ray tube,
                     ..."
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="beam_size" minOccurs="0" maxOccurs="1"
            type="tns:positionType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size
                  </DT>
                  <DD>
                     [0..1] Physical dimension of the beam
                     (incident on the sample). Note: If beam is
                     round, just use X dimension. Note: While Z
                     dimension is allowed by the standard, it
                     does not make sense for small-angle
                     scattering.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/@name
                  </DT>
                  <DD>
                     Optional attribute to clarify the name of
                     this beam size.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/x
                  </DT>
                  <DD>[0..1] Dimension of the beam size in X.</DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/x/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of x.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/y
                  </DT>
                  <DD>[0..1] Dimension of the beam size in Y.</DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/y/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of y.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/z
                  </DT>
                  <DD>
                     [0..1] Dimension of the beam size in Z.
                     While this is allowed by the standard, it
                     does not make much sense for small-angle
                     scattering.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_size/z/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of z.
                     (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="beam_shape" minOccurs="0" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/beam_shape
                  </DT>
                  <DD>
                     [0..1] Text description of the shape of the
                     beam (incident on the sample).
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="wavelength" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength
                  </DT>
                  <DD>
                     [0..1] wavelength of radiation incident on
                     the sample.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength/@unit
                  </DT>
                  <DD>
                     [1..1] wavelength of radiation requires a
                     unit to be specified. (See @unit for
                     details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="wavelength_min" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength_min
                  </DT>
                  <DD>
                     [0..1] Some facilities specify wavelength
                     using a range. The minimum of such a range
                     is given by wavelength_min.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength_min/@unit
                  </DT>
                  <DD>
                     [1..1] wavelength_min requires a unit to be
                     specified. (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="wavelength_max" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength_max
                  </DT>
                  <DD>
                     [0..1] Some facilities specify wavelength
                     using a range. The maximum of such a range
                     is given by wavelength_max.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength_max/@unit
                  </DT>
                  <DD>
                     [1..1] wavelength_max requires a unit to be
                     specified. (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="wavelength_spread" minOccurs="0"
            maxOccurs="1" type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength_spread
                  </DT>
                  <DD>
                     [0..1] Some facilities specify the width of
                     the wavelength spectrum. The minimum of such
                     a range is given by wavelength_spread.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource/wavelength_spread/@unit
                  </DT>
                  <DD>
                     [1..1] wavelength_spread requires a unit to
                     be specified. (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
      <attribute name="name" type="string" use="optional">
         <annotation>
            <documentation>
               <DT>
                  /SASroot/SASentry/SASinstrument/SASsource/@name
               </DT>
               <DD>
                  [0..1] Optional text description of the source
                  of the radiation (incident on the sample). This
                  can be different from
                  /SASroot/SASentry/SASinstrument/SASsource/radiation.
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <complexType name="SAScollimationType">
      <sequence>
         <element name="distance" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SAScollimation/distance
                  </DT>
                  <DD>
                     [0..1] Distance from this collimation
                     element to the sample.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SAScollimation/distance/@unit
                  </DT>
                  <DD>
                     [1..1] distance requires a unit to be
                     specified. (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="aperture" minOccurs="0"
            maxOccurs="unbounded">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SAScollimation/aperture
                  </DT>
                  <DD>[0..inf] Slit or aperture.</DD>
               </documentation>
            </annotation>
            <complexType>
               <sequence>
                  <element name="size" minOccurs="0" maxOccurs="1"
                     type="tns:positionType">
                     <annotation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size
                           </DT>
                           <DD>
                              [0..1] Opening dimensions of
                              this aperture.
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/@name
                           </DT>
                           <DD>
                              [1..1] Optional attribute to
                              clarify the name of this beam
                              size.
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/x
                           </DT>
                           <DD>
                              [0..1] Dimension of the aperture
                              in X.
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/x/@unit
                           </DT>
                           <DD>
                              [1..1] Required unit for the
                              dimension of x. (See @unit for
                              details.)
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/y
                           </DT>
                           <DD>
                              [0..1] Dimension of the aperture
                              in Y.
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/y/@unit
                           </DT>
                           <DD>
                              [1..1] Required unit for the
                              dimension of y. (See @unit for
                              details.)
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/z
                           </DT>
                           <DD>
                              [0..1] Dimension of the aperture
                              in Z. While this is allowed by
                              the standard, it does not make
                              much sense for small-angle
                              scattering.
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/size/z/@unit
                           </DT>
                           <DD>
                              [1..1] Required unit for the
                              dimension of z. (See @unit for
                              details.)
                           </DD>
                        </documentation>
                     </annotation>
                  </element>
                  <element name="distance" minOccurs="0"
                     maxOccurs="1" type="tns:floatUnitType">
                     <annotation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/distance
                           </DT>
                           <DD>
                              [0..1] Is this necessary? What
                              is the difference between
                              /SASroot/SASentry/SASinstrument/SAScollimation/distance
                              and
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/distance?
                           </DD>
                        </documentation>
                        <documentation>
                           <DT>
                              /SASroot/SASentry/SASinstrument/SAScollimation/aperture/distance/@unit
                           </DT>
                           <DD>
                              [1..1] distance requires a unit
                              to be specified. (See @unit for
                              details.)
                           </DD>
                        </documentation>
                     </annotation>
                  </element>
               </sequence>
               <attribute name="name" type="string"
                  use="optional">
                  <annotation>
                     <documentation>
                        <DT>
                           /SASroot/SASentry/SASinstrument/SAScollimation/aperture/@name
                        </DT>
                        <DD>
                           [0..1] Optional name for this
                           aperture.
                        </DD>
                     </documentation>
                  </annotation>
               </attribute>
               <attribute name="type" type="string"
                  use="optional">
                  <annotation>
                     <documentation>
                        <DT>
                           /SASroot/SASentry/SASinstrument/SAScollimation/aperture/@type
                        </DT>
                        <DD>
                           [1..1] Optional text to describe the
                           type aperture (pinhole, 4-blade
                           slit, Soller slit, ...).
                        </DD>
                     </documentation>
                  </annotation>
               </attribute>
            </complexType>
         </element>
      </sequence>
      <attribute name="name" type="string" use="optional">
         <annotation>
            <documentation>
               <DT>
                  /SASroot/SASentry/SASinstrument/SAScollimation/@name
               </DT>
               <DD>
                  [0..1] Optional text to describe this
                  collimation element. (This is redundant with,
                  but not the same as,
                  /SASroot/SASentry/SASinstrument/SAScollimation/name
                  and should be removed.)
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <complexType name="SASdetectorType">
      <sequence>
         <element name="name" minOccurs="1" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/name
                  </DT>
                  <DD>[1..1] Name of the detector.</DD>
               </documentation>
            </annotation>
         </element>
         <element name="SDD" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/SDD
                  </DT>
                  <DD>
                     [0..1] Distance between sample and detector.
                     Must specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/SDD/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for SDD. (See @unit for
                     details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="offset" minOccurs="0" maxOccurs="1"
            type="tns:positionType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset
                  </DT>
                  <DD>
                     [0..1] Offset of the detector position in X,
                     Y, and Z.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/@name
                  </DT>
                  <DD>
                     Optional attribute to clarify the name of
                     this beam size.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/x
                  </DT>
                  <DD>
                     [0..1] Offset of the detector position in X.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/x/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of x.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/y
                  </DT>
                  <DD>
                     [0..1] Offset of the detector position in Y.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/y/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of y.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/z
                  </DT>
                  <DD>
                     [0..1] Offset of the detector position in Z.
                     While this is allowed by the standard, it
                     does not make much sense for small-angle
                     scattering.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/offset/z/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of z.
                     (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="orientation" minOccurs="0" maxOccurs="1"
            type="tns:orientationType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation
                  </DT>
                  <DD>
                     [0..1] Orientation (rotation) of the
                     detector in roll, pitch, and yaw. Must
                     specify the unit as an attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/@name
                  </DT>
                  <DD>
                     Optional attribute to name this orientation.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/roll
                  </DT>
                  <DD>
                     [0..1] Optional rotation of the detector
                     about the Z axis (roll).
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/roll/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of
                     roll. (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/pitch
                  </DT>
                  <DD>
                     [0..1] Optional rotation of the detector
                     about the X axis (pitch).
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/pitch/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of
                     pitch. (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/yaw
                  </DT>
                  <DD>
                     [0..1] Optional rotation of the detector
                     about the Y axis (yaw).
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/orientation/yaw/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of
                     yaw. (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="beam_center" minOccurs="0" maxOccurs="1"
            type="tns:positionType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center
                  </DT>
                  <DD>
                     [0..1] Center of the beam on the detector in
                     X and Y.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/@name
                  </DT>
                  <DD>
                     Optional attribute to clarify the name of
                     this detector beam center.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/x
                  </DT>
                  <DD>
                     [0..1] Center of the beam on the detector in
                     X.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/x/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of x.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/y
                  </DT>
                  <DD>
                     [0..1] Center of the beam on the detector in
                     Y.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/y/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of y.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/z
                  </DT>
                  <DD>
                     [0..1] Center of the beam on the detector in
                     Z. While this is allowed by the standard, it
                     does not make much sense for small-angle
                     scattering.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/beam_center/z/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of z.
                     (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="pixel_size" minOccurs="0" maxOccurs="1"
            type="tns:positionType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size
                  </DT>
                  <DD>
                     [0..1] Size of detector pixels in X and Y.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/@name
                  </DT>
                  <DD>
                     Optional attribute to clarify the name of
                     this detector pixel size.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/x
                  </DT>
                  <DD>[0..1] Size of detector pixels in X.</DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/x/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of x.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/y
                  </DT>
                  <DD>[0..1] Size of detector pixels in Y.</DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/y/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of y.
                     (See @unit for details.)
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/z
                  </DT>
                  <DD>
                     [0..1] Size of detector pixels in Z. While
                     this is allowed by the standard, it does not
                     make much sense for small-angle scattering.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/pixel_size/z/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the dimension of z.
                     (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="slit_length" minOccurs="0" maxOccurs="1"
            type="tns:floatUnitType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/slit_length
                  </DT>
                  <DD>
                     [0..1] Slit length of the instrument for
                     this detector. Must specify the unit as an
                     attribute.
                  </DD>
               </documentation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector/slit_length/@unit
                  </DT>
                  <DD>
                     [1..1] Required unit for the slit length.
                     (See @unit for details.)
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
   </complexType>

   <complexType name="SASinstrumentType">
      <sequence>
         <element name="name" type="string" minOccurs="1"
            maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASinstrument/name</DT>
                  <DD>[1..1] Name of the instrument.</DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASsource" type="tns:SASsourceType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASsource
                  </DT>
                  <DD>
                     [] Description of the source of the
                     radiation.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="SAScollimation"
            type="tns:SAScollimationType">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SAScollimation
                  </DT>
                  <DD>
                     [] Description of the instrument
                     collimation.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASdetector" type="tns:SASdetectorType"
            minOccurs="1" maxOccurs="unbounded">
            <annotation>
               <documentation>
                  <DT>
                     /SASroot/SASentry/SASinstrument/SASdetector
                  </DT>
                  <DD>
                     [1..inf] Description of a single or
                     composite detector.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <complexType name="SASentryType">
      <sequence>
         <element name="Title" minOccurs="1" maxOccurs="1"
            type="string">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/Title</DT>
                  <DD>[1..1] Title of this SASentry.</DD>
               </documentation>
            </annotation>
         </element>
         <element name="Run" minOccurs="1" maxOccurs="unbounded"
            type="string">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/Run</DT>
                  <DD>
                     [1..inf] Run identification for this
                     SASentry. For many facilities, this is an
                     integer. Use multiple instances of Run as
                     needed. Note: How to correlate this with
                     SASinstrument configurations has not yet
                     been defined.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASdata" minOccurs="1" maxOccurs="unbounded"
            type="tns:SASdataType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASdata</DT>
                  <DD>
                     [1..inf] Reduced 1-D SAS data for this
                     SASentry. Use multiple SASdata elements to
                     represent multiple frames.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASsample" type="tns:SASsampleType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASsample</DT>
                  <DD>[] Description of the sample.</DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASinstrument" type="tns:SASinstrumentType"
            minOccurs="1" maxOccurs="1">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASinstrument</DT>
                  <DD>[1..1] Description of the instrument.</DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASprocess" type="tns:SASprocessType"
            minOccurs="0" maxOccurs="unbounded">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASprocess</DT>
                  <DD>
                     [0..inf] Description of a processing or
                     analysis step.
                  </DD>
               </documentation>
            </annotation>
         </element>
         <element name="SASnote">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry/SASnote</DT>
                  <DD>
                     [1..] Free form description of anything not
                     covered by other elements.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
      <attribute name="name" type="string" use="optional">
         <annotation>
            <documentation>
               <DT>/SASroot/SASentry/@name</DT>
               <DD>
                  [0..1] Optional string attribute to identify
                  this particular SASentry.
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

   <complexType name="SASrootType">
      <sequence>
         <element name="SASentry" minOccurs="1" maxOccurs="unbounded"
            type="tns:SASentryType">
            <annotation>
               <documentation>
                  <DT>/SASroot/SASentry</DT>
                  <DD>
                     [1..] A single SAS scan is reported in a
                     SASentry. A SASentry can use the optional
                     "name" attribute to provide a string for
                     this SASentry. Use of this string is not
                     defined by this standard.
                  </DD>
               </documentation>
            </annotation>
         </element>
      </sequence>
      <attribute name="version" type="string" fixed="1.0"
         use="required">
         <annotation>
            <documentation>
               <DT>/SASroot/@version</DT>
               <DD>
                  [1..1] version="1.0" Required attribute to
                  indicate the version of the standard to which
                  this XML document is encoded.
               </DD>
            </documentation>
         </annotation>
      </attribute>
   </complexType>

   <element name="SASroot" type="tns:SASrootType">
      <annotation>
         <documentation>
            <DT>/SASroot</DT>
            <DD>
               [1..1] The canSAS reduced 1-D SAS data will be in
               the SASroot database. This is similar to NXroot used
               by NeXus.
            </DD>
         </documentation>
      </annotation>
   </element>

</schema>