<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="user" type="userType"/>
  <xs:complexType name="attributeType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute type="xs:string" name="encrypt" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="attributesType">
    <xs:sequence>
      <xs:element name="attribute" maxOccurs="unbounded" minOccurs="0">
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute type="xs:string" name="encrypt" use="optional"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tabType">
    <xs:sequence>
      <xs:element name="text">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="Rechnungsdaten"/>
            <xs:enumeration value="Produkte"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="image">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="fa fa-sun-o"/>
            <xs:enumeration value="fa fa-shopping-bag"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="template">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="OPT_DIR/quiqqer/products/template/user.html"/>
            <xs:enumeration value="OPT_DIR/quiqqer/products/template/profile.html"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
    <xs:attribute type="xs:string" name="name" use="optional"/>
  </xs:complexType>
  <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="textType">
    <xs:sequence>
      <xs:element type="localeType" name="locale"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="titleType">
    <xs:sequence>
      <xs:element type="localeType" name="locale"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="inputType">
    <xs:sequence>
      <xs:element type="textType" name="text"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="conf"/>
  </xs:complexType>
  <xs:complexType name="settingsType">
    <xs:sequence>
      <xs:element type="titleType" name="title"/>
      <xs:element type="inputType" name="input"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="categoryType">
    <xs:sequence>
      <xs:element type="textType" name="text"/>
      <xs:element type="xs:string" name="icon"/>
      <xs:element type="settingsType" name="settings"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="categoriesType">
    <xs:sequence>
      <xs:element type="categoryType" name="category"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="windowType">
    <xs:sequence>
      <xs:element type="tabType" name="tab"/>
      <xs:element type="categoriesType" name="categories"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="profileType">
    <xs:sequence>
      <xs:element type="tabType" name="tab"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="userType">
    <xs:sequence>
      <xs:element type="attributesType" name="attributes"/>
      <xs:element type="windowType" name="window">
        <xs:annotation>
          <xs:documentation>User Panel erweitern</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element type="profileType" name="profile">
        <xs:annotation>
          <xs:documentation>User Profil Fenster erweitern</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>