<?xml version="1.0" encoding="utf-8"?>
<schema xmlns:ows="http://www.opengis.net/ows/2.0"
        xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.opengis.net/ows/2.0"
        elementFormDefault="qualified"
        version="2.0.2"
        xml:lang="en">
  <annotation>
    <appinfo>owsGetCapabilities.xsd</appinfo>
    <documentation>This XML Schema Document defines the GetCapabilities
    operation request and response XML elements and types, which are common to
    all OWSs. This XML Schema shall be edited by each OWS, for example, to
    specify a specific value for the "service" attribute.
    
    OWS is an OGC Standard.
    Copyright (c) 2009 Open Geospatial Consortium.
    To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
    </documentation>
  </annotation>
  <!-- ==============================================================
                includes and imports
        ============================================================== -->
  <include schemaLocation="owsAll.xsd"/>
  <include schemaLocation="owsServiceIdentification.xsd" />
  <include schemaLocation="owsServiceProvider.xsd" />
  <include schemaLocation="owsOperationsMetadata.xsd" />

  <!-- ==============================================================
                elements and types
        ============================================================== -->
  <complexType name="CapabilitiesBaseType">
    <annotation>
      <documentation>XML encoded GetCapabilities operation response. This
      document provides clients with service metadata about a specific service
      instance, usually including metadata about the tightly-coupled data
      served. If the server does not implement the updateSequence parameter,
      the server shall always return the complete Capabilities document,
      without the updateSequence parameter. When the server implements the
      updateSequence parameter and the GetCapabilities operation request
      included the updateSequence parameter with the current value, the server
      shall return this element with only the "version" and "updateSequence"
      attributes. Otherwise, all optional elements shall be included or not
      depending on the actual value of the Contents parameter in the
      GetCapabilities operation request. This base type shall be extended by
      each specific OWS to include the additional contents
      needed.</documentation>
    </annotation>
    <sequence>
      <element ref="ows:ServiceIdentification"
               minOccurs="0" />
      <element ref="ows:ServiceProvider"
               minOccurs="0" />
      <element ref="ows:OperationsMetadata"
               minOccurs="0" />
      <element name="Languages"
               minOccurs="0">
        <annotation>
          <documentation>The list of languages that this service is able to
          fully support. That is, if one of the listed languages is requested
          using the AcceptLanguages parameter in future requests to the
          server, all text strings contained in the response are guaranteed to
          be in that language. This list does not necessarily constitute a
          complete list of all languages that may be (at least partially)
          supported by the server. It only states the languages that are fully
          supported. If a server cannot guarantee full support of any
          particular language, it shall omit it from the list of supported
          languages in the capabilities document.</documentation>
        </annotation>
        <complexType>
          <sequence>
            <element ref="ows:Language" maxOccurs="unbounded"/>
          </sequence>
        </complexType>
      </element>
    </sequence>
    <attribute name="version"
               type="ows:VersionType"
               use="required" />
    <attribute name="updateSequence"
               type="ows:UpdateSequenceType"
               use="optional">
      <annotation>
        <documentation>Service metadata document version, having values that
        are "increased" whenever any change is made in service metadata
        document. Values are selected by each server, and are always opaque to
        clients. When not supported by server, server shall not return this
        attribute.</documentation>
      </annotation>
    </attribute>
  </complexType>
  <!-- =========================================================== -->
  <element name="GetCapabilities"
           type="ows:GetCapabilitiesType" />
  <!-- =========================================================== -->
  <complexType name="GetCapabilitiesType">
    <annotation>
      <documentation>XML encoded GetCapabilities operation request. This
      operation allows clients to retrieve service metadata about a specific
      service instance. In this XML encoding, no "request" parameter is
      included, since the element name specifies the specific operation. This
      base type shall be extended by each specific OWS to include the
      additional required "service" attribute, with the correct value for that
      OWS.</documentation>
    </annotation>
    <sequence>
      <element name="AcceptVersions"
               type="ows:AcceptVersionsType"
               minOccurs="0">
        <annotation>
          <documentation>When omitted, server shall return latest supported
          version.</documentation>
        </annotation>
      </element>
      <element name="Sections"
               type="ows:SectionsType"
               minOccurs="0">
        <annotation>
          <documentation>When omitted or not supported by server, server shall
          return complete service metadata (Capabilities)
          document.</documentation>
        </annotation>
      </element>
      <element name="AcceptFormats"
               type="ows:AcceptFormatsType"
               minOccurs="0">
        <annotation>
          <documentation>When omitted or not supported by server, server shall
          return service metadata document using the MIME type
          "text/xml".</documentation>
        </annotation>
      </element>
      <element name="AcceptLanguages"
               minOccurs="0">
        <annotation>
          <documentation>Ordered list of languages desired by the client for
          all human readable text in the response, in order of preference. For
          every element, the first matching language available from the server
          shall be present in the response.</documentation>
        </annotation>
        <complexType>
          <sequence>
            <element ref="ows:Language" maxOccurs="unbounded"/>
          </sequence>
        </complexType>
      </element>
    </sequence>
    <attribute name="updateSequence"
               type="ows:UpdateSequenceType"
               use="optional">
      <annotation>
        <documentation>When omitted or not supported by server, server shall
        return latest complete service metadata document.</documentation>
      </annotation>
    </attribute>
  </complexType>
  <!-- =========================================================== -->
  <!-- =========================================================== -->
  <simpleType name="ServiceType">
    <annotation>
      <documentation>Service type identifier, where the string value is the
      OWS type abbreviation, such as "WMS" or "WFS".</documentation>
    </annotation>
    <restriction base="string" />
  </simpleType>
  <!-- ========================================================= -->
  <complexType name="AcceptVersionsType">
    <annotation>
      <documentation>Prioritized sequence of one or more specification
      versions accepted by client, with preferred versions listed first. See
      Version negotiation subclause for more information.</documentation>
    </annotation>
    <sequence>
      <element name="Version"
               type="ows:VersionType"
               maxOccurs="unbounded" />
    </sequence>
  </complexType>
  <!-- =========================================================== -->
  <complexType name="SectionsType">
    <annotation>
      <documentation>Unordered list of zero or more names of requested
      sections in complete service metadata document. Each Section value shall
      contain an allowed section name as specified by each OWS specification.
      See Sections parameter subclause for more information.</documentation>
    </annotation>
    <sequence>
      <element name="Section"
               type="string"
               minOccurs="0"
               maxOccurs="unbounded" />
    </sequence>
  </complexType>
  <!-- =========================================================== -->
  <simpleType name="UpdateSequenceType">
    <annotation>
      <documentation>Service metadata document version, having values that are
      "increased" whenever any change is made in service metadata document.
      Values are selected by each server, and are always opaque to clients.
      See updateSequence parameter use subclause for more
      information.</documentation>
    </annotation>
    <restriction base="string" />
  </simpleType>
  <!-- =========================================================== -->
  <complexType name="AcceptFormatsType">
    <annotation>
      <documentation>Prioritized sequence of zero or more GetCapabilities
      operation response formats desired by client, with preferred formats
      listed first. Each response format shall be identified by its MIME type.
      See AcceptFormats parameter use subclause for more
      information.</documentation>
    </annotation>
    <sequence>
      <element name="OutputFormat"
               type="ows:MimeType"
               minOccurs="0"
               maxOccurs="unbounded" />
    </sequence>
  </complexType>
</schema>
