<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
  ~ Copyright (C) 2010-2022 Evolveum and contributors
  ~
  ~ Licensed under the EUPL-1.2 or later.
  --><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-3" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" xmlns:tns="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="3.0" targetNamespace="http://prism.evolveum.com/xml/ns/public/types-3">

    <xsd:annotation>
        <xsd:documentation>
            Basic Prism types.

            Version: 4.6
            Recommended namespace prefix: t
        </xsd:documentation>
        <xsd:appinfo>
          <a:defaultPrefix>t</a:defaultPrefix>
        </xsd:appinfo>
    </xsd:annotation>

    <xsd:import namespace="http://prism.evolveum.com/xml/ns/public/annotation-3" schemaLocation="annotation-3.xsd">
        <xsd:annotation>
            <xsd:documentation>
                Common prism annotations used in various XSD schemas.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:import>

    <!-- ########################################### -->
    <!-- ##         PROPERTY DATA TYPES           ## -->
    <!-- ########################################### -->

    <xsd:complexType mixed="true" name="PolyStringType">
        <xsd:annotation>
            <xsd:documentation>
                Polymorphic string. String that may have more than one representation at
                the same time. The primary representation is the original version that is
                composed of the full Unicode character set. The other versions may be
                normalized to trim it, normalize character case, normalize spaces,
                remove national characters or even transliterate the string.

                There is an alternative syntactic short-cut representation of PolyString. If no
                child element is present then the text entire text content of this element is
                considered as if it was present in the "orig" element. That's the reason for making
                this type "mixed".

                This is considered to be primitive built-in type for prism objects.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="orig" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Original value of the string. There are no constraints on the string structure
                        beyond the natural constraints of the platform. E.g. it may contain full set of
                        Unicode characters, multiple subsequent whitespaces, etc.

                        Although this element is marked as optional, it is mandatory. It should be either
                        provided in a form of this element or as an alternative representation (no elements
                        and the value of "orig" provided as text content)
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="norm" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Normalized value of the string. The values is processed by the default normalization
                        algorithm defined in the system.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="translation" type="tns:PolyStringTranslationType">
                <xsd:annotation>
                    <xsd:documentation>
                        Definition of string value by using localization key and parameters.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="lang" type="tns:PolyStringLangType">
                <xsd:annotation>
                    <xsd:documentation>
                        Polystring values for individual languages.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.0</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other">
                <xsd:annotation>
                    <xsd:documentation>
                        Any additional form of normalized value. Any element present in this section
                        must be of xsd:string type and it must be single-value (in the prism sense).
                        Note: Some implementations may not be able to use them or even store them.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="PolyStringTranslationType">
        <xsd:annotation>
            <xsd:documentation>
                Definition of string value by using localization key and parameters.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="key" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Key used to look up the localized message format in the localization catalogs.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="fallback" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Value of the string to be used in case that the key is not found in the localization catalogs.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="fallbackTranslation" type="tns:PolyStringTranslationType">
                <xsd:annotation>
                    <xsd:documentation>
                        Translation to be used in case that the key is not found in the localization catalogs.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="argument" type="tns:PolyStringTranslationArgumentType">
                <xsd:annotation>
                    <xsd:documentation>
                        Arguments for the translation. Arguments refer to placeholders in the format string in the localization catalog.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="PolyStringTranslationArgumentType">
        <xsd:annotation>
            <xsd:documentation>
                Arguments for localization translation. Arguments refer to placeholders in the format string in the localization catalog.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="value" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Literal value for the localization argument.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="translation" type="tns:PolyStringTranslationType">
                <xsd:annotation>
                    <xsd:documentation>
                        Value of the localization argument is to be determined by using another localization key.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="PolyStringLangType">
        <xsd:annotation>
            <xsd:documentation>
                Polystring values for individual languages. This element contains subelements,
                each subelement represents single language.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <!--suppress XmlDefaultAttributeValue -->
            <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##any" processContents="lax">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:dom/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:any>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType mixed="true" name="ProtectedStringType">
        <xsd:annotation>
            <xsd:documentation>
                Specific subtype for protected STRING data.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ProtectedDataType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="clearValue" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Clear unprotected value.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType mixed="true" name="ProtectedByteArrayType">
        <xsd:annotation>
            <xsd:documentation>
                Specific subtype for protected binary byte array data.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:ProtectedDataType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="clearValue" type="xsd:base64Binary">
                        <xsd:annotation>
                            <xsd:documentation>
                                Clear unprotected value.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType abstract="true" mixed="true" name="ProtectedDataType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
                May be either encrypted, hashed, external or provided in the clear (e.g. for debugging).

                This type is marked as "mixed" because it may have alternative representation where
                just the plaintext value is presented as the only value.

                This is considered to be primitive built-in type for prism objects.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="encryptedData" type="tns:EncryptedDataType"/>
            <xsd:element minOccurs="0" name="hashedData" type="tns:HashedDataType"/>
            <xsd:element minOccurs="0" name="externalData" type="tns:ExternalDataType"/>

            <xsd:any minOccurs="0" namespace="##other">
                <xsd:annotation>
                    <xsd:documentation>
                        DEPRECATED. Only for compatibility with older versions.
                        Used to match legacy xenc:EncryptedData
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>

        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ExternalDataType">
        <xsd:annotation>
            <xsd:documentation>
                Contains data that is not encrypted or hashed. It is stored in external system.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.9</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="provider" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Identifier of secret provider implementation that should be used to obtain secret defined by key.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.9</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="key" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Identifier of secret that provider will use to obtain secret value.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.9</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="EncryptedDataType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
                Contains data protected by (reversible) encryption.

                Loosely based on XML encryption standard. But we cannot use full
                standard as we are not bound to XML. We need this to work also for
                JSON and YAML and other languages.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="encryptionMethod" type="tns:EncryptionMethodType"/>
            <xsd:element minOccurs="0" name="keyInfo" type="tns:KeyInfoType"/>
            <xsd:element minOccurs="0" name="cipherData" type="tns:CipherDataType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="EncryptionMethodType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

                Loosely based on XML encryption standard. But we cannot use full
                standard as we are not bound to XML. We need this to work also for
                JSON and YAML and other languages.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="algorithm" type="xsd:anyURI"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="KeyInfoType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

                Loosely based on XML digital signature standard. But we cannot use full
                standard as we are not bound to XML. We need this to work also for
                JSON and YAML and other languages.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="keyName" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="CipherDataType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

                Loosely based on XML encryption standard. But we cannot use full
                standard as we are not bound to XML. We need this to work also for
                JSON and YAML and other languages.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="cipherValue" type="xsd:base64Binary"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="HashedDataType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
                Contains data protected by (non-reversible) hashing (message digest).

                Loosely based on XML digital signature standard. But we cannot use full
                standard as we are not bound to XML. We need this to work also for
                JSON and YAML and other languages.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="digestMethod" type="tns:DigestMethodType"/>
            <xsd:element name="digestValue" type="xsd:base64Binary"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="DigestMethodType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

                Loosely based on XML encryption standard. But we cannot use full
                standard as we are not bound to XML. We need this to work also for
                JSON and YAML and other languages.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="algorithm" type="xsd:anyURI"/>
            <xsd:element minOccurs="0" name="salt" type="xsd:base64Binary"/>
            <xsd:element minOccurs="0" name="workFactor" type="xsd:int"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ObjectType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

            </xsd:documentation>
        </xsd:annotation>

    </xsd:complexType>

    <!-- ########################################### -->
    <!-- ##         DATA STRUCTURE TYPES          ## -->
    <!-- ########################################### -->

    <xsd:complexType name="extension">
        <xsd:annotation>
            <xsd:appinfo>
                <a:propertyContainer/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax">
            </xsd:any>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ObjectReferenceType">
        <xsd:annotation>
            <xsd:documentation>
                Reference to an object. It contains OID of the object that it refers to.
            </xsd:documentation>
            <xsd:appinfo>
                <a:objectReference/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="description" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Free-form description of this reference. Usually used to describe the purpose of
                        a search filter embedded in the reference.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="filter">
                <xsd:annotation>
                    <xsd:documentation>
                        Filter that can be used to dynamically lookup the reference OID e.g. during imports.
                        It must not be used for normal operations and references with the filter must not
                        be stored in the repository.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element default="import" minOccurs="0" name="resolutionTime" type="tns:EvaluationTimeType">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Definition of the "time" when the reference will be resolved. Resolving the reference means using
                            the filter to get object(s) or OID(s).
                        </p>
                        <p>
                            Import-time resolution means that the reference will be resolved once when the file is imported.
                            OID will be recorded in the reference and then only the OID will be used to follow the reference.
                            This is a very efficient method and it is the default.
                        </p>
                        <p>
                            Run-time resolution means that the reference will be resolved every time that the reference is
                            evaluated. This is less efficient but it provides great flexibility as the filter may contain
                            expressions and therefore the reference target may dynamically change.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element default="default" minOccurs="0" name="referentialIntegrity" type="tns:ReferentialIntegrityType">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Definition of the behavior related to non-existence of object with specified target OID.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:since>4.1</a:since>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="targetName" type="tns:PolyStringType">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Cached name of the target object.
                            This is a ephemeral value. It is usually not stored.
                            It may be computed at object retrieval time or it may not be present at all.
                             This is NOT an authoritative information. Setting it or changing it will
                             not influence the reference meaning. OID is the only authoritative linking
                             mechanism.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="oid" type="xsd:string">
            <xsd:annotation>
                <xsd:documentation>
                    Target of the reference.

                    Optional only during imports. The objects stored in the repository must have the OID
                    value filled in.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="type" type="xsd:QName">
            <xsd:annotation>
                <xsd:documentation>
                    XSD type of the reference target object.

                    It should be provided if the type is known (e.g. when
                    reading object from the repository).

                    The primary reason for this is to have some kind of
                    type safety but especially to be able to use
                    this in the XPaths that specify what references to resolve.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="relation" type="xsd:QName">
            <xsd:annotation>
                <xsd:documentation>
                    <p>
                        The relation or a "role" of this reference. It may further specify
                        the meaning of the reference. E.g. it may specify whether the objects
                        linked by the reference are analogous, form a composition, aggregation,
                        are members of the org or managers of the org, etc.
                    </p>
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>

    <!--<xsd:complexType name="XPathType" mixed="true">-->
        <!--<xsd:annotation>-->
            <!--<xsd:appinfo>-->
                <!--<jaxb:dom/>-->
                <!--<a:deprecated/>-->
            <!--</xsd:appinfo>-->
            <!--<xsd:documentation>-->
                <!--Defines a type for XPath pointer. It points to a specific part-->
                <!--of the XML tree. Only a path expressions should be used in-->
                <!--this type, as it is used as an l-value, i.e. pointing to a-->
                <!--part of XML where an value can be assigned.-->
                <!---->
                <!--XPath expression selecting the property container.-->
                <!--It must select exactly one XML element. It must not be used to-->
                <!--select XML constructs inside a property, unless such property is-->
                <!--in itself an object.-->

                <!--The root of the path is assumed to be the element of the-->
                <!--top-most ObjectType. Path attribute may be omitted. In that-->
                <!--case it is assumed to be "/". The path should be absolute,-->
                <!--starting with leading slash ("/"). If the leading slash is-->
                <!--not present, it should be assumed, but warning message-->
                <!--should be logged in such case.-->
                <!---->
                <!--DEPRECATED. use ItemPathType instead-->
                <!---->
                <!--cf. ExpressionType-->
            <!--</xsd:documentation>-->
        <!--</xsd:annotation>-->
    <!--</xsd:complexType>-->

    <!-- Here we use complexType to create a Java class named ItemPathType -->
    <xsd:complexType name="ItemPathType">
        <xsd:annotation>
            <xsd:documentation>
                Defines a type for XPath-like item pointer. It points to a specific part
                of the prism object.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleContent>
            <xsd:extension base="xsd:string"/>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:complexType name="SchemaDefinitionType">
        <xsd:annotation>
            <xsd:documentation>
                Type for prism schema definition. It currently contains
                XSD schema definition. But other languages may be supported
                later.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:dom/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:any>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType mixed="true" name="RawType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
        </xsd:sequence>
        <xsd:anyAttribute processContents="lax"/>
    </xsd:complexType>

    <xsd:complexType mixed="true" name="XmlAsStringType">
        <xsd:annotation>
            <xsd:documentation>
                Represents a string that may contain unescaped XML data.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
        </xsd:sequence>
    </xsd:complexType>

    <!-- ########################################### -->
    <!-- ##                DELTAS                 ## -->
    <!-- ########################################### -->

    <xsd:complexType name="ItemDeltaType">
        <xsd:annotation>
            <xsd:documentation>
                Describe a change to a single attribute.
                In this case the path expression used in the "property"
                attribute must select exactly one property.

                TODO: this should be renamed to ItemDeltaType
            </xsd:documentation>
        </xsd:annotation>

        <xsd:sequence>
            <xsd:element name="modificationType" type="tns:ModificationTypeType"/>
            <xsd:element minOccurs="0" name="path" type="tns:ItemPathType">
                <xsd:annotation>
                    <xsd:documentation>
                        Path to the CONTAINER.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <!--<xsd:element name="value" type="tns:RawType">-->
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="value" type="xsd:anyType">
<!--                 <xsd:complexType> -->
<!--                     <xsd:sequence> -->
<!--                         <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"> -->
<!--                             <xsd:annotation> -->
<!--                                 <xsd:documentation> -->
<!--                                     The elements and values of changed properties. -->
<!--                                     Multi-valued properties are expressed as usual, -->
<!--                                     that means by repeating the element containing -->
<!--                                     the property value. -->
<!--                                     All the elements must have the same QName and be  -->
<!--                                     of the same type. -->
<!--                                     If more than one property is changed, the entire -->
<!--                                     PropertyChangeType element must be repeated. -->
<!--                                 </xsd:documentation> -->
<!--                             </xsd:annotation> -->
<!--                         </xsd:any> -->
<!--                     </xsd:sequence> -->
<!--                 </xsd:complexType> -->
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="estimatedOldValue" type="xsd:anyType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="ModificationTypeType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

                The "TypeType" in the name is correct. This is the
                type for "change type" therefore the name is OK
                although it looks strange.
            </xsd:documentation>
            <xsd:appinfo>
                <jaxb:typesafeEnumClass/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="add">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ADD"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="replace">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="REPLACE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="delete">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="DELETE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="ObjectDeltaType">
        <xsd:annotation>
            <xsd:documentation>
                Describes a change of a specific object.
                This is abstract type. It cannot be used directly.
                Use the subtypes instead.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="changeType" type="tns:ChangeTypeType"/>
            <xsd:element name="objectType" type="xsd:QName"/>
            <xsd:element minOccurs="0" name="objectToAdd" type="tns:ObjectType">
                <xsd:annotation>
                    <xsd:documentation>
                        Contains a single prism object.

                        Object OID is inside this structure (or is not there at all).
                        Valid only if the changeType is "add".
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="oid" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        OID of object to modify or delete.

                        Valid only if the changeType is "modify" or "delete".
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="targetName" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Optional property to store current name of the changed object.
                        This value is supposed to be used only for presentation and diagnostic
                        purposes. It must NOT be used for any business logic.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="itemDelta" type="tns:ItemDeltaType">
                <xsd:annotation>
                    <xsd:documentation>
                        Valid only if the changeType is "modify".
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="objectDelta" type="tns:ObjectDeltaType"/>

    <xsd:complexType name="ObjectDeltaObjectType">
        <xsd:annotation>
            <xsd:documentation>
                TODO. Experimental.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="oldObject" type="tns:ObjectType"/>
            <xsd:element minOccurs="0" name="delta" type="tns:ObjectDeltaType"/>
            <xsd:element minOccurs="0" name="newObject" type="tns:ObjectType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="objectDeltaObject" type="tns:ObjectDeltaObjectType"/>

    <xsd:complexType name="ItemDeltaItemType">
        <xsd:annotation>
            <xsd:documentation>
                TODO. Experimental.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="oldItem" type="tns:ItemType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="delta" type="tns:ItemDeltaType"/>
            <xsd:element minOccurs="0" name="newItem" type="tns:ItemType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="itemDeltaItem" type="tns:ItemDeltaItemType"/>

    <xsd:complexType name="ItemType">
        <xsd:annotation>
            <xsd:documentation>
                TODO. Experimental.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="name" type="xsd:QName"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="value" type="xsd:anyType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="item" type="tns:ItemType"/>

    <xsd:complexType name="DeltaSetTripleType">
        <xsd:annotation>
            <xsd:documentation>
                TODO. Experimental.
            </xsd:documentation>
            <xsd:appinfo>
                <a:since>4.0.1</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="zero" type="xsd:anyType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="plus" type="xsd:anyType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="minus" type="xsd:anyType"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="deltaSetTriple" type="tns:DeltaSetTripleType"/>

    <xsd:simpleType name="ChangeTypeType">
        <xsd:annotation>
            <xsd:documentation>
                TODO

                The "TypeType" in the name is correct. This is the
                type for "change type" therefore the name is OK
                although it looks strange.
            </xsd:documentation>
            <xsd:appinfo>
                <jaxb:typesafeEnumClass/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="add">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ADD"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="modify">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="MODIFY"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="delete">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="DELETE"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="PlusMinusZeroType">
        <xsd:annotation>
            <xsd:documentation>
                TODO
            </xsd:documentation>
            <xsd:appinfo>
                <jaxb:typesafeEnumClass/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="plus">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="PLUS"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="minus">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="MINUS"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="zero">
                <xsd:annotation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="ZERO"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="EvaluationTimeType">
        <xsd:annotation>
            <xsd:documentation>
                Enumeration that defines when a specific expression is evaluated, filter is resolved, etc.
                It defines the "time" when such evaluation happens, such as import-time, run-time, etc.
            </xsd:documentation>
            <xsd:appinfo>
                <jaxb:typesafeEnumClass/>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="import">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Import-time. Evaluation happens when the object is imported
                            into the system.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="IMPORT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="run">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Run-time. Evaluation happens every time when the object is used.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="RUN"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="ReferentialIntegrityType">
        <xsd:annotation>
            <xsd:documentation>
                How to deal with references that point to non-existing object.
            </xsd:documentation>
            <!-- TODO what about references that are invalid from some other reason e.g. that the object type is wrong? -->
            <xsd:appinfo>
                <jaxb:typesafeEnumClass/>
                <a:since>4.1</a:since>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <!-- TODO something like "ultra-strict", "pedantic" or similar for the highest level of integrity that would prevent
                  creation of invalid references in the first place -->
            <xsd:enumeration value="strict">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            When a reference to non-existing object is encountered, the processing stops with an indication
                            of error. The exact way of stopping is specific to the component dealing with the reference.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="STRICT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="relaxed">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            It is generally expected that the reference target should exist. But if it does not, the component
                            should tolerate it, with some "complaints" presented e.g. as warnings. Overall, the processing should
                            not stop because of non-existing target.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="RELAXED"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="lax">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            A reference to non-existing objects is well tolerated (maybe even somewhat expected).
                            The relevant part of processing is simply skipped.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="LAX"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
            <xsd:enumeration value="default">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            The default behavior is specific to any given reference (like assignment/targetRef or
                            assignment/construction/resourceRef). Some references are considered strict by default, other
                            relaxed.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <jaxb:typesafeEnumMember name="DEFAULT"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:enumeration>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="PolyStringNormalizerConfigurationType">
        <xsd:annotation>
            <xsd:documentation>
                Configuration of PolyString normalizer.
            </xsd:documentation>
            <xsd:appinfo>3.8</xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="0" name="className" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element default="true" minOccurs="0" name="trim" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Removes whitespace from beginning and end of the string.
                        Trimming is done before any other processing.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element default="true" minOccurs="0" name="nfkd" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Unicode Normalization Form Compatibility Decomposition (NFKD).
                        This process expands composed characters (e.g. diacritic marks, ligatures, roman numerals).
                        Character components are then processed individually. E.g. ascii7 normalizer
                        will then remove just the diacritic mark, but leave the base letter. Therefore
                        for a-acute character with NFKD processing the output will be plain "a" character.
                        Without NFKD processing the whole character will be removed.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element default="true" minOccurs="0" name="trimWhitespace" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element default="true" minOccurs="0" name="lowercase" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        TODO
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>