<?xml version="1.0" encoding="UTF-8"?>

<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:gaz="http://www.alexandria.ucsb.edu/gazetteer"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  targetNamespace="http://www.alexandria.ucsb.edu/gazetteer"
  elementFormDefault="qualified">

<annotation>
  <appinfo>
    <header xmlns="">$Header: /export/home/gjanee/gazetteer/RCS/gazetteer-standard-report.xsd,v 1.4 2003/10/07 21:48:49 gjanee Exp $</header>
    <log xmlns="">
      $Log: gazetteer-standard-report.xsd,v $
      Revision 1.4  2003/10/07 21:48:49  gjanee
      Added subelement &lt;codes&gt;.

      Revision 1.3  2003/09/17 20:44:32  gjanee
      Minor change to accommodate a rename.

      Revision 1.2  2003/09/17 07:46:42  gjanee
      Replaced the 'historical' attribute with the new tri-valued
      'status' attribute.  Added subelements &lt;place-status&gt; and
      &lt;display-name&gt;.  In the &lt;relationship&gt; subelement,
      renamed the 'name' and 'identifier' attributes to 'relation' and
      'target-identifier', respectively, and added a 'target-name'
      attribute.  To support virtual relationships, the
      'target-identifier' attribute is now optional.

      Revision 1.1  2001/07/05 13:43:35  gjanee
      Initial revision

    </log>
  </appinfo>
  <documentation>
    <author xmlns="">
      <name>Greg Jan&#x00E9;e</name>
      <affiliation>Alexandria Digital Library Project</affiliation>
      <email-address>gjanee@alexandria.ucsb.edu</email-address>
    </author>
  </documentation>
</annotation>

<include schemaLocation="gazetteer-types.xsd"/>

<import namespace="http://www.opengis.net/gml"
  schemaLocation="geometry.xsd"/>

<import namespace="http://www.w3.org/1999/xlink"
  schemaLocation="xlinks.xsd"/>

<attributeGroup name="qualifiers">
  <attribute name="primary" type="boolean" default="false"/>
  <attribute name="status" type="gaz:status-type"
    default="current"/>
</attributeGroup>

<element name="gazetteer-standard-report">
  <complexType>
    <sequence>

      <element name="identifier" type="string"/>

      <element name="codes" minOccurs="0">
        <complexType>
          <sequence>
            <element name="code" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <simpleContent>
                  <extension base="string">
                    <attribute name="scheme" type="string"
                      use="required"/>
                  </extension>
                </simpleContent>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

      <element name="place-status" type="gaz:status-type"/>

      <element name="display-name" type="string"/>

      <element name="names">
        <complexType>
          <sequence>
            <element name="name" maxOccurs="unbounded">
              <complexType>
                <simpleContent>
                  <extension base="string">
                    <attributeGroup ref="gaz:qualifiers"/>
                  </extension>
                </simpleContent>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

      <element name="bounding-box" type="gml:BoxType"/>

      <element name="footprints">
        <complexType>
          <choice maxOccurs="unbounded">
            <element name="footprint">
              <complexType>
                <choice>
                  <element ref="gml:_Geometry"/>
                  <element ref="gml:Box"/>
                  <element name="other-footprint">
                    <complexType>
                      <sequence>
                        <any processContents="lax"/>
                      </sequence>
                    </complexType>
                  </element>
                </choice>
                <attributeGroup ref="gaz:qualifiers"/>
              </complexType>
            </element>
            <element name="footprint-reference">
              <complexType>
                <attributeGroup ref="xlink:locatorLink"/>
                <attribute name="geometry-type">
                  <simpleType>
                    <restriction base="string">
                      <enumeration value="Box"/>
                      <enumeration value="Point"/>
                      <enumeration value="LineString"/>
                      <enumeration value="Polygon"/>
                      <enumeration value="MultiPoint"/>
                      <enumeration
                        value="MultiLineString"/>
                      <enumeration value="MultiPolygon"/>
                      <enumeration value="other"/>
                    </restriction>
                  </simpleType>
                </attribute>
                <attribute name="num-points"
                  type="positiveInteger"/>
                <attributeGroup ref="gaz:qualifiers"/>
              </complexType>
            </element>
          </choice>
        </complexType>
      </element>

      <element name="classes" minOccurs="0">
        <complexType>
          <sequence>
            <element name="class" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <simpleContent>
                  <extension base="string">
                    <attribute name="thesaurus"
                      type="string" use="required"/>
                    <attributeGroup ref="gaz:qualifiers"/>
                  </extension>
                </simpleContent>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

      <element name="relationships" minOccurs="0">
        <complexType>
          <sequence>
            <element name="relationship" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <attribute name="relation" type="string"
                  use="required"/>
                <attribute name="target-name" type="string"
                  use="required"/>
                <attribute name="target-identifier"
                  type="string"/>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

    </sequence>
  </complexType>
</element>

</schema>
