<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="EreignismitteilungNCTSDE" type="EreignismitteilungMETyp"/>
  <xs:simpleType name="an..1">
    <xs:restriction base="xs:string">
      <xs:maxLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..10">
    <xs:restriction base="xs:string">
      <xs:maxLength value="10"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..100">
    <xs:restriction base="xs:string">
      <xs:maxLength value="100"/>
    </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..18">
    <xs:restriction base="xs:string">
      <xs:maxLength value="18"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..2">
    <xs:restriction base="xs:string">
      <xs:maxLength value="2"/>
    </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..35">
    <xs:restriction base="xs:string">
      <xs:maxLength value="35"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..512">
    <xs:restriction base="xs:string">
      <xs:maxLength value="512"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..70">
    <xs:restriction base="xs:string">
      <xs:maxLength value="70"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="an..8">
    <xs:restriction base="xs:string">
      <xs:maxLength value="8"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ApplicationInternalDataAdditionalDetailsDataType">
    <xs:sequence>
      <xs:element name="Key" type="an..35" minOccurs="0"/>
      <xs:element name="Value" type="an..100" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ApplicationInternalDataAdditionalDetailsType">
    <xs:sequence>
      <xs:element name="Data" type="ApplicationInternalDataAdditionalDetailsDataType" minOccurs="0" maxOccurs="999"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ApplicationInternalDataType">
    <xs:sequence>
      <xs:element name="AdditionalDetails" type="ApplicationInternalDataAdditionalDetailsType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DatenaustauschNCTSTyp">
    <xs:sequence>
      <xs:element name="Transaktion" type="TransaktionNCTSTyp"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="EinzelEreignismitteilungTyp">
    <xs:sequence>
      <xs:element name="ObjektIdentifizierung" type="ObjektIdentifizierungMETyp" minOccurs="0"/>
      <xs:element name="TransitOperation" type="TransitOperationMEType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="EreignismitteilungMETyp">
    <xs:complexContent>
      <xs:extension base="DatenaustauschNCTSTyp">
        <xs:sequence>
          <xs:element name="EinzelEreignismitteilung" type="EinzelEreignismitteilungTyp" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="HolderOfTheTransitProcedureMEType">
    <xs:sequence>
      <xs:element name="IdentificationNumber" type="an..17" minOccurs="0"/>
      <xs:element name="Name" type="an..70" minOccurs="0"/>
      <xs:element name="StreetAndNumber" type="an..70" minOccurs="0"/>
      <xs:element name="City" type="an..35" minOccurs="0"/>
      <xs:element name="Postcode" type="an..17" minOccurs="0"/>
      <xs:element name="Country" type="an..2" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IncidentMEType">
    <xs:sequence>
      <xs:element name="Code" type="an..1" minOccurs="0"/>
      <xs:element name="Text" type="an..512" minOccurs="0"/>
      <xs:element name="DateOfEndorsement" type="xs:date" minOccurs="0"/>
      <xs:element name="AuthorityOfEndorsement" type="an..35" minOccurs="0"/>
      <xs:element name="PlaceOfEndorsement" type="an..35" minOccurs="0"/>
      <xs:element name="CountryOfEndorsement" type="an..2" minOccurs="0"/>
      <xs:element name="QualifierOfIdentificationOfLocation" type="an..1" minOccurs="0"/>
      <xs:element name="CountryOfLocation" type="an..2" minOccurs="0"/>
      <xs:element name="UNLocode" type="an..17" minOccurs="0"/>
      <xs:element name="Latitude" type="an..17" minOccurs="0"/>
      <xs:element name="Longitude" type="an..17" minOccurs="0"/>
      <xs:element name="StreetAndNumberOfLocation" type="an..70" minOccurs="0"/>
      <xs:element name="CityOfLocation" type="an..35" minOccurs="0"/>
      <xs:element name="PostcodeOfLocation" type="an..17" minOccurs="0"/>
      <xs:element name="TransportEquipment" type="TransportEquipmentMEType" minOccurs="0" maxOccurs="9999"/>
      <xs:element name="Transhipment" type="TranshipmentMEType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="n2">
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:pattern value="\d{2}"/>
      <xs:totalDigits value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="n3">
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:pattern value="\d{3}"/>
      <xs:totalDigits value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="n4">
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:pattern value="\d{4}"/>
      <xs:totalDigits value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ObjektIdentifizierungMETyp">
    <xs:sequence>
      <xs:element name="ObjektName" type="an..35" minOccurs="0"/>
      <xs:element name="EDIFACTNachrichtenNr" type="an..35" minOccurs="0"/>
      <xs:element name="ZeitpunktEingang" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="ShipmentReferenz" type="an..35" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="RepresentativeMEType">
    <xs:sequence>
      <xs:element name="IdentificationNumber" type="an..17" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TransaktionNCTSTyp">
    <xs:sequence>
      <xs:element name="IOPartner" type="an..100"/>
      <xs:element name="IODivision1" type="an..10" minOccurs="0"/>
      <xs:element name="IODivision2" type="an..10" minOccurs="0"/>
      <xs:element name="IODivision3" type="an..10" minOccurs="0"/>
      <xs:element name="IOReferenz" type="an..35"/>
      <xs:element name="IODatumZeit" type="xs:dateTime"/>
      <xs:element name="Version" type="n3" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TranshipmentMEType">
    <xs:sequence>
      <xs:element name="ContainerIndicator" type="an..1" minOccurs="0"/>
      <xs:element name="TypeOfIdentificationOfTransportMeans" type="an..2" minOccurs="0"/>
      <xs:element name="IdentificationNumberOfTransportMeans" type="an..35" minOccurs="0"/>
      <xs:element name="NationalityOfTransportMeans" type="an..2" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TransitOperationMEType">
    <xs:sequence>
      <xs:element name="MRN" type="an..18" minOccurs="0"/>
      <xs:element name="IncidentNotificationDateAndTime" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="CustomsOfficeOfDeparture" type="an..8" minOccurs="0"/>
      <xs:element name="CustomsOfficeOfIncidentRegistration" type="an..8" minOccurs="0"/>
      <xs:element name="HolderOfTheTransitProcedure" type="HolderOfTheTransitProcedureMEType" minOccurs="0"/>
      <xs:element name="Representative" type="RepresentativeMEType" minOccurs="0"/>
      <xs:element name="Incident" type="IncidentMEType" minOccurs="0" maxOccurs="9"/>
      <xs:element name="ApplicationInternalData" type="ApplicationInternalDataType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TransportEquipmentMEType">
    <xs:sequence>
      <xs:element name="NumberOfSeals" type="n2" minOccurs="0"/>
      <xs:element name="Seal" type="an..20" minOccurs="0" maxOccurs="99"/>
      <xs:element name="ContainerIdentificationNumber" type="an..17" minOccurs="0"/>
      <xs:element name="GoodsReference" type="n4" minOccurs="0" maxOccurs="9999"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
