<?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="confType">
    <xs:sequence>
      <xs:element name="type">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="string"/>
            <xs:enumeration value="integer"/>
            <xs:enumeration value="bool"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element type="xs:string" name="defaultvalue" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="name" use="optional"/>
  </xs:complexType>
  <xs:complexType name="sectionType">
    <xs:sequence>
      <xs:element type="confType" name="conf" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="name" use="optional"/>
  </xs:complexType>
  <xs:complexType name="configType">
    <xs:sequence>
      <xs:element type="sectionType" name="section" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="name" use="optional"/>
  </xs:complexType>
  <xs:complexType name="paramsType">
    <xs:sequence>
      <xs:element type="xs:string" name="icon"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="inputType" mixed="true">
    <xs:sequence>
      <xs:element name="text" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="Here is a title text"/>
            <xs:enumeration value="Verwendete Template Engine"/>
            <xs:enumeration value="Smarty Compile Prüfung"/>
            <xs:enumeration value="Datenbank Typ"/>
            <xs:enumeration value="Host"/>
            <xs:enumeration value="Datenbank Name"/>
            <xs:enumeration value="Header-Logo"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element type="xs:string" name="description" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="conf" use="optional"/>
    <xs:attribute type="xs:string" name="type" use="optional"/>
    <xs:attribute type="xs:string" name="label" use="optional"/>
    <xs:attribute type="xs:string" name="class" use="optional"/>
  </xs:complexType>
  <xs:complexType name="settingsType">
    <xs:sequence>
      <xs:element name="title" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="My First Settings"/>
            <xs:enumeration value="My second Settings"/>
            <xs:enumeration value="Some Settings"/>
            <xs:enumeration value="
                                QUI Template Einstellungen
                            "/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element type="inputType" name="input" maxOccurs="unbounded" minOccurs="0"/>
      <xs:element type="textType" name="text" minOccurs="0"/>
      <xs:element type="configType" name="config" minOccurs="0"/>
      <xs:element type="windowType" name="window" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="title" use="optional"/>
    <xs:attribute type="xs:string" name="name" use="optional"/>
  </xs:complexType>
  <xs:complexType name="categoryType">
    <xs:sequence>
      <xs:element name="text">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="Allgemein"/>
            <xs:enumeration value="More Settings"/>
            <xs:enumeration value="Button text"/>
            <xs:enumeration value="Element ohne Label"/>
            <xs:enumeration value="QUI Template Settings"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="icon" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="URL_BIN_DIR/22x22/quiqqer.png"/>
            <xs:enumeration value="URL_BIN_DIR/22x22/database.png"/>
            <xs:enumeration value="icon-button-icon"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element type="settingsType" name="settings" maxOccurs="unbounded" minOccurs="0"/>
      <xs:element type="inputType" name="input" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Dieses Feld besitzt kein Label (linken Bereich in der Tabelle)</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute type="xs:string" name="name" use="optional"/>
    <xs:attribute type="xs:string" name="require" use="optional"/>
  </xs:complexType>
  <xs:complexType name="localeType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute type="xs:string" name="group"/>
        <xs:attribute type="xs:string" name="var"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="textType">
    <xs:sequence>
      <xs:element type="localeType" name="locale"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="categoriesType">
    <xs:sequence>
      <xs:element type="categoryType" name="category" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="windowType">
    <xs:sequence>
      <xs:element type="xs:string" name="title" minOccurs="0"/>
      <xs:element type="paramsType" name="params" minOccurs="0"/>
      <xs:element type="categoriesType" name="categories"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="projectType">
    <xs:sequence>
      <xs:element type="settingsType" name="settings"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="quiqqerType">
    <xs:sequence>
      <xs:element type="settingsType" name="settings"/>
      <xs:element type="projectType" name="project"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>