<?xml version="1.0" encoding="UTF-8"?>
<schema
  targetNamespace="http://www.opengis.net/swe/2.0"
  xmlns:swe="http://www.opengis.net/swe/2.0"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
  version="2.0.1">
  <annotation>
  <documentation>
    This is the XML Schema for simple basic types in OGC SWE Common 2.0.0 as used by ISO 19123-2 Coverage Implementation Schema (CIS).
    This XML Schema Document is derived from OGC SWE Common Data Model Encoding Standard 2.0.0 (OGC 08-094r1),
    it includes modifications for alignment with ISO/TC 211 standards and URI structures.
    Last updated: 2026-04-01

    Copyright (c) 2026 ISO/TC 211. All rights reserved.
    
    OGC SWE Common Data Model Encoding Standard 2.0.0 (OGC 08-094r1) is copyright (c) 2011 Open Geospatial Consortium.
    Used by ISO/TC211 with permission from OGC.
    To obtain additional rights of use from OGC, visit http://www.opengeospatial.org/legal/.
  </documentation>
  </annotation>

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

  <element name="AbstractSWE" type="swe:AbstractSWEType" abstract="true">
    <annotation>
      <documentation>Base substitution groups for all SWE Common objects other than value objects</documentation>
    </annotation>
  </element>
  <complexType name="AbstractSWEType">
    <sequence>
      <element name="extension" type="anyType" minOccurs="0" maxOccurs="unbounded">
        <annotation>
          <documentation>Extension slot for future extensions to this standard.</documentation>
        </annotation>
      </element>
    </sequence>
    <attribute name="id" type="ID" use="optional"/>
  </complexType>
  <element name="AbstractSWEIdentifiable" type="swe:AbstractSWEIdentifiableType" abstract="true" substitutionGroup="swe:AbstractSWE">
    <annotation>
      <documentation>Base substitution groups for all SWE Common objects with identification metadata</documentation>
    </annotation>
  </element>
  <complexType name="AbstractSWEIdentifiableType">
    <complexContent>
      <extension base="swe:AbstractSWEType">
        <sequence>
          <element name="identifier" type="anyURI" minOccurs="0">
            <annotation>
              <documentation>Unique identifier of the data component. It can be used to globally identify a particular component of the dataset, a process input/output or a universal constant</documentation>
            </annotation>
          </element>
          <element name="label" type="string" minOccurs="0">
            <annotation>
              <documentation>Textual label for the data component . This is often used for displaying a human readable name for a dataset field or a process input/output</documentation>
            </annotation>
          </element>
          <element name="description" type="string" minOccurs="0">
            <annotation>
              <documentation>Textual description (i.e. human readable) of the data component usually used to clarify its nature</documentation>
            </annotation>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="UnitReference">
    <attribute name="code" type="swe:UomSymbol" use="optional"/>
  <attributeGroup ref="swe:AssociationAttributeGroup"/>
  </complexType>
  <simpleType name="UomSymbol">
    <annotation>
      <documentation>This type specifies a character string of length at least one...</documentation>
    </annotation>
    <restriction base="string">
      <pattern value="[^: \n\r\t]+"/>
    </restriction>
  </simpleType>
  <complexType name="NilValue">
    <simpleContent>
      <extension base="token">
        <attribute name="reason" type="anyURI" use="required"/>
      </extension>
    </simpleContent>
  </complexType>
  <complexType name="EncodedValuesPropertyType">
    <complexContent>
      <extension base="anyType">
      <attributeGroup ref="swe:AssociationAttributeGroup"/>
      </extension>
    </complexContent>
  </complexType>
  <simpleType name="TokenPair">
    <restriction>
      <simpleType>
        <list itemType="string"/>
      </simpleType>
      <length value="2"/>
    </restriction>
  </simpleType>
  <simpleType name="IntegerPair">
    <restriction>
      <simpleType>
        <list itemType="integer"/>
      </simpleType>
      <length value="2"/>
    </restriction>
  </simpleType>
  <simpleType name="RealPair">
    <restriction>
      <simpleType>
        <list itemType="double"/>
      </simpleType>
      <length value="2"/>
    </restriction>
  </simpleType>
  <simpleType name="TimePair">
    <restriction>
      <simpleType>
        <list itemType="swe:TimePosition"/>
      </simpleType>
      <length value="2"/>
    </restriction>
  </simpleType>
  <simpleType name="TimePosition">
    <union memberTypes="double swe:TimeIso8601"/>
  </simpleType>
  <simpleType name="TimeIso8601">
    <union memberTypes="date time dateTime swe:TimeIndeterminateValue"/>
  </simpleType>
  <simpleType name="TimeIndeterminateValue">
    <annotation>
      <documentation>"now" indicates that the specified value shall be replaced with the current temporal position whenever the value is accessed.</documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="now"/>
    </restriction>
  </simpleType>

  <attributeGroup name="AssociationAttributeGroup">
    <attribute ref="xlink:type"/>
    <attribute ref="xlink:href"/>
    <attribute ref="xlink:role"/>
    <attribute ref="xlink:arcrole"/>
    <attribute ref="xlink:title"/>
    <attribute ref="xlink:show"/>
    <attribute ref="xlink:actuate"/>
  </attributeGroup>

  <complexType name="Reference">  
    <attributeGroup ref="swe:AssociationAttributeGroup"/>
  </complexType>

</schema>
