<?xml version="1.0" encoding="utf-8"?>
<!--
  DESCRIPTION: XML Schema Definition (XSD) for VDS manifest extensions.
  This file defines the structure and constraints for VDS (Visible Digital Seal) manifest extensions.
  It is used to extend the standard ISO 22376 VDS schema with additional elements and attributes.
  LAST UPDATED: 2025-05-21
-->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="https://trust.vdsic.org/schemas/04"
  xmlns="https://trust.vdsic.org/schemas/04"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:include schemaLocation="https://trust.vdsic.org/schemas/04/vds-iso.xsd"/>

  <!-- Policies -->
  <xs:complexType name="PoliciesExtensionType">
    <xs:complexContent>
      <xs:extension base="ExtensionType">
        <xs:sequence>
          <xs:element name="AuthorizedUsage" minOccurs="0">
            <xs:complexType>
              <xs:annotation>
                <xs:documentation>
                Ensures that the signing certificate is legitimately authorized to
                sign a VDS for a specific use case. The signing certificate must include the UUID in the
                usageList extension identified by the OID.
                </xs:documentation>
              </xs:annotation>
              <xs:sequence>
                <xs:element name="oid" minOccurs="1" maxOccurs="1">
                  <xs:annotation>
                    <xs:documentation>Object identifier (OID).</xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:pattern value="([0-2](\.[0-9]+)+)"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:element>
                <xs:element name="uuid" minOccurs="1" maxOccurs="1">
                  <xs:annotation>
                    <xs:documentation>Universally unique identifier (UUID) of the signing certificate. The UUID is a 128-bit long, as defined in ISO 9834-8.</xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:pattern value="[a-fA-F0-9]{32}"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element type="VDSValidityPeriodType" name="VDSValidityPeriod" minOccurs="0"/>
          <xs:element type="RevocationInfoValidityPeriodType" name="RevocationInfoValidityPeriod" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="VDSValidityPeriodType">
    <xs:annotation>
      <xs:documentation>
        Defines how long a VDS can be successfully validated. Acts as a
        planned expiry on VDS. The present time shall be between the header's timestamp
        value, and the header's timestamp value + the validity period.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Value" type="xs:int"></xs:element>
      <xs:element name="Unit" type="UnitType"></xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="RevocationInfoValidityPeriodType">
    <xs:annotation>
      <xs:documentation>
        Define how long revocation information is defined as valid. This
        overrides the CRL or OCSP expiry value. The present time shall be between the CRL's
        thisUpdate timestamp and the CRL's thisUpdate timestamp + revocationInfoGracePeriod.
        If OCSP is used, the validation shall be done using the OCSP's thisUpdate or
        procucedAt, depending on the response received.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Value" type="xs:int"></xs:element>
      <xs:element name="Unit" type="UnitType"></xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="UnitType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="MINUTES"/>
      <xs:enumeration value="HOURS"/>
      <xs:enumeration value="DAYS"/>
      <xs:enumeration value="WEEKS"/>
      <xs:enumeration value="MONTHS"/>
      <xs:enumeration value="YEARS"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- AdditionalInformation extension -->
  <xs:complexType name="AdditionalInformationExtensionType">
    <xs:complexContent>
      <xs:extension base="ExtensionType">
        <xs:sequence>
          <xs:element name="ExternalResources" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
              A human readable description of resources not embedded in the RFF (such as images, JavaScript, etc).
              </xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element type="ValueType" name="Value" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="DataPrivacy" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
              A description of the information that is collected or shared as well as the intended purpose.
              </xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element type="ValueType" name="Value" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="PracticeStatement" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
              The processes and policies that the TSP shall follow to assign an AuthorizedUsage policy to a certificate. The PracticeStatement element is mandatory if AuthorizedUsage is defined.
              </xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element type="ValueType" name="Value" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="LegalStatement" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
              The terms and conditions between the publisher and the user of this use case.
              </xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element type="ValueType" name="Value" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="PointOfContact" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
              The contact information for the person(s) or entity responsible for defining and maintaining the use case. The value should indicate an administrative contact and a technical contact if they are different.
              </xs:documentation>
            </xs:annotation>
            <xs:complexType >
              <xs:sequence>
                <xs:element type="ValueType" name="Value" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Presentation Views -->
  <xs:complexType name="PresentationViewsExtensionType">
    <xs:complexContent>
      <xs:extension base="ExtensionType">
        <xs:sequence>
          <xs:element name="View">
            <xs:complexType>
              <xs:sequence>
                <xs:element type="ValueType" name="Value" maxOccurs="unbounded"/>
              </xs:sequence>
              <xs:attribute type="xs:string" name="mime" use="required"/>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>


  <!-- Abbreviation extension -->
  <xs:complexType name="AbbreviationExtensionType">
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="Dictionary" maxOccurs="1" minOccurs="1">
            <xs:annotation>
              <xs:documentation>The name of the dictionary that contains the abbreviations.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Biometric extension -->
  <xs:complexType name="BiometricDataExtensionType">
    <xs:annotation>
      <xs:documentation>Provides metadata (type, format owner, format type) for interpreting the biometric data stored in the associated Binary payload field, aligning with CBEFF concepts (ISO/IEC 19785).</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="BiometricType" type="BiometricType"/>
          <xs:element name="FormatOwner">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[0-9a-fA-F]{4}"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
          <xs:element name="FormatType">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[0-9a-fA-F]{4}"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Enum for Biometric Types -->
  <xs:simpleType name="BiometricType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="BODY_ODOR"/>
      <xs:enumeration value="DNA"/>
      <xs:enumeration value="EAR_SHAPE"/>
      <xs:enumeration value="FACIAL_FEATURES"/>
      <xs:enumeration value="FINGERPRINT"/>
      <xs:enumeration value="FINGER_GEOMETRY"/>
      <xs:enumeration value="FOOT_PRINT"/>
      <xs:enumeration value="GAIT"/>
      <xs:enumeration value="HAND_GEOMETRY"/>
      <xs:enumeration value="IRIS"/>
      <xs:enumeration value="KEYSTROKE_DYNAMICS"/>
      <xs:enumeration value="LIP_MOVEMENT"/>
      <xs:enumeration value="PALM_PRINT"/>
      <xs:enumeration value="RETINA"/>
      <xs:enumeration value="SIGNATURE_DYNAMICS"/>
      <xs:enumeration value="THERMAL_FACE_IMAGE"/>
      <xs:enumeration value="THERMAL_HAND_IMAGE"/>
      <xs:enumeration value="VEIN_PATTERN"/>
      <xs:enumeration value="VOICE"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- Ciphertext extension -->
  <xs:complexType name="CiphertextExtensionType">
    <xs:annotation>
      <xs:documentation>
        Indicates that the Binary field contains ciphertext. Specifies the data type of the content after decryption. Does not specify encryption algorithm or key management.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="Type" type="xs:string">
            <xs:annotation>
              <xs:documentation>
                The name of the custom type (defined in Types) that describes the structure of the plaintext after decryption.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Dictionaries extension -->
  <xs:complexType name="DictionariesExtensionType">
    <xs:complexContent>
      <xs:extension base="ExtensionType">
        <xs:sequence>
          <xs:element type="DictionaryType" name="Dictionary" maxOccurs="unbounded" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The dictionaries that contain the dictionary entries.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DictionaryType">
    <xs:sequence>
      <xs:element name="Entry" maxOccurs="unbounded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
          The entries that contain the dictionary values.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType >
          <xs:sequence>
            <xs:element type="ValueType" name="Value" maxOccurs="unbounded" minOccurs="1">
              <xs:annotation>
                <xs:documentation>
                  The values of the dictionary entry.
                </xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="key" type="xs:string" use="required">
            <xs:annotation>
              <xs:documentation>
                The key of the dictionary entry.
              </xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
        The name of the dictionary.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <!-- DomainName Extension -->
  <xs:complexType name="DomainNameExtensionType">
    <xs:annotation>
      <xs:documentation>
        Indicates that the string field contains a domain name which must match the domain of the source URL context during verification.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="FieldExtensionType"/>
      <!-- No additional parameters needed in the extension definition itself -->
    </xs:complexContent>
  </xs:complexType>

  <!-- ConcatenatedString extension -->
  <xs:complexType name="ConcatenatedStringExtensionType">
    <xs:annotation>
      <xs:documentation>
        Indicates the String payload field is a concatenation of substrings. The 'Type' property references a custom type in Types whose fields define the structure (order and length) for parsing the concatenated string.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="Type" type="xs:string">
            <xs:annotation>
              <xs:documentation>The mandatory name of the custom type (defined in Types) that describes the sequence and lengths of the substrings.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Image extension -->
  <xs:complexType name="ImageExtensionType">
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="Format" type="ImageFormatType">
            <xs:annotation>
              <xs:documentation>
                The format of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Height" type="xs:integer" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                The height of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Width" type="xs:integer" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                The width of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="MaxHeight" type="xs:integer" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                The maximum height of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="MaxWidth" type="xs:integer" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                The maximum width of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="MinHeight" type="xs:integer" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                The minimum height of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="MinWidth" type="xs:integer" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                The minimum width of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="ImageFormatType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AVIF">
        <xs:annotation>
          <xs:documentation>
          AVIF is a modern image format that provides superior lossless and lossy compression for images on the web.
          </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JPEG">
        <xs:annotation>
          <xs:documentation>
          JPEG is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography.
          </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="JPEG2000">
        <xs:annotation>
          <xs:documentation>
          JPEG 2000 is an image compression standard and coding system. It was created by the Joint Photographic Experts Group committee in 2000 with the intention of superseding their original discrete cosine transform-based JPEG standard.
          </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WEBP">
        <xs:annotation>
          <xs:documentation>
          WebP is a modern image format that provides superior lossless and lossy compression for images on the web.
          </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>

  <!-- Label extension -->
  <xs:complexType name="LabelExtensionType">
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:choice minOccurs="1" maxOccurs="1">
            <xs:element name="Dictionary" maxOccurs="1" minOccurs="0">
              <xs:annotation>
                <xs:documentation>
                  The name of the dictionary that contains the labels.
                </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element type="ValueType" name="Value" maxOccurs="unbounded" minOccurs="0">
              <xs:annotation>
                <xs:documentation>
                  The localized text labels in different languages.
                </xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Mandatory extension -->
  <xs:complexType name="MandatoryExtensionType">
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element type="ConditionType" name="Condition" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>
                The condition that must be satisfied for the field to be mandatory.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!--PhoneNumber extension-->
  <xs:complexType name="PhoneNumberExtensionType">
    <xs:annotation>
      <xs:documentation>
        Indicates the String field contains a phone number and suggests a display formatting convention (E164, NATIONAL, INTERNATIONAL).
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="Format">
            <xs:annotation>
              <xs:documentation>
                The format of the phone number.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="E164"/>
                <xs:enumeration value="INTERNATIONAL"/>
                <xs:enumeration value="NATIONAL"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- PortraitImage extension -->
  <xs:complexType name="PortraitImageExtensionType">
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element name="Format" type="ImageFormatType">
            <xs:annotation>
              <xs:documentation>
                The format of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Height" type="xs:integer">
            <xs:annotation>
              <xs:documentation>
                The height of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Width" type="xs:integer">
            <xs:annotation>
              <xs:documentation>
              The width of the image.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="IodRatioTarget">
            <xs:annotation>
              <xs:documentation>
                The Interocular Distance (IOD) ratio. This value represents the ratio of the distance between the eyes to the width of the image.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:decimal">
                <xs:minExclusive value="0.0" />
                <xs:maxExclusive value="1.0" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
          <xs:element name="EyePositionRatioTarget">
            <xs:annotation>
              <xs:documentation>
                The Eye Position Ratio. This value represents the ratio of the distance from the top of the image to the eyes to the height of the image.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:decimal">
                <xs:minExclusive value="0.0" />
                <xs:maxExclusive value="1.0" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- References extension -->
  <xs:complexType name="ReferencesExtensionType">
    <xs:complexContent>
      <xs:extension base="ExtensionType">
        <xs:sequence>
          <xs:element name="ManifestID" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>
                The identifier of the manifest that is referenced.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[0-9a-fA-F]{6}"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Visibility extension -->
  <xs:complexType name="VisibilityExtensionType">
    <xs:complexContent>
      <xs:extension base="FieldExtensionType">
        <xs:sequence>
          <xs:element type="ConditionType" name="Condition" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>
                The condition that must be satisfied for the field to be visible.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- Conditions -->
  <xs:complexType name="ConditionType" abstract="true"/>

  <xs:complexType name="XorConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="FieldName" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation>
                The name of the field that the condition applies to.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="BooleanConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="FieldName" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The name of the field that the condition applies to.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Value" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The value that the field must have to satisfy the condition.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="DateConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="FieldName" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The name of the field that the condition applies to.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element type="xs:date" name="NotBefore" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                Minimum date. Optional. Date must have the following format: YYYY-MM-DD.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element type="xs:date" name="NotAfter" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                Maximum date. Optional. Date must have the following format: YYYY-MM-DD.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="FloatConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="FieldName" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The name of the field that the condition applies to.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element type="xs:decimal" name="Min" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                Minimum value. Optional. The decimal separator is
                always a point (.), and no separation at the thousand mark may be
                added. There is no support for scientific notation. Allows any
                number of insignificant leading and trailing zeros (after the
                decimal point).
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element type="xs:decimal" name="Max" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                Maximum value. Optional. The decimal separator is
                always a point (.), and no separation at the thousand mark may be
                added. There is no support for scientific notation. Allows any
                number of insignificant leading and trailing zeros (after the
                decimal point).
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="IntegerConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="FieldName" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The name of the field that the condition applies to.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element type="xs:long" name="Min" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                Minimum value. Optional. Values from
                -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element type="xs:long" name="Max" minOccurs="0">
            <xs:annotation>
              <xs:documentation>
                Maximum value. Optional. Values from
                -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ApplicationConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="Value">
            <xs:annotation>
              <xs:documentation>
              The value that the field must have to satisfy the condition.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="ALWAYS">
                  <xs:annotation>
                    <xs:documentation>The condition is always satisfied.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="NEVER">
                  <xs:annotation>
                    <xs:documentation>The condition is never satisfied.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="VDS_SIGNATURE_VALIDATED">
                  <xs:annotation>
                    <xs:documentation>The VDS signature is valid.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="VDS_NOT_EXPIRED">
                  <xs:annotation>
                    <xs:documentation>The VDS signature is valid and the VDS is not expired.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="VDS_OWNER_CONSENT_GIVEN">
                  <xs:annotation>
                    <xs:documentation>The VDS owner has given his consent.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="VDS_OWNER_AUTHENTICATED">
                  <xs:annotation>
                    <xs:documentation>The VDS owner has been successfully authenticated.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="StringConditionType">
    <xs:complexContent>
      <xs:extension base="ConditionType">
        <xs:sequence>
          <xs:element name="FieldName" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The name of the field that the condition applies to.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Value" minOccurs="1">
            <xs:annotation>
              <xs:documentation>
                The value that the field must have to satisfy the condition.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

</xs:schema>