<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="quiqqer" type="quiqqerType"/>
  <xs:complexType name="localeType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute type="xs:string" name="group" use="optional"/>
        <xs:attribute type="xs:string" name="var" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="titleType">
    <xs:sequence>
      <xs:element type="localeType" name="locale"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="descriptionType">
    <xs:sequence>
      <xs:element type="localeType" name="locale"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="imageType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute type="xs:string" name="src" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="previewType">
    <xs:sequence>
      <xs:element type="imageType" name="image" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="supportType">
    <xs:sequence>
      <xs:element type="xs:string" name="email"/>
      <xs:element type="xs:string" name="issues"/>
      <xs:element type="xs:string" name="forum"/>
      <xs:element type="xs:string" name="wiki"/>
      <xs:element type="xs:string" name="irc"/>
      <xs:element type="xs:string" name="source"/>
      <xs:element type="xs:string" name="docs"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="copyrightType">
    <xs:sequence>
      <xs:element type="xs:string" name="name"/>
      <xs:element name="license" maxOccurs="unbounded" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="GPL-3.0+"/>
            <xs:enumeration value="PCSG QL-1.0"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="languagesType">
    <xs:sequence>
      <xs:element name="language" maxOccurs="unbounded" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="de"/>
            <xs:enumeration value="en"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="extraType">
    <xs:sequence>
      <xs:element type="xs:string" name="displayInStore"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="providerNameType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute type="xs:string" name="src"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="providerType">
    <xs:sequence>
      <xs:element type="providerNameType" name="providerName"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="packageType">
    <xs:sequence>
      <xs:element type="titleType" name="title"/>
      <xs:element type="descriptionType" name="description"/>
      <xs:element type="imageType" name="image"/>
      <xs:element type="previewType" name="preview"/>
      <xs:element type="supportType" name="support"/>
      <xs:element type="copyrightType" name="copyright"/>
      <xs:element type="languagesType" name="languages"/>
      <xs:element type="extraType" name="extra"/>
      <xs:element type="providerType" name="provider"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="quiqqerType">
    <xs:sequence>
      <xs:element type="packageType" name="package"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>