<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.00">
  <!--=========================================-->
  <!--===== IE340:E_PAN_DAT  -->
  <!--===== PRE-ARRIVAL NOTIFICATION  -->
  <!--===== ICS Domain Definition  -->
  <!--===== DDNIA v7.10  -->
  <!--===== Included Features: [10, 12, 18, 20, 26, 27, 28, 29]  -->
  <!--=========================================-->
  <!--===== Includes =====-->
  <xs:include schemaLocation="simple_types_ics.xsd" />
  <xs:include schemaLocation="simple_types.xsd" />
  <xs:include schemaLocation="complex_types.xsd" />
  <xs:include schemaLocation="tcl_ics.xsd" />
  <xs:include schemaLocation="tcl.xsd" />
  <xs:include schemaLocation="doc.xsd" />
  <!--===== Root Element =====-->
  <xs:element name="CC340A" type="CC340A" />
  <!--===== Root Element Content =====-->
  <xs:complexType name="CC340A">
    <xs:sequence>
      <xs:group ref="MESSAGE" />
      <xs:element name="HEAHEA" type="HEAHEA">
        <xs:annotation>
          <xs:documentation>
            <description value="HEADER" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PERLODSUMDEC" type="PERLODSUMDEC">
        <xs:annotation>
          <xs:documentation>
            <description value="(LODGING SUMMARY DECLARATION) PERSON" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CUSOFFENTACTOFF700" type="CUSOFFENTACTOFF700">
        <xs:annotation>
          <xs:documentation>
            <description value="(ACTUAL OFFICE OF ENTRY) CUSTOMS OFFICE" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TRACARENT601" type="TRACARENT601" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="(ENTRY CARRIER) TRADER" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TRAPREARR" type="TRAPREARR">
        <xs:annotation>
          <xs:documentation>
            <description value="(PRE-ARRIVAL) TRADER" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PREARRITE" type="PREARRITE" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            <description value="PRE-ARRIVAL ITEM" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== MESSAGE Content =====-->
  <xs:group name="MESSAGE">
    <xs:sequence>
      <xs:element name="MesSenMES3" type="Alphanumeric_Max35">
        <xs:annotation>
          <xs:documentation>
            <description value="Message sender" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesRecMES6" type="Alphanumeric_Max35">
        <xs:annotation>
          <xs:documentation>
            <description value="Message recipient" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DatOfPreMES9" type="DatePrepType">
        <xs:annotation>
          <xs:documentation>
            <description value="Date of preparation" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimOfPreMES10" type="TimeType">
        <xs:annotation>
          <xs:documentation>
            <description value="Time of preparation" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PriMES15" type="Alpha_1" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Priority" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TesIndMES18" type="Flag" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Test indicator" />
            <codeList name="Flag" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesIdeMES19" type="Alphanumeric_Max14">
        <xs:annotation>
          <xs:documentation>
            <description value="Message identification" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MesTypMES20" type="MessageTypes">
        <xs:annotation>
          <xs:documentation>
            <description value="Message type" />
            <codeList name="MessageTypes" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CorIdeMES25" type="Alphanumeric_Max14" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Correlation identifier" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <!--===== HEADER =====-->
  <xs:complexType name="HEAHEA">
    <xs:annotation>
      <xs:documentation>
        <description value="HEADER" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="TraModAtBorHEA76" type="Numeric_Max2">
        <xs:annotation>
          <xs:documentation>
            <description value="Transport mode at border" />
            <codeList name="TransportMode" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IdeOfMeaOfTraCroHEA85" type="Alphanumeric_Max27" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Identity of means of transport crossing border" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IdeOfMeaOfTraCroHEA85LNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Identity of means of transport crossing border LNG" />
            <codeList name="LanguageCodes" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NatOfMeaOfTraCroHEA87" type="CountryCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Nationality of means of transport crossing border" />
            <codeList name="CountryCodesFullList" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DecPlaHEA394" type="Alphanumeric_Max35">
        <xs:annotation>
          <xs:documentation>
            <description value="Declaration place" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DecPlaHEA394LNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Declaration place LNG" />
            <codeList name="LanguageCodes" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ConRefNumHEA" type="Alphanumeric_Max35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Conveyance reference number" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DecDatTimHEA114" type="DateTimeType">
        <xs:annotation>
          <xs:documentation>
            <description value="Declaration date and time" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TotNumConHEA" type="Numeric_Max5">
        <xs:annotation>
          <xs:documentation>
            <description value="Total number of containers" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PRELRNHEA" type="Alphanumeric_Max22">
        <xs:annotation>
          <xs:documentation>
            <description value="Pre-Arrival LRN" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== (LODGING SUMMARY DECLARATION) PERSON =====-->
  <xs:complexType name="PERLODSUMDEC">
    <xs:annotation>
      <xs:documentation>
        <description value="(LODGING SUMMARY DECLARATION) PERSON" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="NamPLD1" type="TradNameType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Name" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StrAndNumPLD1" type="StreetNumType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Street and number" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PosCodPLD1" type="PostalCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Postal code" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CitPLD1" type="CityType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="City" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CouCodPLD1" type="CountryCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Country code" />
            <codeList name="CountryCodesFullList" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PERLODSUMDECLNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="NAD LNG" />
            <codeList name="LanguageCodes" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TINPLD1" type="TINType">
        <xs:annotation>
          <xs:documentation>
            <description value="TIN" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== (ACTUAL OFFICE OF ENTRY) CUSTOMS OFFICE =====-->
  <xs:complexType name="CUSOFFENTACTOFF700">
    <xs:annotation>
      <xs:documentation>
        <description value="(ACTUAL OFFICE OF ENTRY) CUSTOMS OFFICE" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="RefNumCUSOFFENTACTOFF701" type="CORefNumType">
        <xs:annotation>
          <xs:documentation>
            <description value="Reference number" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== (ENTRY CARRIER) TRADER =====-->
  <xs:complexType name="TRACARENT601">
    <xs:annotation>
      <xs:documentation>
        <description value="(ENTRY CARRIER) TRADER" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="NamTRACARENT604" type="TradNameType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Name" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StrNumTRACARENT607" type="StreetNumType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Street and number" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PstCodTRACARENT606" type="PostalCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Postal code" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CtyTRACARENT603" type="CityType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="City" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CouCodTRACARENT605" type="CountryCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Country code" />
            <codeList name="CountryCodesFullList" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TRACARENT601LNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="NAD LNG" />
            <codeList name="LanguageCodes" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TINTRACARENT602" type="TINType">
        <xs:annotation>
          <xs:documentation>
            <description value="TIN" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== PRE-ARRIVAL ITEM =====-->
  <xs:complexType name="PREARRITE">
    <xs:annotation>
      <xs:documentation>
        <description value="PRE-ARRIVAL ITEM" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="PreArrIteNum2148" type="Numeric_Max5">
        <xs:annotation>
          <xs:documentation>
            <description value="Pre-arrival item number" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TRADOCDATPREARR" type="TRADOCDATPREARR">
        <xs:annotation>
          <xs:documentation>
            <description value="TRANSPORT DOCUMENT DATA" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CUSDATREFPREARR" type="CUSDATREFPREARR" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            <description value="CUSTOMS DATA REFERENCE" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CONPREARR" type="CONPREARR" minOccurs="0" maxOccurs="99">
        <xs:annotation>
          <xs:documentation>
            <description value="CONTAINERS" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--===== CUSTOMS DATA REFERENCE =====-->
  <xs:complexType name="CUSDATREFPREARR">
    <xs:annotation>
      <xs:documentation>
        <description value="CUSTOMS DATA REFERENCE" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MRNCusDatRef2018" type="Alphanumeric_Max21">
        <xs:annotation>
          <xs:documentation>
            <description value="MRN" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LRNCusDatRef2150" type="Alphanumeric_Max22" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="LRN" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CouCodOffFirEntDecCusDatRef2019" type="CountryCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Country code of Office of first Entry declared" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ComRefNumCusDatRef2151" type="Alphanumeric_Max70" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Commercial Reference Number" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IdeCroBorCusDatRef2152" type="Alphanumeric_Max27" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Identity of means of transport crossing border" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IdeCroBorCusDatRef2153LNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Identity of means of transport crossing border LNG" />
            <codeList name="LanguageCodes" type="business" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LoaPlaCusDatRef2154" type="AlphanumericSpecMax35Type" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Place of loading" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LoaPlaCusDatRef2155LNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Place of loading LNG" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="UnlPlaCusDatRef2156" type="AlphanumericSpecMax35Type" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Place of unloading" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="UnlPlaCusDatRef2157LNG" type="LanguageCodeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            <description value="Place of unloading LNG" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CUSDATREFDETPREARR" type="CUSDATREFDETPREARR" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            <description value="CUSTOMS DATA REFERENCE DETAILS" />
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>

