<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="extension">
    <xs:complexType>
      <xs:all>
        <xs:element name="charsets">
          <xs:complexType>
            <xs:all>
              <xs:element name="gui">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="unicodefont" type="xs:boolean"/>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="subtitle" type="xs:string"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="sorttokens" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="token" minOccurs="1" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="separators" type="xs:string"/>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="dvd" minOccurs="0">
          <xs:complexType>
            <xs:all>
              <xs:element name="menu" type="xs:string" minOccurs="0"/>
              <xs:element name="audio" type="xs:string" minOccurs="0"/>
              <xs:element name="subtitle" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="point" type="xs:string" use="required"/>
      <xs:attribute name="id" type="simpleIdentifier"/>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="locale" type="langIdentifier"/>
      <xs:attribute name="language" type="xs:string"/>
      <xs:attribute name="region" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="simpleIdentifier">
    <xs:restriction base="xs:string">
      <xs:pattern value="kodi\.resource\.language"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="langIdentifier">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-z]{2,3}(_[A-Z]{2}(@\S+)?)?"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
