<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:wmts="http://www.deegree.org/services/wmts" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.deegree.org/services/wmts" elementFormDefault="qualified" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
  jaxb:version="3.0">

  <annotation>
    <appinfo>
      <jaxb:schemaBindings>
        <jaxb:package name="org.deegree.services.wmts.jaxb" />
      </jaxb:schemaBindings>
    </appinfo>
  </annotation>

  <element name="deegreeWMTS">
    <complexType>
      <sequence>
        <element name="MetadataURLTemplate" minOccurs="0" type="string" />
        <element name="ServiceConfiguration" type="wmts:ServiceConfigurationType" />
        <element name="FeatureInfoFormats" minOccurs="0" type="wmts:FeatureInfoFormatsType" />
      </sequence>
      <attribute name="configVersion" type="string" use="optional"/>
    </complexType>
  </element>

  <complexType name="ServiceConfigurationType">
    <sequence>
      <element name="ThemeId" type="string" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
  </complexType>

  <complexType name="FeatureInfoFormatsType">
    <sequence>
      <element name="GetFeatureInfoFormat" minOccurs="0" maxOccurs="unbounded">
        <complexType>
          <sequence>
            <choice>
              <element name="File" type="string" />
              <element name="XSLTFile">
                <complexType>
                  <simpleContent>
                    <extension base="string">
                      <attribute name="gmlVersion" type="wmts:GMLVersionType" default="GML_32" use="optional" />
                    </extension>
                  </simpleContent>
                </complexType>
              </element>
            </choice>
            <element name="Format" type="string" />
          </sequence>
        </complexType>
      </element>
    </sequence>
  </complexType>

  <simpleType name="GMLVersionType">
    <restriction base="string">
      <enumeration value="GML_2" />
      <enumeration value="GML_30" />
      <enumeration value="GML_31" />
      <enumeration value="GML_32" />
    </restriction>
  </simpleType>

</schema>
