<?xml version="1.0" encoding="UTF-8" ?>
<!-- E-ARK ERMS schema version 3.0.2 2024-12-10 -->
<!-- E-ARK ERMS schema version 3.0.1 2024-08-22 -->
<!-- E-ARK ERMS schema version 3.0.0 2024-05-17 -->
<!-- E-ARK ERMS schema version 2.1.3 2023-11-03 -->
<!-- E-ARK ERMS schema version 2.1.2 2022-12-09 -->
<!-- E-ARK ERMS schema version 2.1.1 2022-06-20 -->
<!-- E-ARK ERMS schema version 2.1 2021-08-31 -->
<!-- E-ARK ERMS schema version 2.0 2020-08-01 -->
<!-- Changes includes correction of elements name and camelcasing, valuelist corrections and lowercase and underscore used instead of spaces.-->
<!-- E-ARK ERMS schema version 1.0 2019-05-31 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="https://DILCIS.eu/XML/ERMS" targetNamespace="https://DILCIS.eu/XML/ERMS"
    elementFormDefault="qualified">
    <xs:element name="erms" type="ermsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">The main element for Transfer of information from an ERMS</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="ermsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">The definition of the ERMS element</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="control" type="controlType">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Information regarding the XML-document itself and the system from which the information is originating on top level</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:choice minOccurs="1" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The document aggregations or records</xs:documentation>
                </xs:annotation>
                <xs:element ref="aggregations">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">A number of aggregations</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element ref="records">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">A number of records</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:choice>
            <xs:element ref="additionalInformation" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Additional information at this level is most likely system documentation</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="aggregations" type="aggregationsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">A grouping of separate aggregations</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="aggregationsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">The definition of a grouping of separate aggregations</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="aggregation" maxOccurs="unbounded" type="aggregationType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="aggregationType">
        <xs:annotation>
            <xs:documentation xml:lang="en">The definition of one aggregation and its elements and attributes</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="objectId"/>
            <xs:element ref="extraId" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="informationClass" minOccurs="0"/>
            <xs:element ref="securityClass" minOccurs="0"/>
            <xs:element ref="identification" minOccurs="0" maxOccurs="unbounded"/>
            <!-- 20220620 KB bug fix following issue https://github.com/DILCISBoard/CITS-ERMS/issues/16 -->
            <xs:element ref="classification" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="parentAggregationId" minOccurs="0"/>
            <xs:element ref="hierarchicalParentClassId" minOccurs="0"/>
            <xs:element ref="maxLevelsOfAggregation" minOccurs="0"/>
            <xs:element ref="levelName" minOccurs="0"/>
            <xs:element ref="keywords" minOccurs="0"/>
            <xs:element ref="title" minOccurs="0"/>
            <xs:element ref="otherTitle" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="subject" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="status" minOccurs="0"/>
            <xs:element ref="relation" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="additionalInformation" minOccurs="0"/>
            <xs:element ref="restriction" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="IPPInformation" type="ippType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Information regarding intellectual property protection</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="loan" type="loanType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Information regarding loans</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="disposal" minOccurs="0"/>
            <xs:element name="agents" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one agent or a number of agents grouped in the agents element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="agent" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element ref="description" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Mandatory if title is missing</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="dates" type="datesType" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation xml:lang="en">A grouping of dates belonging to the aggregation</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="action" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="archivalHistory" minOccurs="0"/>
            <xs:element ref="dispatchMode" minOccurs="0"/>
            <xs:element ref="access" minOccurs="0"/>
            <xs:element name="physicalLocations" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one physical location or a number of locations grouped in the element PhysicalLocations can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="physicalLocation" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="notes" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one note or a number of notes grouped in the element Notes can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="note" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="eSignatures" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one e-signature or a number of e-signatures grouped in the element ESignatures can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="eSignature" type="eSignatureComplexType" minOccurs="0"
                            maxOccurs="unbounded">
                            <xs:annotation>
                                <xs:documentation xml:lang="en">Inclusion of more than one e-signature using its own XML-schema</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:choice minOccurs="0" maxOccurs="1">
                <xs:element name="aggregation" type="aggregationType" minOccurs="0"
                    maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">One aggregation</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="record" type="recordType" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">One record</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:choice>
        </xs:sequence>
        <xs:attribute name="systemIdentifier" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">An identifier for the aggregation with the type UUID created at the latest at the export of the information</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="aggregationType" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Describes the aggregation type. Value "own_aggregation_definition" demands use of otherAggregationType attribute</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="caseFile"/>
                    <xs:enumeration value="class"/>
                    <xs:enumeration value="component"/>
                    <xs:enumeration value="file"/>
                    <xs:enumeration value="subfile"/>
                    <xs:enumeration value="volume"/>
                    <xs:enumeration value="own_aggregation_definition"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="otherAggregationType" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">When value "own_aggregation_definition" is used the attribute otherAggregationType is used to describe the aggegation type</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="classificationSchemaUsed" type="xs:IDREF" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">A link to the classification schema that the aggregation is following</xs:documentation>
                <xs:documentation xml:lang="en">2024-05-17 new attribute</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:element name="records" type="recordsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Grouping of records</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="recordsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of a grouping of records</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="record" maxOccurs="unbounded" type="recordType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="recordType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of one record and its elements and attributes</xs:documentation>
            <xs:documentation xml:lang="en">2024-05-17, element classification made repetable</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="objectId"/>
            <xs:element ref="extraId" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="informationClass" minOccurs="0"/>
            <xs:element ref="securityClass" minOccurs="0"/>
            <xs:element ref="identification" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="classification" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="parentAggregationId" minOccurs="0"/>
            <xs:element ref="levelName" minOccurs="0"/>
            <xs:element ref="keywords" minOccurs="0"/>
            <xs:element ref="title" minOccurs="0"/>
            <xs:element ref="otherTitle" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="subject" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="status" minOccurs="0"/>
            <xs:element ref="runningNumber" minOccurs="0"/>
            <xs:element ref="relation" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="restriction" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="IPPInformation" type="ippType" minOccurs="0"/>
            <xs:element name="loan" type="loanType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="disposal" minOccurs="0"/>
            <xs:element ref="direction" minOccurs="0"/>
            <xs:element name="agents" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one agent or a number of agents grouped in the agents element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="agent" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element ref="description" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Mandatory if title is missing</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="dates" type="datesType" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Grouping of dates belonging to the record</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="action" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="archivalHistory" minOccurs="0"/>
            <xs:element ref="dispatchMode" minOccurs="0"/>
            <xs:element ref="access" minOccurs="0"/>
            <xs:element name="physicalLocations" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one physical location or a number of locations grouped in the physicallocations element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="physicalLocation" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="notes" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one note or a number of notes grouped in the notes element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="note" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="eSignatures" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one e-signature or a number of e-signatures grouped in the ESignatures element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="eSignature" type="eSignatureComplexType" minOccurs="0"
                            maxOccurs="unbounded">
                            <xs:annotation>
                                <xs:documentation xml:lang="en">Inclusion of more than one e-signature using its own XML-schema</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element ref="additionalInformation" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Additional information on record level</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="systemIdentifier" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">An identifier for the record with the type UUID created at the latest at the export of the information</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="recordType" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">Type of the record</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="recordPhysicalOrDigital" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">State whether the record is physical, digital, both or if the statment dont apply.</xs:documentation>
                <xs:documentation xml:lang="en">2020-02-11 update of value list. "Dont apply" -> "Does not apply" </xs:documentation>
                <xs:documentation xml:lang="en">2023-11-02 update of value list. "digitial" -> "digital"</xs:documentation>
                <xs:documentation xml:lang="en">2024-08-22 update of value list. "physcical_and_digital" -> "physical_and_digital"</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="physical"/>
                    <xs:enumeration value="digital"/>
                    <xs:enumeration value="physical_and_digital"/>
                    <xs:enumeration value="does_not_apply"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="classificationSchemaUsed" type="xs:IDREF" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">A link to the classification schema that the aggregation is following</xs:documentation>
                <xs:documentation xml:lang="en">2024-05-17 new attribute</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:complexType name="dateTypeComplex">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of all different kinds of dates</xs:documentation>
        </xs:annotation>
        <xs:simpleContent>
            <xs:extension base="xs:dateTime">
                <xs:attribute name="dateType" use="required">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="aggregated"/>
                            <xs:enumeration value="appraisal"/>
                            <xs:enumeration value="archived"/>
                            <xs:enumeration value="archiving"/>
                            <xs:enumeration value="captured"/>
                            <xs:enumeration value="checked_in"/>
                            <xs:enumeration value="checked_out"/>
                            <xs:enumeration value="classification"/>
                            <xs:enumeration value="closed"/>
                            <xs:enumeration value="confidentiality_assessed"/>
                            <xs:enumeration value="created"/>
                            <xs:enumeration value="decision"/>
                            <xs:enumeration value="decision_date"/>
                            <xs:enumeration value="decision_deadline"/>
                            <xs:enumeration value="decrypted"/>
                            <xs:enumeration value="deleted"/>
                            <xs:enumeration value="destroyed"/>
                            <xs:enumeration value="dispatch"/>
                            <xs:enumeration value="encrypted"/>
                            <xs:enumeration value="end"/>
                            <xs:enumeration value="expedited"/>
                            <xs:enumeration value="expiration"/>
                            <xs:enumeration value="finished"/>
                            <xs:enumeration value="first_used"/>
                            <xs:enumeration value="last_addition"/>
                            <xs:enumeration value="last_addition_timestamp"/>
                            <xs:enumeration value="last_reviewed"/>
                            <xs:enumeration value="loan"/>
                            <xs:enumeration value="main_signature"/>
                            <xs:enumeration value="modified"/>
                            <xs:enumeration value="moved"/>
                            <xs:enumeration value="opened"/>
                            <xs:enumeration value="opening_date"/>
                            <xs:enumeration value="originated"/>
                            <xs:enumeration value="other_signature"/>
                            <xs:enumeration value="ownership_start"/>
                            <xs:enumeration value="prepared"/>
                            <xs:enumeration value="received"/>
                            <xs:enumeration value="received_at_location"/>
                            <xs:enumeration value="relocated"/>
                            <xs:enumeration value="rendered"/>
                            <xs:enumeration value="reviewed"/>
                            <xs:enumeration value="sent"/>
                            <xs:enumeration value="start"/>
                            <xs:enumeration value="take_back"/>
                            <xs:enumeration value="transferred"/>                            
                            <xs:enumeration value="other"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="otherDateType" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">When dateType is set to "other" this attribute is used to state the type of date</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="addressLineType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of all different kinds of address line types that can be used. Can have value other with thenn own created extending value.</xs:documentation>
            <xs:documentation xml:lang="en">2024-05-17 update of the attribute name to follow the specification. adressType -> addressType </xs:documentation>
        </xs:annotation>
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="addressType" use="required">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="postal_address"/>
                            <xs:enumeration value="postal_code"/>
                            <xs:enumeration value="postal_city"/>
                            <xs:enumeration value="post_box"/>
                            <xs:enumeration value="municipality_code"/>
                            <xs:enumeration value="municipality"/>
                            <xs:enumeration value="parish"/>
                            <xs:enumeration value="parish_code"/>
                            <xs:enumeration value="province"/>
                            <xs:enumeration value="county"/>
                            <xs:enumeration value="country"/>
                            <xs:enumeration value="other"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="otherAddressLineType" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">When addressType is set to "other" this attribute is used to state the type of address line</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="contactLineType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of all different kind of contact line type that can be used. With value other an own created extending value can be used</xs:documentation>
        </xs:annotation>
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="contactType" use="required">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="phonenumber"/>
                            <xs:enumeration value="mobilenumber"/>
                            <xs:enumeration value="fax"/>
                            <xs:enumeration value="email"/>
                            <xs:enumeration value="homepage"/>
                            <xs:enumeration value="other"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="otherContactLineType" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">When contactType is set to "other" this attribute is used to state the type of contact line</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:element name="dates" type="datesType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Grouping of dates</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="datesType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of grouping of dates</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="date" maxOccurs="unbounded" type="dateTypeComplex"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="durationType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of duration element</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="dates" type="datesType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Grouping of dates belonging to the duration</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="calculatedDuration" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The calculated duration if no start or end date exists.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="agent" type="agentComplexType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Agents in any form handling the aggregation or record</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="agentComplexType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of one agent and its elements and attributes</xs:documentation>
            <xs:documentation xml:lang="en">2024-05-17, addition of an optional notes/note element</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="name">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Name of person or organisation</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="agentExtendingInformation" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The agent can be described with a different kind of XML-schema</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="organisation" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Name of organisation</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="unitName" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Unit name</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="idNumber" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">ID-for person or organisation</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="role" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Role of the agent</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="addressContactInformation" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Address and contact information</xs:documentation>
                    <xs:documentation xml:lang="en">2024-05-17, update so its possible to as a minimum to have either one addressLine or one contactLine, which is checked with the Schematron rule</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="addressLine" type="addressLineType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="contactLine" type="contactLineType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="protectedIdentity" type="xs:boolean" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Person has protected identity</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="notes" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one note or a number of notes grouped in the notes element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element ref="note" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="agentType" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Required typing of the agent. When set to the value other a customised (own) extending value can be given with the attribute OtherAgentType</xs:documentation>
                <xs:documentation xml:lang="en">2020-02-11 update in value list. "Authorizing person" -> "Authorising person"</xs:documentation>
                <xs:documentation xml:lang="en">2024-05-17 update in value list. Addition of value, contact_person</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="administrator"/>
                    <xs:enumeration value="agent"/>
                    <xs:enumeration value="archiver"/>
                    <xs:enumeration value="authorising_person"/>
                    <xs:enumeration value="borrower"/>
                    <xs:enumeration value="contact_person"/>
                    <xs:enumeration value="counterpart"/>
                    <xs:enumeration value="creator"/>
                    <xs:enumeration value="custodian"/>
                    <xs:enumeration value="deliverer"/>
                    <xs:enumeration value="dispatcher"/>
                    <xs:enumeration value="editor"/>
                    <xs:enumeration value="ipp_owner"/>
                    <xs:enumeration value="main_signatory"/>
                    <xs:enumeration value="mover"/>
                    <xs:enumeration value="opening_person"/>
                    <xs:enumeration value="other_signatory"/>
                    <xs:enumeration value="owner"/>
                    <xs:enumeration value="reader"/>
                    <xs:enumeration value="recipient"/>
                    <xs:enumeration value="receiver"/>
                    <xs:enumeration value="relocator"/>
                    <xs:enumeration value="responsible_person"/>
                    <xs:enumeration value="sender"/>
                    <xs:enumeration value="user"/>
                    <xs:enumeration value="other"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="otherAgentType" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">When attribute agentType has value "other", this attribute is used to give the Agent Type</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>


    <xs:element name="appendix" type="appendixType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Reference to files</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="appendixType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of the brief information regarding an appendix</xs:documentation>
            <xs:documentation xml:lang="en">2020-02-11 EsignatureHaveExisted -> EsignatureHasExisted</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="eSignature" type="eSignatureComplexType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="disposable" type="xs:boolean" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">If the appendix can be disposed of before the aggregation or record is disposed of value="true" otherwise false</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="name" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Name of the appendix</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="description" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">Description of appendix</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="fileFormat" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">File format of appendix</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="originalFileFormat" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">Original file format of appendix</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="path" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Name and path to the file in the form: file:///path/to/file</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="eSignatureHasExisted" type="xs:boolean" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">Marker for the appendix having had an electronic signature</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:element name="ownElement">
        <xs:annotation>
            <xs:documentation xml:lang="sv">An extending customised (own) element for creating a small number of elements</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="ownElementDescription" minOccurs="0" type="xs:string">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Brief explanation of the custom-defined (own) elements and their use</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="ownElement" type="ownElementType" minOccurs="0"
                    maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Simple way of adding a small number of elements extending the use of the schema.</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="ownElementType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Extending element</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="value" minOccurs="0"/>
            <xs:element ref="property" minOccurs="0"/>
            <xs:element name="ownElement" type="ownElementType" minOccurs="0" maxOccurs="unbounded"
            />
        </xs:sequence>
        <xs:attribute name="name" use="required" type="xs:string">
            <xs:annotation>
                <xs:documentation xml:lang="en">Name of customised (own) defined element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="dataType" type="xs:string">
            <xs:annotation>
                <xs:documentation xml:lang="en">Datatype for customised (own) defined  element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="format" type="xs:string">
            <xs:annotation>
                <xs:documentation xml:lang="en">Format for customised (own) defined element</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:element name="property">
        <xs:annotation>
            <xs:documentation xml:lang="en">Property of the custom defined (own) element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="attribute" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="value" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Value of custom defined (own) element</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="attribute">
        <xs:annotation>
            <xs:documentation xml:lang="sv">More attributes for the extending custom defined (own) element</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="value" minOccurs="0"/>
                <xs:element ref="property" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Name of custom defined (own) defined element</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="dataType" type="xs:string" use="optional">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Datatype for custom defined (own) defined element</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="format" type="xs:string" use="optional">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Format for custom defined (own) defined element</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="disposal" type="disposalType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Information regarding disposal. For long term storage this should already have been carried out.</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="disposalType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of the element for information regarding disposal</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="defaultDisposalScheduleId" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Identification for the default disposal schedule used</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposalScheduleId" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Identification for the disposal schedule used</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposalAction" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Code describing the action to be taken on disposal of the record</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposalPeriod" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Value describing when disposal can be made</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposalMandate" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Mandate for the disposal</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposalDescription" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Description of disposal rules</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposalComments" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one comment or a number of comments grouped in the element DisposalComments</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="disposalComment" type="xs:string" minOccurs="1"
                            maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="lastReviewedDisposalComment" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Comment made by the user that last reviewed the record explaining the disposal decision made by that reviewer</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="disposingPerson" type="xs:string" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Disposing person</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="supervisingPerson" type="xs:string" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Person supervising the disposal</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="dates">
                <xs:annotation>
                    <xs:documentation xml:lang="en">All dates associated with the disposal</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence maxOccurs="unbounded">
                        <xs:element name="disposalDate" type="disposalDateTypes"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="disposable" type="xs:boolean" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Attribute stating if disposal can be made or not. Stated in regulations and laws</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:complexType name="disposalDateTypes">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of typing of a date related to the disposal. using the value other gives the possibility to use a customised (own) extending date type in the attribute Other DisposalDateType</xs:documentation>
        </xs:annotation>
        <xs:simpleContent>
            <xs:extension base="xs:dateTime">
                <xs:attribute name="dateType" use="required" >
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="action_due"/>
                            <xs:enumeration value="applied"/>
                            <xs:enumeration value="confirmation_due"/>
                            <xs:enumeration value="disposal_date"/>
                            <xs:enumeration value="lifted"/>
                            <xs:enumeration value="overdue_alert"/>
                            <xs:enumeration value="retention_period_start"/>
                            <xs:enumeration value="retention_period_end"/>
                            <xs:enumeration value="other_date"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="otherDisposalDateType" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">When otherDisposalDateType is set to "other_date" this attribute is used to state the type of date</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="loanType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of information about loan</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="agent" type="agentComplexType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Agents involved in the loan as borrower, Authorizing person, person responsible for the takeback</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="dates" type="datesType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Dates associated with the loan</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="term" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Loan term</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ippType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of IPP (Intellectual Property Protection) information elements</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="agent" type="agentComplexType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Agent in the form of an IPP owner</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="reproductionConditions" type="xs:string" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">IPP condition description regarding reproduction</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ippDuration" type="durationType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The duration for the IPP rights</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ippType" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Reference to IPP type according to legislative act.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="restriction" type="restrictionsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Use one for each restriction</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="restrictionsType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of the type for describing restrictions</xs:documentation>
            <xs:documentation xml:lang="en">2024-05-17, addtion of an optional agent element</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="explanatoryText" minOccurs="0" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Text field for describing the restriction</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="regulation" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Describe which regulation and paragraph is used</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="informationClass" minOccurs="0"/>
            <xs:element ref="securityClass" minOccurs="0"/>
            <xs:element name="agent" type="agentComplexType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Agents involved in the restriction</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="dates" minOccurs="0" maxOccurs="unbounded" type="datesType">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Dates for the restriction</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="duration" minOccurs="0" maxOccurs="unbounded" type="durationType">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Duration of the restriction</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="restrictionType" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Defines the type of the restriction using the value "other type" gives the opportunity to use a customised (own) extending value in the attribue "otherRestrictionType"</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="confidential"/>
                    <xs:enumeration value="gdpr"/>
                    <xs:enumeration value="integrity"/>
                    <xs:enumeration value="other_type"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="otherRestrictionType" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">Give a customised (own) definition of type. Used when type is "other_type"</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <xs:element name="additionalInformation">
        <xs:annotation>
            <xs:documentation xml:lang="en">Grouping of elements which can be used to insert additional information</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="appendix" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Reference to document/file</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element ref="ownElement" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Small number of custom-defined (own) extending elements</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element ref="additionalXMLData" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Extending information following another XML-schema</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element ref="additionalBinData" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Extending data in Bin64-format</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="additionalXMLData" type="extendingComplexType">
        <xs:annotation>
            <xs:documentation xml:lang="en">XML-wrapper</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="additionalBinData" type="xs:base64Binary">
        <xs:annotation>
            <xs:documentation xml:lang="en"> The binary data wrapper element &lt;binData> is used to contain Base64 encoded metadata.
            </xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="extendingComplexType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of the extending type element</xs:documentation>
            <xs:documentation xml:lang="en">Sometimes other XML-schemas are used for describing information</xs:documentation>
            <xs:documentation xml:lang="en">Use must be agreed upon in the transmission agreement</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="systemInformation" type="systemInfoType">
        <xs:annotation>
            <xs:documentation xml:lang="en">System information</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="systemInfoType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Defintion of the system information is exported in its own XML-format</xs:documentation>
            <xs:documentation xml:lang="en">2024-12-10 update to allow unlimited of occurs for the agents/agent element</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="extraMetadataInformation" type="extendingComplexType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Extending information in XML format</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="agents" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Either one agent or a number of agents grouped in the agents element can be present</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="agent" type="agentComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="controlType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of an element with information on top level describing for example identifications, maintenance</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="identification" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Element for adding identification like for example identification in archival description on top level</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="informationClass" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Information class for the whole document based on information security classification</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="classificationSchema" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Element for describing the used classification schema in the XML-document</xs:documentation>
                    <xs:documentation xml:lang="en">2024-05-17, following user input the occurance is changed to unbounded.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="securityClass" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Security classification for the whole document</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="dates" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">A possibility to add dates at a high level concerning the document</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="maintenanceInformation" type="maintenanceType">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Maintenance information regarding the document itself</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="systemInformation" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Element uses XML exported from the system in its own format</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="maintenanceType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of all elements concerning maintenance</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="maintenanceStatus">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Maintenance status</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:attribute name="value" use="required">
                        <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="cancelled"/>
                        <xs:enumeration value="created"/>
                        <xs:enumeration value="deleted"/>
                        <xs:enumeration value="derived"/>
                        <xs:enumeration value="new"/>
                        <xs:enumeration value="revised"/>
                        <xs:enumeration value="unknown"/>                        
                        <xs:enumeration value="updated"/>
                    </xs:restriction>
                </xs:simpleType>
                    </xs:attribute>
                </xs:complexType>
            </xs:element>
            <xs:element name="maintenanceAgency">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Maintenance agency</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="agencyCode" type="agencyCodeType" minOccurs="0"/>
                        <xs:element name="otherAgencyCode" type="otherAgencyCodeType" minOccurs="0"
                            maxOccurs="unbounded"/>
                        <xs:element name="agencyName" type="xs:string" maxOccurs="unbounded">
                            <xs:annotation>
                                <xs:documentation xml:lang="en">Name of the agency</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="note" minOccurs="0"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="maintenanceHistory">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Maintenance history</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="maintenanceEvent" maxOccurs="unbounded">
                            <xs:annotation>
                                <xs:documentation xml:lang="en">A description of each maintenance event for the XML document</xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="eventType">
                                        <xs:annotation>
                                            <xs:documentation xml:lang="en">Type of event</xs:documentation>
                                        </xs:annotation>
                                        <xs:complexType>
                                            <xs:attribute name="value" use="required">
                                                <xs:simpleType>
                                            <xs:restriction base="xs:token">
                                                <xs:enumeration value="created"/>
                                                <xs:enumeration value="revised"/>
                                                <xs:enumeration value="deleted"/>
                                                <xs:enumeration value="cancelled"/>
                                                <xs:enumeration value="derived"/>
                                                <xs:enumeration value="updated"/>
                                                <xs:enumeration value="unknown"/>
                                            </xs:restriction>
                                        </xs:simpleType>
                                            </xs:attribute>
                                        </xs:complexType>
                                        
                                    </xs:element>
                                    <xs:element name="eventDateTime" type="xs:dateTime">
                                        <xs:annotation>
                                            <xs:documentation xml:lang="en">The datetime for the event</xs:documentation>
                                        </xs:annotation>
                                    </xs:element>
                                    <xs:element name="agent" type="agentComplexType">
                                        <xs:annotation>
                                            <xs:documentation xml:lang="en">The agent connected with the event</xs:documentation>
                                        </xs:annotation>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="idNumber">
        <xs:annotation>
            <xs:documentation xml:lang="en">ID number for person or organisation</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="idNumberType" type="xs:string" use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">idNumberType (string/O): A description of the identifier type (e.g., OCLC record number, LCCN, etc.). </xs:documentation>
                            <xs:documentation xml:lang="en">Values need to be expressed and considered as documentation and follow the submission as documentation</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="eSignatureComplexType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of E-signature information with an attribute indicating it has been present and the option to insert as XML following an e Signature XML-schema</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="signature" type="extendingComplexType" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="present" type="xs:boolean" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Attribute indicating whether an e-signature has been present or not</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="dateeSignatureIsVerified" type="xs:dateTime" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">Attribute with the datetime giving when the e-signature was verified</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:element name="objectId" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Unique ID for the aggregation or record</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="relation">
        <xs:annotation>
            <xs:documentation xml:lang="en">Reference to one or more records or aggregations</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attribute name="relationType" use="required">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Describes the relation. Value "Own relation definition" demands use of otherType attribute</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="replaces"/>
                        <xs:enumeration value="is_replaced_with"/>
                        <xs:enumeration value="reference"/>
                        <xs:enumeration value="referenced_by"/>
                        <xs:enumeration value="demands"/>
                        <xs:enumeration value="needed_by"/>
                        <xs:enumeration value="contains"/>
                        <xs:enumeration value="part_of"/>
                        <xs:enumeration value="other_format_version"/>
                        <xs:enumeration value="another_format_version_of"/>
                        <xs:enumeration value="has_version"/>
                        <xs:enumeration value="is_version_of"/>
                        <xs:enumeration value="is_redacted_version_of"/>
                        <xs:enumeration value="has_redacted_version"/>
                        <xs:enumeration value="rendition_version_of"/>
                        <xs:enumeration value="has_rendition_version"/>
                        <xs:enumeration value="is_child_of"/>
                        <xs:enumeration value="is_parent_of"/>
                        <xs:enumeration value="moved"/>
                        <xs:enumeration value="moved_from"/>
                        <xs:enumeration value="deleted"/>
                        <xs:enumeration value="own_relation_definition"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="otherRelationType" type="xs:string" use="optional">
                <xs:annotation>
                    <xs:documentation xml:lang="en">When value "own_relation_definition" is used</xs:documentation>
                    <xs:documentation xml:lang="en">2022-12-09, Bugfix following https://github.com/DILCISBoard/CITS-ERMS/issues/28 </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="access" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Access to aggregation or record</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="physicalLocation">
        <xs:annotation>
            <xs:documentation xml:lang="en">Physical or logical placement of the aggregation or record</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="currentLocation" type="xs:string" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Where the placement currently is</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="homeLocation" type="xs:string" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">The placement seen as home for the aggregation or record</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>


    <xs:element name="description" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Short description of record or aggregation</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="action" type="actionType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Action preformed, including decisions made</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="actionType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of all elements involved in a action. The action can for example be an decision.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="actionText" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">Description of the action preformed</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="actionDue" minOccurs="0" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The regulations used for making the action</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="actionMotivation" minOccurs="0" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The motivation for the action</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="actionType" minOccurs="0" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">All actions are following a action type and its regulation</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="dates" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">All dates associated with the action like action date, period of action being valid, expiration date.</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence maxOccurs="unbounded">
                        <xs:element name="actionDate" type="dateTypeComplex" maxOccurs="unbounded"
                        />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="agents" minOccurs="0">
                <xs:annotation>
                    <xs:documentation xml:lang="en">All agents associated with the action like agent responsible for the action taken.</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence maxOccurs="unbounded">
                        <xs:element name="agent" type="agentComplexType" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
                
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="dispatchMode" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Mode of dispatching of the record</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="extraId">
        <xs:annotation>
            <xs:documentation xml:lang="en">Extra identification of the aggregation or record. Type of extra identification is declared in the attribute ”ExtraIDType"</xs:documentation>
            <xs:documentation xml:lang="en">Not to be used as extra identifications that can occur in the element Identification</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="extraIdType" type="xs:string" use="required">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">A description of the identifier type (e.g., OCLC record number, LCCN, etc.). </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="parentAggregationId" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Parent aggregation for a child aggregation or record</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="hierarchicalParentClassId" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">The parent class for a hierarchical class</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="levelName" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Generic element for describing name of level of record or aggregation</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="informationClass" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Describe the information class following the rules of classification of information</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="securityClass" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Describe the security level</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="classification">
        <xs:annotation>
            <xs:documentation xml:lang="en">Classification of case</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="classificationId" type="xs:string" use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">Classification ID</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="classificationCode" type="xs:string" use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">Classification Code</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="fullyQualifiedClassificationCode" type="xs:string"
                        use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">The hierarchical identifier of the entity, unique within the ERMS</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="newFullyQualifiedClassificationCode" type="xs:string"
                        use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">The hierarchical identifier of the entity, unique within the ERMS</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="keywords">
        <xs:annotation>
            <xs:documentation xml:lang="en">List of Keywords to identify the aggregation or record</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="keyword" type="xs:string" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">One keyword</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="runningNumber" type="xs:int">
        <xs:annotation>
            <xs:documentation xml:lang="en">RunningNumber</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="maxLevelsOfAggregation" type="xs:int">
        <xs:annotation>
            <xs:documentation xml:lang="en">The maximum levels of aggregation allowed below a root aggregation</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="name" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Reusable name element</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="note">
        <xs:annotation>
            <xs:documentation xml:lang="en">Note regarding record or aggregation</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="noteType" type="xs:string" use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">A description of the type of note for example; ScopeNote, RenditionNote, ReclassificationNote</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="noteDate" type="xs:dateTime" use="optional">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">Date the note was made</xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="title" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Title, generated by the system or created manually</xs:documentation>
        </xs:annotation>
    </xs:element>
    
    <xs:element name="otherTitle" type="otherTitleType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Any other titles associated with the record or aggregation, generated by the system or created manually</xs:documentation>
        </xs:annotation>
    </xs:element>
    
    <xs:complexType name="otherTitleType">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of element for any other titles associated with the record or aggregation, generated by the system or created manually</xs:documentation>
        </xs:annotation>
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="titleType" type="xs:string" use="required">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Attribute for specifiying type type of the other title</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:element name="subject" type="xs:string">
        <xs:annotation>
            <xs:documentation xml:lang="en">Subject, generated by the system or created manually</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:element name="status">
        <xs:annotation>
            <xs:documentation xml:lang="en">Current status of the aggregation or record.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="value" use="optional">
                <xs:simpleType>
            <xs:restriction base="xs:string">
                <xs:enumeration value="ad_acta"/>
                <xs:enumeration value="closed"/>
                <xs:enumeration value="expedited"/>
                <xs:enumeration value="initiated"/>
                <xs:enumeration value="in_progress"/>
                <xs:enumeration value="obliterated"/>
                <xs:enumeration value="on_hold"/>
                <xs:enumeration value="open"/>
                <xs:enumeration value="prepared"/>
                <xs:enumeration value="received"/>
            </xs:restriction>
        </xs:simpleType>
            </xs:attribute>
        </xs:complexType>        
    </xs:element>

    <xs:element name="direction" type="directionType">
        <xs:annotation>
            <xs:documentation xml:lang="en">A record is sometimes given a direction of either being outgoing or incoming as well as other values depending on your system. In this element it is possible to save the direction using the fixed terms outgoing and incoming.</xs:documentation>
        </xs:annotation>
    </xs:element>
    
    <xs:complexType name="directionType" mixed="true">
        <xs:attribute name="directionDefinition" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">Definition of the element for giving of direction following the preset value list.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="incoming"/>
                    <xs:enumeration value="outgoing"/>
                    <xs:enumeration value="internal_memo_for_follow-up"/>
                    <xs:enumeration value="internal_memo_without_follow-up"/>
                    <xs:enumeration value="case_draft"/>
                    <xs:enumeration value="other"/>
                </xs:restriction>
            </xs:simpleType>            
        </xs:attribute>
        <xs:attribute name="otherDirectionDefinition" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">When the attribute directionDefiniton is set to "other" this attribute is used to state the type of direction</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:element name="identification">
        <xs:annotation>
            <xs:documentation xml:lang="en">Element for adding identifications like for example identification in Swedish archival description following the process based description or the sender's reference code for aggregation or record</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="identificationType" type="xs:string" use="required">
                        <xs:annotation>
                            <xs:documentation xml:lang="en">IdentificationType (string/O): A
                                description of the identifier type (e.g., OCLC
                                record number, LCCN, ArchivalCode, SystemIdentifierRetentionCode  etc.). </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="classificationSchema">
        <xs:annotation>
            <xs:documentation xml:lang="en">Element for describing the classification schema used in the XML-document</xs:documentation>
            <xs:documentation xml:lang="en">2024-05-17 Element enhanced with possibility to connect an aggregation and/or record with the correct classification schema</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="useDatePeriod" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">The period when the classification schema was used in the form of a xs:date</xs:documentation>
                        <xs:documentation xml:lang="en">2024-05-17 new element</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="fromDate" type="xs:date">
                                <xs:annotation>
                                    <xs:documentation xml:lang="en">The date when the classification schema was started to be used</xs:documentation>
                                    <xs:documentation xml:lang="en">2024-05-17 new element</xs:documentation>
                                </xs:annotation>
                            </xs:element>
                            <xs:element name="toDate" type="xs:date" minOccurs="0">
                                <xs:annotation>
                                    <xs:documentation xml:lang="en">The date when the classification schema was stopped to be used. If the classification is still in use the toDate is not needed to be present</xs:documentation>
                                    <xs:documentation xml:lang="en">2024-05-17 new element</xs:documentation>
                                </xs:annotation>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="textualDescriptionOfClassificationSchema" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">A textual description of the classifications schema made in a customised (own) choice of element p</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="p" type="xs:string" maxOccurs="unbounded">
                                <xs:annotation>
                                    <xs:documentation xml:lang="en">Paragraphs in the form of p-elements with text</xs:documentation>
                                </xs:annotation>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element ref="additionalInformation" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Additional information for the classification schema</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="classificationSchemaId" type="xs:ID">
                <xs:annotation>
                    <xs:documentation xml:lang="en">A mandatory identification of the classification schema to allow to connect the aggregation or record to the correct classification schema</xs:documentation>
                    <xs:documentation xml:lang="en">2024-05-17 new attribute</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="classificationSchemaStatus">
                <xs:annotation>
                    <xs:documentation xml:lang="en">The status of the classification schema. When the value other is used the attribute otherStatus is used to give an explanation</xs:documentation>
                    <xs:documentation xml:lang="en">2024-05-17 new attribute</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="current"/>
                        <xs:enumeration value="previous"/>
                        <xs:enumeration value="other"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="otherClassificationSchemaStatus" type="xs:string">
                <xs:annotation>
                    <xs:documentation xml:lang="en">When the classificationSchemaStatus attribute have the value "other" the otherClassificationSchemaStatus attribute is used to give the status for the cllassification schema</xs:documentation>
                    <xs:documentation xml:lang="en">2024-05-17 new attribute</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="agentExtendingInformation">
        <xs:annotation>
            <xs:documentation xml:lang="en">A agent can be described using another standards. In those cases either a file containing the information as an appendix or extending XML information is added</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:choice maxOccurs="1">
                <xs:element name="agentExtendingAppendix" type="appendixType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Appendix which points to the agent information</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="agentExtendingXMLInformation" type="extendingComplexType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Inserted XML which describes the agent</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:choice>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="otherAgencyCodeType" mixed="true">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of element used when the agency code is of a type not agreed upon</xs:documentation>
        </xs:annotation>
        <xs:attribute name="type" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="agencyCodeType" mixed="true">
        <xs:annotation>
            <xs:documentation xml:lang="en">Definition of element for agency code. Attribute type follows decisions made in the submission agreement</xs:documentation>
        </xs:annotation>
        <xs:attribute name="type" type="xs:string" use="required"/>
    </xs:complexType>
    
    <xs:element name="archivalHistory">
        <xs:annotation>
            <xs:documentation xml:lang="en">Information on the history of the unit of description that is significant for its authenticity, integrity and interpretation.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="historyLine" minOccurs="1" maxOccurs="unbounded" type="xs:string">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">Each paragraph of text giving the archival history.</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>
