<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:om="http://www.opengis.net/om/2.0" targetNamespace="http://www.opengis.net/swes/2.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.0">
  <annotation>
    <documentation>
      SWES is an OGC Standard.
      Copyright (c) 2010, 2011 Open Geospatial Consortium. 
      To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
    </documentation>
  </annotation>
  <include schemaLocation="swes.xsd"/>
  <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
  <!-- ================================================= -->
  <element name="AbstractSWES" type="swes:AbstractSWESType" abstract="true"/>
  <complexType name="AbstractSWESType" abstract="true">
    <sequence>
      <element name="description" type="string" minOccurs="0">
        <annotation>
          <documentation>textual description of the object</documentation>
        </annotation>
      </element>
      <element name="identifier" type="anyURI" minOccurs="0">
        <annotation>
          <documentation>identifier of the object</documentation>
        </annotation>
      </element>
      <element name="name" type="gml:CodeType" minOccurs="0" maxOccurs="unbounded">
        <annotation>
          <documentation>label / name of the object</documentation>
        </annotation>
      </element>
      <element name="extension" type="anyType" minOccurs="0" maxOccurs="unbounded">
        <annotation>
          <documentation>place where other specifications may insert additional information</documentation>
        </annotation>
      </element>
    </sequence>
    <attribute ref="swes:id"/>
  </complexType>
  <complexType name="AbstractSWESPropertyType">
    <sequence minOccurs="0">
      <element ref="swes:AbstractSWES"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
  </complexType>
  <!-- ================================================= -->
  <element name="SensorDescription" type="swes:SensorDescriptionType">
    <annotation>
      <documentation>container for a sensor / procedure description</documentation>
    </annotation>
  </element>
  <complexType name="SensorDescriptionType">
    <sequence>
      <element name="validTime" minOccurs="0">
        <annotation>
          <documentation>time instant or time period for which the given sensor description is valid</documentation>
        </annotation>
        <complexType>
          <sequence>
            <element ref="gml:AbstractTimeGeometricPrimitive"/>
          </sequence>
        </complexType>
      </element>
      <element name="data">
        <annotation>
          <documentation>the sensor description</documentation>
        </annotation>
        <complexType>
          <sequence>
            <any namespace="##any" processContents="lax"/>
          </sequence>
        </complexType>
      </element>
    </sequence>
  </complexType>
  <complexType name="SensorDescriptionPropertyType">
    <sequence minOccurs="0">
      <element ref="swes:SensorDescription"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
  </complexType>
  <!-- ================================================= -->
  <element name="FeatureRelationship" type="swes:FeatureRelationshipType">
    <annotation>
      <documentation>explicit representation of the role a given feature has for some specific source type</documentation>
    </annotation>
  </element>
  <complexType name="FeatureRelationshipType">
    <sequence>
      <element name="role" type="anyURI" default="http://www.opengis.net/def/nil/OGC/0/unknown" minOccurs="0">
        <annotation>
          <documentation>describes the relationship of the target feature to the source type</documentation>
        </annotation>
      </element>
      <element name="target" type="gml:FeaturePropertyType">
        <annotation>
          <documentation>the feature whose role with respect to some source type is further described by this relationship</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="FeatureRelationshipPropertyType">
    <sequence minOccurs="0">
      <element ref="swes:FeatureRelationship"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
  </complexType>
  <!-- ================================================= -->
  <element name="ExtensibleResponse" type="swes:ExtensibleResponseType" abstract="true"/>
  <complexType name="ExtensibleResponseType" abstract="true">
    <sequence>
      <element name="extension" type="anyType" minOccurs="0" maxOccurs="unbounded">
        <annotation>
          <documentation>container for response parameters defined by extension</documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <complexType name="ExtensibleResponsePropertyType">
    <sequence minOccurs="0">
      <element ref="swes:ExtensibleResponse"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
  </complexType>
  <!-- ================================================= -->
  <element name="ExtensibleRequest" type="swes:ExtensibleRequestType" abstract="true"/>
  <complexType name="ExtensibleRequestType" abstract="true">
    <sequence>
      <element name="extension" type="anyType" minOccurs="0" maxOccurs="unbounded">
        <annotation>
          <documentation>container for request parameters defined by extension</documentation>
        </annotation>
      </element>
    </sequence>
    <attribute name="version" type="string" use="required"/>
    <attribute name="service" type="string" use="required"/>
  </complexType>
  <complexType name="ExtensibleRequestPropertyType">
    <sequence minOccurs="0">
      <element ref="swes:ExtensibleRequest"/>
    </sequence>
    <attributeGroup ref="gml:AssociationAttributeGroup"/>
  </complexType>
  <!-- ================================================= -->
  <attribute name="id" type="ID">
    <annotation>
      <documentation>Supports provision of a handle for the XML element representing a SWES Object. It is of XML type ID, so is constrained to be unique in the XML document within which it occurs.</documentation>
    </annotation>
  </attribute>
</schema>
