<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="StatusInformation" type="StatusInformationElementType"/>
  <xs:simpleType name="an..100">
    <xs:restriction base="xs:string">
      <xs:maxLength value="100"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..12">
    <xs:restriction base="xs:string">
      <xs:maxLength value="12"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..17">
    <xs:restriction base="xs:string">
      <xs:maxLength value="17"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..20">
    <xs:restriction base="xs:string">
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..22">
    <xs:restriction base="xs:string">
      <xs:maxLength value="22"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..35">
    <xs:restriction base="xs:string">
      <xs:maxLength value="35"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..350">
    <xs:restriction base="xs:string">
      <xs:maxLength value="350"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..4">
    <xs:restriction base="xs:string">
      <xs:maxLength value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..40">
    <xs:restriction base="xs:string">
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..45">
    <xs:restriction base="xs:string">
      <xs:maxLength value="45"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..50">
    <xs:restriction base="xs:string">
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an12">
    <xs:restriction base="xs:string">
      <xs:length value="12"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="chassisNumberType">
    <xs:restriction base="xs:string">
      <xs:maxLength value="17"/>
      <xs:pattern value="[^ioOI]{1,17}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ContactType">
    <xs:sequence>
      <xs:element name="Name" type="an..40" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Name des Ansprechpartners</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Name of contact person</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EMail" type="an..100" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">E-Mail-Adresse des Ansprechpartners</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Email address of contact person</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FAX" type="an..40" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">FAX-Nummer des Ansprechpartners</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Fax number of contact person</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Phone" type="an..40" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Telefonnummer des Ansprechpartners</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Phone number of contact person</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="controlTypeCode">
    <xs:annotation>
      <xs:documentation xml:lang="DE" source="Desc">Informationen zur Art der Kontrollmaßnahme</xs:documentation>
      <xs:documentation xml:lang="EN" source="Desc">Information concerning the type of control measures</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="B">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Name">Beschau</xs:documentation>
          <xs:documentation xml:lang="DE" source="Desc">Beschau</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Inspection of goods</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="D">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Name">Dokumentenvorlage</xs:documentation>
          <xs:documentation xml:lang="DE" source="Desc">Dokumentenvorlage</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Presentation of documents</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="R">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Name">Röntgen</xs:documentation>
          <xs:documentation xml:lang="DE" source="Desc">Röntgen</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">X-ray</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EmpChassisNumbersType">
    <xs:sequence>
      <xs:element name="ChassisNumber" type="chassisNumberType" maxOccurs="999">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Chassisnummer eines Fahrzeuges (Fahrgestellnummer) - Hinweis: Die Buchstaben "I" und "O" sind nicht zulässig. Stattdessen ist immer die Ziffer "1" (Eins) bzw. "0" (Null) zu senden.</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Chassis number of a vehicle - Remark: The characters "I" and "O" are not permitted. Instead the numbers "1" (one) and "0" (zero) are to be sent.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="EmpContainerNumbersType">
    <xs:sequence>
      <xs:element name="ContainerNumber" type="an..12" maxOccurs="999">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Containernummer</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Container number</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ExchangeType">
    <xs:sequence>
      <xs:element name="Transaction" type="TransactionType"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="mrnType">
    <xs:restriction base="xs:string">
      <xs:length value="18"/>
      <xs:pattern value="\d{2}[A-Z]{2}[a-zA-Z\d]{14}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="n..3">
    <xs:restriction base="xs:integer">
      <xs:pattern value="\d{1,3}"/>
      <xs:minInclusive value="1"/>
      <xs:totalDigits value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StatusHeaderType">
    <xs:sequence>
      <xs:element name="PreviousIOReference" type="an..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">IO-Referenz der Nachricht, auf welche sich diese Rückmeldung bezieht</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">IO reference of the message to which this confirmation refers.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StatusDateTime" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Datum und Uhrzeit zu welcher die Rückmeldung in EMP erzeugt wurde</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Date and time of creation of the confirmation in EMP</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="StatusInformationElementType">
    <xs:complexContent>
      <xs:extension base="ExchangeType">
        <xs:sequence>
          <xs:element name="Messages" type="StatusMessagesType"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StatusMessagesType">
    <xs:sequence>
      <xs:element name="Message" type="StatusMessageType" maxOccurs="999"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="StatusMessageType">
    <xs:sequence>
      <xs:element name="Header" type="StatusHeaderType"/>
      <xs:element name="PresenterCode" type="an..4" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">DAKOSY Teilnehmercode des Gestellenden</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">DAKOSY participant code of the presenter</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ForwarderReference" type="an..20" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Referenznummer des Gestellenden</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Reference number of presenter</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PortOrderReference" type="an12" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Die für diese Anmeldung vergebene Hafenauftrags-Referenz</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Port Order Reference assigned for this declaration</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReleaseDateTime" type="xs:dateTime" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Datum und Uhrzeit zu welcher die Freigabe im Zoll-System erzeugt wurde</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Date and time of creation of release in the customs system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CustomsContact" type="ContactType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Kontaktangaben eines Ansprechpartners (Name, E-Mail, FAX-Nummer und Telefonnummer)</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Contact information of contact person (name, email, fax and phone number)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StatusResults" type="StatusResultsType">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Liste von Status dieser Nachricht</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Status list of this message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ContainerNumbers" type="EmpContainerNumbersType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Containernummern der PortOrder</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Container number of Port Order</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChassisNumbers" type="EmpChassisNumbersType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Chassis-Nummern von Fahrzeugen der PortOrder</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Chassis number of vehicles of the Port Order</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="statusReferenceTypeCode">
    <xs:annotation>
      <xs:documentation xml:lang="DE" source="Desc">Referenztyp, auf den sich der Status bezieht</xs:documentation>
      <xs:documentation xml:lang="EN" source="Desc">Reference type where this status refers to</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="EQUIPMENT"/>
      <xs:enumeration value="LRN"/>
      <xs:enumeration value="MRN"/>
      <xs:enumeration value="PORT_ORDER"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="StatusResultsType">
    <xs:sequence>
      <xs:element name="StatusResult" type="StatusResultType" maxOccurs="999">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Informationen zu einem Status dieser Nachricht</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="StatusResultType">
    <xs:sequence>
      <xs:element name="Code" type="an..50">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Statuscode</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Status code</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReferenceType" type="statusReferenceTypeCode"/>
      <xs:element name="StatusType" type="statusTypeCode">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Art des Status</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Status type</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" type="an..45" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Textuelle Beschreibung des zuvor genannten Statuscodes</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Text description of previously named status code</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MRN" type="mrnType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Master Reference Number (vormals Movement Reference Number)</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Master Reference Number (previously Movement Reference Number)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MRNPosition" type="n..3" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Position der Master Reference Number (vormals Movement Reference Number)</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Position of Master Reference Number (previously Movement Reference Number)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LRN" type="an..22" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="Desc">Local Reference Number</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LRNPosition" type="n..3" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Position der Local Reference Number</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Position of Local Reference Number</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ContainerNumber" type="an..12" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Containernummer</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Container number</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChassisNumber" type="an..17" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Chassisnummer eines Fahrzeuges (Fahrgestellnummer) - Hinweis: Die Buchstaben "I" und "O" sind nicht zulässig. Stattdessen ist immer die Ziffer "1" (Eins) bzw. "0" (Null) zu senden.</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Chassis number of a vehicle - Remark: The characters "I" and "O" are not permitted. Instead the numbers "1" (one) and "0" (zero) are to be sent.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Control" type="controlTypeCode" minOccurs="0"/>
      <xs:element name="ControlText" type="an..12" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Zusätzliche Angaben</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Additional information</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AdditionalInformation" type="an..350" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Zusätzliche Angaben</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Additional information</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="statusTypeCode">
    <xs:annotation>
      <xs:documentation xml:lang="DE" source="Desc">Art des Status</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="COMMUNICATION"/>
      <xs:enumeration value="CUSTOMS"/>
      <xs:enumeration value="GATE"/>
      <xs:enumeration value="VALIDATION"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="TransactionType">
    <xs:sequence>
      <xs:element name="IOPartner" type="an..4">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">DAKOSY Teilnehmercode</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">DAKOSY participant code</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IOReference" type="an..35">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Einmalige und eindeutige Transaktionsidentifikationsreferenz</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Unique and unambiguous transaction identification reference</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IODateTime" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Datum und Uhrzeit der Nachrichtenerstellung - ISO 8601 Koordinierte Weltzeit (UTC) oder lokale Zeit mit Differenz zu UTC.</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Date and time of message creation - ISO 8601 Coordinated Universal Time (UTC) or local time with offset to UTC.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageVersion" type="an..12">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Verwendete Nachrichtenversion</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Used message version</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TestIndicator" type="xs:boolean" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="DE" source="Desc">Testkennzeichen - Gibt an, ob es sich bei der Nachricht um eine Testnachricht handelt. Wenn das Element nicht oder als "true" angegeben wurde, handelt es sich um eine Produktionsnachricht.</xs:documentation>
          <xs:documentation xml:lang="EN" source="Desc">Test indicator - Indicates whether or not the message is a test message. If the element ist not specified or specified as "true", it is about a production message.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
