<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="LicenseSchema"
    targetNamespace="http://tempuri.org/LicenseSchema.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/LicenseSchema.xsd"
    xmlns:mstns="http://tempuri.org/LicenseSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:simpleType name="UserType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="PowerUser" />
      <xs:enumeration value="ReadOnly" />
      <xs:enumeration value="WriteOnly" />
      <xs:enumeration value="ReadWrite" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="License">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Modules">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Module" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Users">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="User" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:attribute type="UserType" name="Type" use="required"/>
                              <xs:attribute type="xs:integer" name="Count" use="required"/>
                              <xs:attribute type="xs:boolean" name="Test" use="optional" default="true"/>
                              <xs:attribute type="xs:date" name="ValidUntil" use="optional"/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute type="xs:string" name="Name" use="required"/>
                  <xs:attribute type="xs:date" name="ValidUntil" use="optional"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
