<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:simpleType name="LanguageId">
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Separator">
    <xs:restriction base="xs:string">
      <xs:maxLength value="1" />
    </xs:restriction>
  </xs:simpleType>


  <xs:simpleType name="InformationClass">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Main" />
      <xs:enumeration value="User" />
      <xs:enumeration value="Computer" />
      <xs:enumeration value="Ticket" />
      <xs:enumeration value="VirtualSession" />
      <xs:enumeration value="MobileDevice" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DisplayTypes">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="STRING" />
      <xs:enumeration value="INTEGER" />
      <xs:enumeration value="PERCENT" />
      <xs:enumeration value="PERCENT100" />
      <xs:enumeration value="PERCENT1000" />
      <xs:enumeration value="PERCENT10000" />
      <xs:enumeration value="TIME" />
      <xs:enumeration value="DATE" />
      <xs:enumeration value="DATE_CALC" />
      <xs:enumeration value="DATETIME" />
      <xs:enumeration value="DURATION_DAY" />
      <xs:enumeration value="DURATION_HOUR" />
      <xs:enumeration value="DURATION_MINUTE" />
      <xs:enumeration value="DURATION_SECOND" />
      <xs:enumeration value="DURATION_MILLI" />
      <xs:enumeration value="DURATION_DAY_SINCE_NOW" />
      <xs:enumeration value="BITS_PERSECOND" />
      <xs:enumeration value="BYTES" />
      <xs:enumeration value="HERTZ" />
      <xs:enumeration value="MEGA_HERTZ" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="StateLevels">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="None" />
      <xs:enumeration value="Ok" />
      <xs:enumeration value="Warning" />
      <xs:enumeration value="Error" />
      <xs:enumeration value="Info" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DirectionTypes">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="up" />
      <xs:enumeration value="down" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IconTypes">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="material" />
      <xs:enumeration value="intern" />
      <xs:enumeration value="byImage" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Orientation">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="Horizontal" />
      <xs:enumeration value="Vertical" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FontWeights">
    <xs:restriction base="xs:NCName">
      <xs:enumeration value="Thin" />
      <xs:enumeration value="ExtraLight" />
      <xs:enumeration value="UltraLight" />
      <xs:enumeration value="Light" />
      <xs:enumeration value="Normal" />
      <xs:enumeration value="Regular" />
      <xs:enumeration value="Medium" />
      <xs:enumeration value="DemiBold" />
      <xs:enumeration value="SemiBold" />
      <xs:enumeration value="Bold" />
      <xs:enumeration value="ExtraBold" />
      <xs:enumeration value="UlraBold" />
      <xs:enumeration value="Black" />
      <xs:enumeration value="Heavy" />
      <xs:enumeration value="ExtraBlack" />
      <xs:enumeration value="UltraBlack" />
    </xs:restriction>
  </xs:simpleType>

  <xs:attributeGroup name="ValuePointer">
    <xs:attribute name="Name" type="xs:string" use="optional" />
    <xs:attribute name="ParameterName" type="xs:NCName" use="optional" />
    <xs:attribute name="ValueTable" type="xs:NCName" use="optional" />
    <xs:attribute name="ValueColumn" type="xs:string" use="optional" />
  </xs:attributeGroup>

  <xs:element name="Icon">
    <xs:complexType>
      <xs:attribute name="Name" type="xs:NCName" use="required" />
      <xs:attribute name="IconType" type="IconTypes" use="required" />
      <xs:attribute name="IconSizeInPx" type="xs:int" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:complexType name="MultiLanguageEntry">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Lang" type="LanguageId" use="required"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:element name="Name">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="MultiLanguageEntry" />
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Description">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="MultiLanguageEntry" />
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element  name="DataCategories">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Category" minOccurs="1" maxOccurs="unbounded">
          <xs:simpleType>
            <xs:restriction base="xs:string" />
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="F4SD-HealthCard-Configuration">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Global-NamedParameters" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Global-Computations" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Global-Translations" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Global-ReferencableStates" minOccurs="0" maxOccurs="1" />
        <xs:element ref="QuickActions-Pinned" minOccurs="0" maxOccurs="1" />
        <xs:element ref="HealthCards" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="NamedParameter">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Name" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="Description" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="DataCategories" minOccurs="0" maxOccurs="1" />
      </xs:sequence>
      <xs:attribute name="ParameterName" type="xs:NCName" use="required" />
      <xs:attribute name="Name" type="xs:string" use="required" />
      <xs:attribute name="DisplayName" type="xs:string" use="optional" />
      <xs:attribute name="Display" type="DisplayTypes" use="required" />
      <xs:attribute name="UnitFormat" type="xs:string" use="optional" />
      <xs:attribute name="ValueTable" type="xs:string" use="required" />
      <xs:attribute name="ValueColumn" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="Global-NamedParameters">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="NamedParameter" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="Global-Computations">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Computation" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="Global-Translations">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="Translator" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="IconTranslator" minOccurs="0" maxOccurs="unbounded" />
      </xs:choice>
    </xs:complexType>
  </xs:element>

  <xs:element name="Translator">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="DefaultTranslation" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Translation" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="Name" type="xs:NCName" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="DefaultTranslation">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Name" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="Name" type="xs:string" use="required" />
      <xs:attribute name="StateLevel" type="StateLevels" use="optional" default="None" />
    </xs:complexType>
  </xs:element>

  <xs:element name="Translation">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Name" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Value" minOccurs="0" maxOccurs="unbounded">
          <xs:simpleType>
            <xs:restriction base="xs:string" />
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="Name" type="xs:string" use="required" />
      <xs:attribute name="StateLevel" type="StateLevels" use="optional" default="None" />
    </xs:complexType>

  </xs:element>

  <xs:element name="IconTranslator">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="DefaultIconTranslation" minOccurs="1" maxOccurs="1" />
        <xs:element ref="IconTranslation" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="Name" type="xs:NCName" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="DefaultIconTranslation">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Icon" minOccurs="1" maxOccurs="1" />
        <xs:element ref="Description" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="StateLevel" type="StateLevels" use="optional" default="None" />
    </xs:complexType>
  </xs:element>

  <xs:element name="IconTranslation">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Icon" minOccurs="1" maxOccurs="1" />
        <xs:element ref="Description" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Value" minOccurs="0" maxOccurs="unbounded">
          <xs:simpleType>
            <xs:restriction base="xs:string" />
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="StateLevel" type="StateLevels" use="optional" default="None" />
    </xs:complexType>
  </xs:element>

  <xs:element name="Global-ReferencableStates">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="State" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="QuickActions-Pinned">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="QuickAction" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="HealthCards">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="HealthCard" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="MaxAgeInDays" type="xs:integer" use="required" />
      <xs:attribute name="SearchResultAge" type="xs:integer" use="required" />
      <xs:attribute name="ProtocollLanguage" type="LanguageId" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:element name="HealthCard">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="QuickActions-Pinned" minOccurs="0" maxOccurs="1" />
        <xs:element ref="NamedParameters" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Computations" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Translations" minOccurs="0" maxOccurs="1" />
        <xs:element ref="States" minOccurs="0" maxOccurs="1" />
        <xs:element ref="Header" minOccurs="1" maxOccurs="1" />
        <xs:element ref="CategoriesStatic" minOccurs="1" maxOccurs="1" />
        <xs:element ref="CategoriesStatic-Slim" minOccurs="1" maxOccurs="1" />
        <xs:choice>
          <xs:element ref="CategoriesHistory" />
          <xs:element ref="CustomizableSection" />
        </xs:choice>
      </xs:sequence>
      <xs:attribute name="Name" type="xs:NCName" use="required" />
      <xs:attribute name="InformationClass" use="required">
        <xs:simpleType>
          <xs:list itemType="InformationClass" />
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RequiredRoles" use="optional">
        <xs:simpleType>
          <xs:list itemType="xs:NCName" />
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="MaxAgeInDays" type="xs:integer" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:element name="TableName">
    <xs:simpleType>
      <xs:restriction base="xs:NCName" />
    </xs:simpleType>
  </xs:element>

  <xs:element name="NamedParameters">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="NamedParameter" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computations">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Computation" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation" abstract="true" />

  <xs:complexType name="Computation" abstract="true">
    <xs:sequence>
      <xs:element ref="Description" minOccurs="0" maxOccurs="1" />
      <xs:element ref="DataCategories" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:NCName" use="optional" />
    <xs:attribute name="DisplayName" type="xs:string" use="optional" />
  </xs:complexType>

  <xs:element name="Translations">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="Translator" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="IconTranslator" minOccurs="0" maxOccurs="unbounded" />
      </xs:choice>
    </xs:complexType>
  </xs:element>

  <xs:element name="States">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="State" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="Header">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="HeaderValue" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="HeaderValue">
    <xs:complexType>
      <xs:attribute name="InformationClass" use="required" type="InformationClass" />
      <xs:attributeGroup ref="ValuePointer" />
    </xs:complexType>
  </xs:element>

  <xs:element name="CategoriesStatic">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="StateCategory" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="CategoriesStatic-Slim">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="StateCategory" minOccurs="0" maxOccurs="2" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="CategoriesHistory">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="StateCategory" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="StateCategory">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Name" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="Description" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="QuickActions" minOccurs="0" maxOccurs="1" />
        <xs:element ref="State" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="Name" type="xs:string" use="required" />
      <xs:attribute name="RequiredRoles" use="optional">
        <xs:simpleType>
          <xs:list itemType="xs:NCName" />
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="Hidden" type="xs:boolean" use="optional" default="false" />
      <xs:attribute name="IsVisibleByParameter" type="xs:string" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State" abstract="true" />

  <xs:complexType name="State" abstract="true">
    <xs:sequence>
      <xs:element ref="Name" minOccurs="0" maxOccurs="unbounded" />
      <xs:element ref="Description" minOccurs="0" maxOccurs="unbounded" />
      <xs:element ref="DataCategories" minOccurs="0" maxOccurs="1" />
      <xs:element ref="Editable" minOccurs="0" maxOccurs="1" />
      <xs:element ref="QuickActions" minOccurs="0" maxOccurs="1" />
      <xs:choice>
        <xs:element ref="State-Details" minOccurs="0" maxOccurs="1" />
        <xs:element ref="State-Details-Valued" minOccurs="0" maxOccurs="1" />
      </xs:choice>
      <xs:choice>
        <xs:element ref="State-ChartPercent" minOccurs="0" maxOccurs="1" />
        <xs:element ref="State-Chart" minOccurs="0" maxOccurs="1" />
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="DefaultState" type="StateLevels" use="optional" default="None"/>
    <xs:attribute name="RefName" type="xs:NCName" use="optional" />
    <xs:attribute name="DisplayName" type="xs:string" use="optional" />
    <xs:attribute name="Display" type="DisplayTypes" use="optional" />
    <xs:attribute name="UnitFormat" type="xs:string" use="optional" />
    <xs:attributeGroup ref="ValuePointer" />
    <xs:attribute name="IsTitleOptional" type="xs:boolean" use="optional" />
    <xs:attribute name="ExampleValue" type="xs:string" use="optional" />
    <!-- visibility controlling attributes -->
    <xs:attribute name="Hidden" type="xs:boolean" use="optional" default="false"/>
    <xs:attribute name="IsVisibleByParameter" type="xs:string" use="optional" />
    <xs:attribute name="RequiredRoles" use="optional">
      <xs:simpleType>
        <xs:list itemType="xs:NCName" />
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="Editable" abstract="true" />

  <xs:complexType name="Editable-Base" abstract="true">
    <xs:attributeGroup ref="ValuePointer" />
  </xs:complexType>

  <xs:element name="Editable-Text" substitutionGroup="Editable">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Editable-Base"></xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Editable-Selection" substitutionGroup="Editable">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Editable-Base">
          <xs:attribute name="SelectionTable" type="xs:NCName" use="required"/>
          <xs:attribute name="SelectionRawValueColumn" type="xs:NCName" use="required"/>
          <xs:attribute name="SelectionDisplayValueColumn" type="xs:NCName" use="optional"/>
          <xs:attribute name="Translation" type="xs:NCName" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="QuickActions">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="QuickAction" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="QuickAction">
    <xs:complexType>
      <xs:attribute name="Name" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:complexType name="State-Details-Base" abstract="true">
    <xs:sequence>
      <xs:element ref="State-Details-Filter" minOccurs="0" maxOccurs="1" />
      <xs:element ref="State-Details-Column" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="State-Details">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State-Details-Base">
          <xs:attribute name="ValueTable" type="xs:string" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Details-Valued" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State-Details-Base">
          <xs:attribute name="RowSeparator" type="xs:string" use="required"/>
          <xs:attribute name="ColSeparator" type="xs:string" use="optional"/>
          <xs:attribute name="StringDecorator" type="Separator" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Details-Filter">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Value" minOccurs="1" maxOccurs="unbounded">
          <xs:simpleType>
            <xs:restriction base="xs:string" />
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="FilterColumn" type="xs:NCName" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Details-Column">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Name" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="Description" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="Name" type="xs:string" use="required" />
      <xs:attribute name="Description" type="xs:string" use="optional" />
      <xs:attribute name="ValueColumn" type="xs:string" use="required" />
      <xs:attribute name="Display" type="DisplayTypes" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State-ChartPercent">
    <xs:complexType>
      <xs:attribute name="ValueTable" type="xs:string" use="required" />
      <xs:attribute name="TimeColumn" type="xs:string" use="required" />
      <xs:attribute name="DurationColumn" type="xs:string" use="required" />
      <xs:attribute name="ValueColumn" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Chart">
    <xs:complexType>
      <xs:attribute name="ValueTable" type="xs:string" use="required" />
      <xs:attribute name="TimeColumn" type="xs:string" use="required" />
      <xs:attribute name="DurationColumn" type="xs:string" use="optional" />
      <xs:attribute name="ValueColumn" type="xs:string" use="required" />
      <xs:attribute name="StepLengthScale" type="xs:int" use ="optional" default="25" />
      <xs:attribute name="StepLengthLine" type="xs:int" use ="optional" default="25" />
      <xs:attribute name="MaxValue" type="xs:int" use ="optional" default="100" />
      <xs:attribute name="MinValue" type="xs:int" use ="optional" default="0" />
    </xs:complexType>
  </xs:element>

  <xs:element name="Value">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="MultiLanguageEntry" />
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Constant" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:sequence>
            <xs:element ref="Value" minOccurs="0" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="Value" type="xs:string" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Format" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="Format" type="xs:string" use="required" />
          <xs:attribute name="RemoveDuplicateWords" type="xs:boolean" use="optional" default="false" />
          <xs:attribute name="HideIfThereIsNullValue" type="xs:boolean" use="optional" default="false" />
          <xs:anyAttribute />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Percent" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="DividendValueTable" type="xs:Name" use="required" />
          <xs:attribute name="DividendValueColumn" type="xs:string" use="required" />
          <xs:attribute name="DivisorValueTable" type="xs:Name" use="required" />
          <xs:attribute name="DivisorValueColumn" type="xs:string" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-LinearAddition" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="a" type="xs:double" use="optional" default="1.0" />
          <xs:attribute name="b" type="xs:double" use="optional" default="1.0" />
          <xs:attribute name="c" type="xs:double" use="optional" default="0" />
          <xs:attribute name="ValuesRequired" type="xs:boolean" use="optional" default="false" />
          <xs:anyAttribute />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-VersionFormat" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="Format" type="xs:string" use="required" />
          <xs:anyAttribute />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Enumeration" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:sequence>
            <xs:element ref="Computation-Enumeration-Entry" minOccurs="1" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="Default" type="xs:string" use="required" />
          <xs:attribute name="IsCaseSensetive" type="xs:boolean" use="optional" default="false" />
          <xs:attribute name="ValueTable" type="xs:NCName" use="required" />
          <xs:attribute name="ValueColumn" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Enumeration-Entry">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="Value" type="xs:string" use="required" />
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Switch" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:sequence>
            <xs:element ref="Computation-Switch-Value" minOccurs="1" maxOccurs="unbounded" />
            <xs:element ref="Computation-Switch-Case" minOccurs="0" maxOccurs="unbounded"  />
          </xs:sequence>
          <xs:attribute name="SwitchTable" type="xs:NCName" use="required" />
          <xs:attribute name="SwitchColumn" type="xs:NCName" use="required" />
          <xs:attribute name="DefaultTable" type="xs:NCName" use="required" />
          <xs:attribute name="DefaultColumn" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Switch-Value">
    <xs:complexType>
      <xs:attribute name="id" type="xs:int" use="required" />
      <xs:attribute name="ValueTable" type="xs:NCName" use="required" />
      <xs:attribute name="ValueColumn" type="xs:NCName" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Switch-Case">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="ValueId" type="xs:int" use="required" />
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Subnet" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:sequence>
            <xs:element ref="Computation-Subnet-Entry" minOccurs="1" maxOccurs="unbounded" />
          </xs:sequence>
          <xs:attribute name="Default" type="xs:string" use="required" />
          <xs:attribute name="ValueTable" type="xs:NCName" use="required" />
          <xs:attribute name="ValueColumn" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-Subnet-Entry">
    <xs:complexType>
      <xs:attribute name="Value" type="xs:string" use="required" />
      <xs:attribute name="Subnet" type="xs:string" use="required" />
      <xs:attribute name="UpperSubnet" type="xs:string" use="optional" />
      <xs:attribute name="SubnetBits" type="xs:integer" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-RegEx" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="RegExFilter" type="xs:string" use="required" />
          <xs:attribute name="MatchingGroupIndex" type="xs:integer" use="optional" />
          <xs:attribute name="Replacement" type="xs:string" use="optional" />
          <xs:attribute name="AutoTrim" type="xs:boolean" use="optional" default="false" />
          <xs:attribute name="ValueTable" type="xs:NCName" use="required" />
          <xs:attribute name="ValueColumn" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-DiffDateTime" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="ValueTable0" type="xs:NCName" use="required" />
          <xs:attribute name="ValueColumn0" type="xs:NCName" use="required" />
          <xs:attribute name="ValueTable1" type="xs:NCName" use="required" />
          <xs:attribute name="ValueColumn1" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="Computation-FilterDistinguishedName" substitutionGroup="Computation">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="Computation">
          <xs:attribute name="Type" type="xs:string" use="required" />
          <xs:attribute name="IndexOfType" type="xs:integer" use="required" />
          <xs:attribute name="FromBottom" type="xs:boolean" use="optional" default="false" />
          <xs:attribute name="ValueTable" type="xs:NCName" use="required" />
          <xs:attribute name="ValueColumn" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:attribute name="ValueTable0">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable1">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable2">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable3">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable4">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable5">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable6">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable7">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable8">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueTable9">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn0">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn1">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn2">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn3">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn4">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn5">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn6">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn7">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn8">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="ValueColumn9">
    <xs:simpleType>
      <xs:restriction base="xs:string" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display0">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display1">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display2">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display3">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display4">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display5">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display6">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display7">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display8">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:attribute name="Display9">
    <xs:simpleType>
      <xs:restriction base="DisplayTypes" />
    </xs:simpleType>
  </xs:attribute>

  <xs:element name="State-Level" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="Direction" type="DirectionTypes" use="required"/>
          <xs:attribute name="Warning" type="xs:double" use="required"/>
          <xs:attribute name="Error" type="xs:double" use="required"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Info" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">

        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Aggregation" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:sequence>
            <xs:element ref="State" minOccurs="1" maxOccurs="unbounded" />
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Translation" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="Translation" type="xs:NCName" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-DateTime" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="WarningDays" type="xs:integer" use="optional" />
          <xs:attribute name="ErrorDays" type="xs:integer" use="optional" />
          <xs:attribute name="WarningHours" type="xs:integer" use="optional" />
          <xs:attribute name="ErrorHours" type="xs:integer" use="optional" />
          <xs:attribute name="Direction" type="DirectionTypes" use="optional" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Version" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="Direction" type="DirectionTypes" use="required"/>
          <xs:attribute name="Warning" type="xs:string" use="required"/>
          <xs:attribute name="Error" type="xs:string" use="required"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Link" substitutionGroup="State">
    <xs:complexType>
      <xs:attribute name="Reference" type="xs:string" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State-RefLink" substitutionGroup="State">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="Reference" type="xs:string" use="required" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>


  <!-- //////////////////////////// -->
  <!-- /// Customizable Section /// -->
  <!-- //////////////////////////// -->

  <xs:element name="CustomizableSection">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="State-Container-List" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Container-List">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="State-Container" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="ColumnSpan" type="xs:int" use="optional" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Container">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="ContainerStates" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="State-StackPanel" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="State-Container-Content" minOccurs="0" maxOccurs="unbounded" />
      </xs:choice>
      <xs:attribute name="Name" type="xs:NCName" use="required" />
      <xs:attribute name="InformationClass" use="optional">
        <xs:simpleType>
          <xs:list itemType="InformationClass" />
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="IsMaximizable" type="xs:boolean" use="optional" default="false" />
      <xs:attribute name="IsAddable" type="xs:boolean" use="optional" default="false" />
      <xs:attribute name="IsDeletable" type="xs:boolean" use="optional" default="false" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State-StackPanel">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ContainerStates" minOccurs="1" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="Orientation" type="Orientation" use="optional" default="Vertical" />
      <xs:attribute name="IsRequired" type="xs:boolean" use="optional" default="false" />
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Container-Content">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ContainerStates" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
      <xs:attribute name="IsRequired" type="xs:boolean" use="optional" default="false" />
    </xs:complexType>
  </xs:element>

  <xs:element name="ContainerStates" abstract="true" />

  <xs:element name="State-Stylable" substitutionGroup="ContainerStates">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="FontWeight" type="FontWeights" use="optional" default="Normal" />
          <xs:attribute name="FontSize" type="xs:int" use="optional" default="16" />
          <xs:attribute name="MaximizedValueTable" type="xs:NCName" use="optional" />
          <xs:attribute name="MaximizedValueColumn" type="xs:NCName" use="optional" />
          <xs:attribute name="IsRequired" type="xs:boolean" use="optional" default="false" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-IconTranslation" substitutionGroup="ContainerStates">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="Translation" type="xs:NCName" use="required" />
          <xs:attribute name="IsRequired" type="xs:boolean" use="optional" default="false" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="State-Editable" substitutionGroup="ContainerStates">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="State">
          <xs:attribute name="IsRequired" type="xs:boolean" use="optional" default="false" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

</xs:schema>
