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

<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:gaz="http://www.alexandria.ucsb.edu/gazetteer"
  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-capabilities.xsd,v 1.4 2003/10/07 21:31:42 gjanee Exp $</header>
    <log xmlns="">
      $Log: gazetteer-capabilities.xsd,v $
      Revision 1.4  2003/10/07 21:31:42  gjanee
      Added the &lt;code-schemes&gt; subelement.

      Revision 1.3  2003/09/17 07:22:38  gjanee
      Removed the version number default.  Added &lt;name&gt;,
      &lt;ADL-collection-metadata&gt;, and
      &lt;maximum-query-results&gt; subelements.  Added a
      'place-status' attribute to the &lt;query-types&gt; subelement.
      Removed the 'add-entry', 'relate-entries', and 'remove-entry'
      attributes from the &lt;services&gt; subelement.

      Revision 1.2  2002/04/24 19:35:45  gjanee
      Added a &lt;description&gt; subelement.  Updated
      the default version number to 1.1.

      Revision 1.1  2001/07/05 13:53:48  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>

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

<element name="gazetteer-capabilities">
  <complexType>
    <sequence>

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

      <element name="name" type="string" minOccurs="0"/>

      <element name="description" type="string"
        minOccurs="0"/>

      <element name="ADL-collection-metadata" minOccurs="0">
        <complexType>
          <attributeGroup ref="xlink:locatorLink"/>
        </complexType>
      </element>

      <element name="extended-report-schema" minOccurs="0">
        <complexType>
          <attributeGroup ref="xlink:locatorLink"/>
        </complexType>
      </element>

      <element name="code-schemes" minOccurs="0">
        <complexType>
          <sequence>
            <element name="scheme" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <attribute name="name" type="string"
                  use="required"/>
                <attributeGroup ref="xlink:simpleLink"/>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

      <element name="thesauri" minOccurs="0">
        <complexType>
          <sequence>
            <element name="thesaurus" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <attribute name="name" type="string"
                  use="required"/>
                <attributeGroup ref="xlink:locatorLink"/>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

      <element name="relationships" minOccurs="0">
        <complexType>
          <sequence>
            <element name="relationship" type="string"
              minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
        </complexType>
      </element>

      <element name="other-geometry-languages"
        minOccurs="0">
        <complexType>
          <sequence>
            <element name="geometry-language" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <attribute name="namespace" type="anyURI"/>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>

      <element name="services">
        <complexType>
          <attribute name="get-capabilities" type="boolean"
            fixed="true"/>
          <attribute name="query" type="boolean"
            default="false"/>
          <attribute name="download" type="boolean"
            default="false"/>
        </complexType>
      </element>

      <element name="maximum-query-results"
        type="nonNegativeInteger" minOccurs="0"/>

      <element name="query-types" minOccurs="0">
        <complexType>
          <attribute name="identifier" type="boolean"
            default="false"/>
          <attribute name="place-status" type="boolean"
            default="false"/>
          <attribute name="name" type="boolean"
            default="false"/>
          <attribute name="footprint" type="boolean"
            default="false"/>
          <attribute name="class" type="boolean"
            default="false"/>
          <attribute name="relationship" type="boolean"
            default="false"/>
        </complexType>
      </element>

      <element name="name-query-operators" minOccurs="0">
        <complexType>
          <attribute name="contains-all-words"
            type="boolean" default="false"/>
          <attribute name="contains-any-words"
            type="boolean" default="false"/>
          <attribute name="contains-phrase"
            type="boolean" default="false"/>
          <attribute name="equals" type="boolean"
            fixed="true"/>
          <attribute name="matches-pattern"
            type="boolean" default="false"/>
        </complexType>
      </element>

      <element name="footprint-query-operators"
        minOccurs="0">
        <complexType>
          <attribute name="contains" type="boolean"
            default="false"/>
          <attribute name="overlaps" type="boolean"
            default="false"/>
          <attribute name="within" type="boolean"
            fixed="true"/>
        </complexType>
      </element>

      <element name="footprint-query-operands"
        minOccurs="0">
        <complexType>
          <attribute name="box" type="boolean"
            default="false"/>
          <attribute name="identifier" type="boolean"
            default="false"/>
          <attribute name="polygon" type="boolean"
            default="false"/>
        </complexType>
      </element>

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

</schema>
