<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="site" type="siteType"/>
  <xs:complexType name="attributeType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute type="xs:string" name="default" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="attributesType">
    <xs:sequence>
      <xs:element type="attributeType" name="attribute" maxOccurs="unbounded" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tabType">
    <xs:sequence>
      <xs:element name="text">
        <xs:complexType mixed="true">
          <xs:sequence>
            <xs:element type="localeType" name="locale" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="image">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="Image"/>
            <xs:enumeration value="Icon"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element type="categoriesType" name="categories" minOccurs="0"/>
    </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" minOccurs="0"/>
    </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" use="optional"/>
    <xs:attribute type="xs:string" name="data-qui" use="optional"/>
    <xs:attribute type="xs:string" name="type" use="optional"/>
  </xs:complexType>
  <xs:complexType name="settingsType" mixed="true">
    <xs:sequence>
      <xs:element type="titleType" name="title" minOccurs="0"/>
      <xs:element type="inputType" name="input" minOccurs="0"/>
      <xs:element type="categoryType" name="category" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="categoryType">
    <xs:sequence>
      <xs:element type="settingsType" name="settings">
        <xs:annotation>
          <xs:documentation>Settings here</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute type="xs:string" name="name" use="optional"/>
  </xs:complexType>
  <xs:complexType name="categoriesType">
    <xs:sequence>
      <xs:element type="categoryType" name="category"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="typeType" mixed="true">
    <xs:sequence>
      <xs:element type="tabType" name="tab" maxOccurs="unbounded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>extend only the panel for the type  tab with locale  tab with xml catgeries  tab with xml categories</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element type="localeType" name="locale" minOccurs="0"/>
      <xs:element type="descType" name="desc" minOccurs="0"/>
      <xs:element type="attributesType" name="attributes" minOccurs="0"/>
      <xs:element type="settingsType" name="settings" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute type="xs:string" name="type" use="optional"/>
    <xs:attribute type="xs:string" name="icon" use="optional"/>
    <xs:attribute type="xs:string" name="template" use="optional"/>
    <xs:attribute type="xs:string" name="cache" use="optional"/>
    <xs:attribute type="xs:string" name="extend" use="optional"/>
  </xs:complexType>
  <xs:complexType name="descType">
    <xs:sequence>
      <xs:element type="localeType" name="locale"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="typesType">
    <xs:sequence>
      <xs:element type="typeType" name="type" maxOccurs="unbounded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Type with locale translation  Type with own settings</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="windowType">
    <xs:sequence>
      <xs:element type="tabType" name="tab"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="siteType">
    <xs:sequence>
      <xs:element type="attributesType" name="attributes">
        <xs:annotation>
          <xs:documentation>global extra attributes for all sites</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element type="typesType" name="types"/>
      <xs:element type="windowType" name="window" maxOccurs="unbounded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>extend every panel  extend every panel</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>