<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
  ~ Copyright (C) 2010-2024 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:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/prism-schema-3" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" attributeFormDefault="qualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="3.0" targetNamespace="http://midpoint.evolveum.com/xml/ns/public/prism-schema-3">

    <xsd:annotation>
        <xsd:documentation>
            Schema that defines data types used in schema type.

            Version: 4.9
            Recommended namespace prefix: prisms
        </xsd:documentation>
    </xsd:annotation>

    <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/common/common-3" schemaLocation="../common/common-3.xsd">
        <xsd:annotation>
            <xsd:documentation>
                Common midPoint schema.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:import>

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

    <xsd:complexType name="PrismSchemaType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="1" name="namespace" type="xsd:string">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:displayOrder>5</a:displayOrder>
                        <a:displayHint>emphasized</a:displayHint>
                    </xsd:appinfo>
                    <xsd:documentation>
                        Namespace for schema.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="defaultPrefix" type="xsd:string">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:displayOrder>9</a:displayOrder>
                        <a:displayHint>emphasized</a:displayHint>
                    </xsd:appinfo>
                    <xsd:documentation>
                        Defines constant prefix, which should be used for namespace defined in XSD schema.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="1" name="complexType" type="tns:ComplexTypeDefinitionType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="enumerationType" type="tns:EnumerationTypeDefinitionType"/>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>
    <xsd:element name="prismSchema" type="tns:PrismSchemaType"/>

    <xsd:complexType name="ComplexTypeDefinitionType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:DefinitionType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="extension" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>20</a:displayOrder>
                                <a:displayHint>emphasized</a:displayHint>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" name="itemDefinitions" type="tns:PrismItemDefinitionType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="PrismContainerDefinitionType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:PrismItemDefinitionType"/>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="PrismReferenceDefinitionType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:PrismItemDefinitionType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" ref="a:objectReferenceTargetType">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>20</a:displayOrder>
                                <a:displayHint>emphasized</a:displayHint>
                            </xsd:appinfo>
                            <xsd:documentation>
                                Object reference annotation: reference target type. Content of this
                                annotation specifies the object type that the reference points to.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="PrismPropertyDefinitionType">
        <xsd:annotation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:PrismItemDefinitionType"/>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="PrismItemDefinitionType">
        <xsd:annotation>
            <xsd:documentation>
                Common elements for property, reference and container definition.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:DefinitionType">
                <xsd:sequence>
                    <xsd:element minOccurs="1" name="type" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>10</a:displayOrder>
                                <a:displayHint>emphasized</a:displayHint>
                            </xsd:appinfo>
                            <xsd:documentation>
                                <p>
                                    Type of the item.
                                </p>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element default="false" minOccurs="0" name="required" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>30</a:displayOrder>
                                <a:displayName>PrismItemDefinitionType.required</a:displayName>
                            </xsd:appinfo>
                            <xsd:documentation>
                                <p>
                                Mark that this item is required.
                                </p>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element default="false" minOccurs="0" name="multivalue" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>40</a:displayOrder>
                                <a:displayName>PrismItemDefinitionType.multivalue</a:displayName>
                            </xsd:appinfo>
                            <xsd:documentation>
                                <p>
                                Mark that this item is multivalue.
                                </p>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="indexed" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>50</a:displayOrder>
                                <a:displayName>PrismItemDefinitionType.indexed</a:displayName>
                            </xsd:appinfo>
                            <xsd:documentation>
                                <p>
                                Mark that this item is indexed. The default value for indexed flag (i.e. the XSD annotation)
                                is true for the above supported types, and it can be switched to false if the property
                                is not important for searching. For other property types, complex types or extension containers
                                (and their content) it is false and cannot be changed to true. It is only possible to search
                                by the properties on the top level of the extension container.
                                </p>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="valueEnumerationRef" type="c:ObjectReferenceType">
                        <xsd:annotation>
                            <xsd:documentation>
                                <p>
                                Reference to an object that directly or indirectly represents possible values for
                                this item. We do not define here what exactly the object has to be. It can be a lookup
                                table, script that dynamically produces the values or anything similar.
                                The object must produce the values of the correct type for this item otherwise an
                                error occurs.
                                </p>
                            </xsd:documentation>
                            <xsd:appinfo>
                                <a:objectReferenceTargetType>c:LookupTableType</a:objectReferenceTargetType>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="a:access"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="prismItemDef" type="tns:PrismItemDefinitionType"/>

    <xsd:complexType name="DefinitionType">
        <xsd:annotation>
            <xsd:documentation>
                Common elements for all definitions.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="1" name="name" type="xsd:QName">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:displayOrder>0</a:displayOrder>
                        <a:displayHint>emphasized</a:displayHint>
                        <a:displayName>DefinitionType.name</a:displayName>
                    </xsd:appinfo>
                    <xsd:documentation>
                        <p>
                            Name of the item.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" ref="c:displayName">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Human readable name. This name may be displayed in tools and GUIs
                            to provide more pleasant user experience, as the XML data type names
                            or object names may look quite frightening.</p>

                        <p>
                            The "displayName" should contain a value that is readable for almost any
                            user. It is never used in the "logic", it is used only for display purposes.
                        </p>

                        <p>
                            The use of national characters is in "displayName" is fully supported.
                        </p>

                        <p>
                            DisplayName is reused in several location, but the meaning is still the same.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:displayName>DefinitionType.displayName</a:displayName>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="help" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Help text for the displayed item. Help text is usually
                            displayed when the user clicks on help/information icon.
                            This may be a longer text (several sentences).
                        </p>
                        <p>
                            This is equivalent to "help" schema annotation.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" ref="c:documentation"/>
            <xsd:element minOccurs="0" name="displayOrder" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Order of element.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="displayHint" type="c:DisplayHintType">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Enumeration annotation that specifies how the item should be displayed.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" ref="c:lifecycleState">
                <xsd:annotation>
                    <xsd:documentation>
                        <p>
                            Lifecycle state of the object. This property defines whether the
                            object represents proposed definition, whether it is active,
                            deprecated and archived. Only this values is supported.
                            You can change value to next in order but not back.
                            See "Object Lifecycle" in the documentation.
                        </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                        <a:displayName>ObjectType.lifecycleState</a:displayName>
                        <a:valueEnumerationRef oid="00000000-0000-0000-0000-000000000230" type="tns:LookupTableType"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>

    <xsd:complexType name="EnumerationTypeDefinitionType">
        <xsd:annotation>
            <xsd:documentation>
                Elements for enumeration definition.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="tns:DefinitionType">
                <xsd:sequence>
                    <xsd:element maxOccurs="unbounded" minOccurs="1" name="values" type="tns:EnumerationValueTypeDefinitionType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Values of enumeration.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="1" name="baseType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:appinfo>
                                <a:displayOrder>10</a:displayOrder>
                                <a:displayHint>emphasized</a:displayHint>
                            </xsd:appinfo>
                            <xsd:documentation>
                                <p>
                                    Base type of the values.
                                </p>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="EnumerationValueTypeDefinitionType">
        <xsd:annotation>
            <xsd:documentation>
                Elements for enumeration value definition.
            </xsd:documentation>
            <xsd:appinfo>
                <a:container/>
                <a:since>4.9</a:since>
                <a:experimental>true</a:experimental>
            </xsd:appinfo>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element minOccurs="1" name="value" type="xsd:string">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:displayOrder>0</a:displayOrder>
                        <a:displayHint>emphasized</a:displayHint>
                    </xsd:appinfo>
                    <xsd:documentation>
                        <p>
                            Value of enumeration value.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="documentation" type="xsd:string">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:displayOrder>30</a:displayOrder>
                    </xsd:appinfo>
                    <xsd:documentation>
                        <p>
                            Documentation of enumeration value.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element minOccurs="0" name="constantName" type="xsd:string">
                <xsd:annotation>
                    <xsd:appinfo>
                        <a:displayOrder>20</a:displayOrder>
                        <a:displayHint>emphasized</a:displayHint>
                    </xsd:appinfo>
                    <xsd:documentation>
                        <p>
                            Constant name of enumeration value.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:long"/>
    </xsd:complexType>

</xsd:schema>