<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:acmt.022.001.03"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:iso:std:iso:20022:tech:xsd:acmt.022.001.03"
    elementFormDefault="qualified">
  <xs:element name="Document" type="Document_2"/>
  <xs:complexType name="AccountIdentification4Choice">
    <xs:choice>
      <xs:element name="Othr" type="GenericAccountIdentification1"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="BranchAndFinancialInstitutionIdentification6">
    <xs:sequence>
      <xs:element name="FinInstnId" type="FinancialInstitutionIdentification18"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="BranchAndFinancialInstitutionIdentification6_2">
    <xs:complexContent>
      <xs:restriction base="BranchAndFinancialInstitutionIdentification6">
        <xs:sequence>
          <xs:element name="FinInstnId" type="FinancialInstitutionIdentification18_2"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BranchAndFinancialInstitutionIdentification6_3">
    <xs:complexContent>
      <xs:restriction base="BranchAndFinancialInstitutionIdentification6">
        <xs:sequence>
          <xs:element name="FinInstnId" type="FinancialInstitutionIdentification18_3"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="BranchAndFinancialInstitutionIdentification6_4">
    <xs:complexContent>
      <xs:restriction base="BranchAndFinancialInstitutionIdentification6">
        <xs:sequence>
          <xs:element name="FinInstnId" type="FinancialInstitutionIdentification18_4"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="CashAccount40">
    <xs:sequence>
      <xs:element name="Id" type="AccountIdentification4Choice"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CashAccount40_2">
    <xs:complexContent>
      <xs:restriction base="CashAccount40">
        <xs:sequence>
          <xs:element name="Id" type="AccountIdentification4Choice"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClearingSystemIdentification2Choice">
    <xs:choice>
      <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="ClearingSystemIdentification2Choice_2">
    <xs:complexContent>
      <xs:restriction base="ClearingSystemIdentification2Choice">
        <xs:choice>
          <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code_2"/>
        </xs:choice>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClearingSystemMemberIdentification2">
    <xs:sequence>
      <xs:element name="ClrSysId" type="ClearingSystemIdentification2Choice" minOccurs="0"/>
      <xs:element name="MmbId" type="Max35Text"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ClearingSystemMemberIdentification2_2">
    <xs:complexContent>
      <xs:restriction base="ClearingSystemMemberIdentification2">
        <xs:sequence>
          <xs:element name="ClrSysId" type="ClearingSystemIdentification2Choice_2" minOccurs="0"/>
          <xs:element name="MmbId" type="Max35Text"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClearingSystemMemberIdentification2_3">
    <xs:complexContent>
      <xs:restriction base="ClearingSystemMemberIdentification2">
        <xs:sequence>
          <xs:element name="ClrSysId" type="ClearingSystemIdentification2Choice_2"/>
          <xs:element name="MmbId" type="Max35Text_5"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Document">
    <xs:sequence>
      <xs:element name="IdModAdvc" type="IdentificationModificationAdviceV03"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Document_2">
    <xs:complexContent>
      <xs:restriction base="Document">
        <xs:sequence>
          <xs:element name="IdModAdvc" type="IdentificationModificationAdviceV03_2"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ExternalClearingSystemIdentification1Code">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="5"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ExternalClearingSystemIdentification1Code_2">
    <xs:restriction base="ExternalClearingSystemIdentification1Code">
      <xs:enumeration value="GBDSC"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FinancialInstitutionIdentification18">
    <xs:sequence>
      <xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification2" minOccurs="0"/>
      <xs:element name="LEI" type="LEIIdentifier" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="FinancialInstitutionIdentification18_2">
    <xs:complexContent>
      <xs:restriction base="FinancialInstitutionIdentification18">
        <xs:sequence>
          <xs:element name="LEI" type="LEIIdentifier"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FinancialInstitutionIdentification18_3">
    <xs:complexContent>
      <xs:restriction base="FinancialInstitutionIdentification18">
        <xs:sequence>
          <xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification2_2" minOccurs="0"/>
          <xs:element name="LEI" type="LEIIdentifier"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FinancialInstitutionIdentification18_4">
    <xs:complexContent>
      <xs:restriction base="FinancialInstitutionIdentification18">
        <xs:sequence>
          <xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification2_3"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="GenericAccountIdentification1">
    <xs:sequence>
      <xs:element name="Id" type="Max34Text"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IdentificationAssignment3">
    <xs:sequence>
      <xs:element name="MsgId" type="Max35Text"/>
      <xs:element name="CreDtTm" type="ISODateTime"/>
      <xs:element name="Assgnr" type="Party40Choice"/>
      <xs:element name="Assgne" type="Party40Choice"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IdentificationAssignment3_2">
    <xs:complexContent>
      <xs:restriction base="IdentificationAssignment3">
        <xs:sequence>
          <xs:element name="MsgId" type="Max35Text_2"/>
          <xs:element name="CreDtTm" type="ISODateTime_2"/>
          <xs:element name="Assgnr" type="Party40Choice_2"/>
          <xs:element name="Assgne" type="Party40Choice_3"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="IdentificationInformation4">
    <xs:sequence>
      <xs:element name="Acct" type="CashAccount40"/>
      <xs:element name="Agt" type="BranchAndFinancialInstitutionIdentification6"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IdentificationInformation4_2">
    <xs:complexContent>
      <xs:restriction base="IdentificationInformation4">
        <xs:sequence>
          <xs:element name="Acct" type="CashAccount40_2"/>
          <xs:element name="Agt" type="BranchAndFinancialInstitutionIdentification6_4"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="IdentificationModification4">
    <xs:sequence>
      <xs:element name="Id" type="Max35Text"/>
      <xs:element name="OrgnlPtyAndAcctId" type="IdentificationInformation4"/>
      <xs:element name="UpdtdPtyAndAcctId" type="IdentificationInformation4"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IdentificationModification4_2">
    <xs:complexContent>
      <xs:restriction base="IdentificationModification4">
        <xs:sequence>
          <xs:element name="Id" type="Max35Text_2"/>
          <xs:element name="OrgnlPtyAndAcctId" type="IdentificationInformation4_2"/>
          <xs:element name="UpdtdPtyAndAcctId" type="IdentificationInformation4_2"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="IdentificationModificationAdviceV03">
    <xs:sequence>
      <xs:element name="Assgnmt" type="IdentificationAssignment3"/>
      <xs:element name="OrgnlTxRef" type="OriginalTransactionReference30"/>
      <xs:element name="Mod" type="IdentificationModification4" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IdentificationModificationAdviceV03_2">
    <xs:complexContent>
      <xs:restriction base="IdentificationModificationAdviceV03">
        <xs:sequence>
          <xs:element name="Assgnmt" type="IdentificationAssignment3_2"/>
          <xs:element name="OrgnlTxRef" type="OriginalTransactionReference30_2"/>
          <xs:element name="Mod" type="IdentificationModification4_2" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ISODateTime">
    <xs:restriction base="xs:dateTime"/>
  </xs:simpleType>
  <xs:simpleType name="ISODateTime_2">
    <xs:restriction base="ISODateTime">
      <xs:pattern value=".*(\+|-)((0[0-9])|(1[0-3])):[0-5][0-9]+"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="LEIIdentifier">
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z0-9]{18,18}[0-9]{2,2}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Max34Text">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="34"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Max35Text">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="35"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Max35Text_2">
    <xs:restriction base="Max35Text">
      <xs:pattern value="(M)[0-9]{8}[A-Za-z0-9]{12}(S|M|F)[A-Za-z0-9]{13}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Max35Text_3">
    <xs:restriction base="Max35Text">
      <xs:enumeration value="pacs.008.001.09"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Max35Text_4">
    <xs:restriction base="Max35Text">
      <xs:pattern value="([0-9a-zA-Z\-\?:\(\)\.,&apos;\+ ]([0-9a-zA-Z\-\?:\(\)\.,&apos;\+ ]*(/[0-9a-zA-Z\-\?:\(\)\.,&apos;\+ ])?)*)"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Max35Text_5">
    <xs:restriction base="Max35Text">
      <xs:minLength value="6"/>
      <xs:maxLength value="6"/>
      <xs:pattern value="[0-9]*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="OriginalTransactionReference30">
    <xs:sequence>
      <xs:element name="MsgId" type="Max35Text"/>
      <xs:element name="MsgNmId" type="Max35Text"/>
      <xs:element name="OrgnlTx" type="PaymentIdentification5" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="OriginalTransactionReference30_2">
    <xs:complexContent>
      <xs:restriction base="OriginalTransactionReference30">
        <xs:sequence>
          <xs:element name="MsgId" type="Max35Text_2"/>
          <xs:element name="MsgNmId" type="Max35Text_3"/>
          <xs:element name="OrgnlTx" type="PaymentIdentification5_2" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Party40Choice">
    <xs:choice>
      <xs:element name="Agt" type="BranchAndFinancialInstitutionIdentification6"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="Party40Choice_2">
    <xs:complexContent>
      <xs:restriction base="Party40Choice">
        <xs:choice>
          <xs:element name="Agt" type="BranchAndFinancialInstitutionIdentification6_2"/>
        </xs:choice>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Party40Choice_3">
    <xs:complexContent>
      <xs:restriction base="Party40Choice">
        <xs:choice>
          <xs:element name="Agt" type="BranchAndFinancialInstitutionIdentification6_3"/>
        </xs:choice>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PaymentIdentification5">
    <xs:sequence>
      <xs:element name="InstrId" type="Max35Text" minOccurs="0"/>
      <xs:element name="EndToEndId" type="Max35Text"/>
      <xs:element name="TxId" type="Max35Text" minOccurs="0"/>
      <xs:element name="UETR" type="UUIDv4Identifier"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="PaymentIdentification5_2">
    <xs:complexContent>
      <xs:restriction base="PaymentIdentification5">
        <xs:sequence>
          <xs:element name="InstrId" type="Max35Text_4" minOccurs="0"/>
          <xs:element name="EndToEndId" type="Max35Text_4"/>
          <xs:element name="TxId" type="Max35Text_4" minOccurs="0"/>
          <xs:element name="UETR" type="UUIDv4Identifier"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="UUIDv4Identifier">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
