<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ie="http://www.icisnet.gr/emcs/phase3/v2.00/gr813/ie" xmlns:emcs="http://www.icisnet.gr/emcs/phase3/v2.00/types" xmlns:tms="http://www.icisnet.gr/emcs/phase3/v2.00/tms" xmlns:tcl="http://www.icisnet.gr/emcs/phase3/v2.00/tcl" xmlns:doc="http://www.icisnet.gr/emcs/phase3/v2.00/doc" targetNamespace="http://www.icisnet.gr/emcs/phase3/v2.00/gr813/ie" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.00">
  <!--=========================================-->
  <!--===== GR813:C_GR_UPD_DAT -->
  <!--===== CHANGE OF DESTINATION -->
  <!--=========================================-->
  <!--===== Imports =====-->
  <xs:import namespace="http://www.icisnet.gr/emcs/phase3/v2.00/types" schemaLocation="types.xsd" />
  <xs:import namespace="http://www.icisnet.gr/emcs/phase3/v2.00/tms" schemaLocation="tms.xsd" />
  <xs:import namespace="http://www.icisnet.gr/emcs/phase3/v2.00/tcl" schemaLocation="tcl.xsd" />
  <xs:import namespace="http://www.icisnet.gr/emcs/phase3/v2.00/doc" schemaLocation="doc.xsd" />
  <!--===== Root Element =====-->
  <xs:element name="GR813A" type="ie:GR813AType" />
  <!--===== EMCS Data Groups Declarations =====-->
  <xs:complexType name="GR813AType">
    <xs:sequence>
      <xs:element name="Header" type="tms:HeaderType" />
      <xs:element name="Body" type="ie:BodyType" />
    </xs:sequence>
  </xs:complexType>
  <!--===== IE Specific Data Groups Declarations =====-->
  <xs:complexType name="BodyType">
    <xs:sequence>
      <xs:element name="ChangeOfDestination" type="ie:ChangeOfDestinationType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChangeOfDestinationType">
    <xs:sequence>
      <xs:element name="Attributes" type="ie:AttributesType" />
      <xs:element name="NewTransportArrangerTrader" type="ie:NewTransportArrangerTraderType" minOccurs="0" />
      <xs:element name="UpdateEad" type="ie:UpdateEadType" />
      <xs:element name="DestinationChanged" type="ie:DestinationChangedType" />
      <xs:element name="NewTransporterTrader" type="ie:NewTransporterTraderType" minOccurs="0" />
      <xs:element name="TransportDetails" type="ie:TransportDetailsType" minOccurs="0" maxOccurs="99" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AttributesType">
    <xs:sequence>
      <xs:element name="DateAndTimeOfValidationOfChangeOfDestination" type="emcs:DateTimeType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="NewTransportArrangerTraderType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(NEW TRANSPORT ARRANGER) TRADER" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="VatNumber" type="emcs:VatNumberType" minOccurs="0" />
      <xs:element name="TraderName" type="emcs:TraderNameType" />
      <xs:element name="StreetName" type="emcs:StreetNameType" />
      <xs:element name="StreetNumber" type="emcs:StreetNumberType" minOccurs="0" />
      <xs:element name="Postcode" type="emcs:PostcodeType" />
      <xs:element name="City" type="emcs:CityType" />
    </xs:sequence>
    <xs:attribute name="language" type="emcs:LanguageCodeType" use="required" />
  </xs:complexType>
  <xs:complexType name="UpdateEadType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(UPDATE) E-AD" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="AdministrativeReferenceCode" type="emcs:AdministrativeReferenceCodeType" />
      <xs:element name="JourneyTime" type="emcs:JourneyTimeType" minOccurs="0" />
      <xs:element name="ChangedTransportArrangement" type="tcl:TransportArrangement" minOccurs="0" />
      <xs:element name="SequenceNumber" type="emcs:SequenceNumberType" minOccurs="0" />
      <xs:element name="InvoiceDate" type="emcs:DateType" minOccurs="0" />
      <xs:element name="InvoiceNumber" type="emcs:InvoiceNumberType" minOccurs="0" />
      <xs:element name="TransportModeCode" type="emcs:TransportModeCodeType" minOccurs="0" />
      <xs:element name="ComplementaryInformation" type="ie:LSDComplementaryInformationType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DestinationChangedType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(DESTINATION) CHANGED" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="DestinationTypeCode" type="tcl:ChangedDestinationTypeCode" />
      <xs:element name="NewConsigneeTrader" type="ie:NewConsigneeTraderType" minOccurs="0" />
      <xs:element name="DeliveryPlaceTrader" type="ie:DeliveryPlaceTraderType" minOccurs="0" />
      <xs:element name="DeliveryPlaceCustomsOffice" type="ie:DeliveryPlaceCustomsOfficeType" minOccurs="0" />
      <xs:element name="DestinationOffice" type="ie:DestinationOfficeType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="NewConsigneeTraderType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(NEW CONSIGNEE) TRADER" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Traderid" type="emcs:TraderidType" minOccurs="0" />
      <xs:element name="TraderName" type="emcs:TraderNameType" />
      <xs:element name="StreetName" type="emcs:StreetNameType" />
      <xs:element name="StreetNumber" type="emcs:StreetNumberType" minOccurs="0" />
      <xs:element name="Postcode" type="emcs:PostcodeType" />
      <xs:element name="City" type="emcs:CityType" />
	  <xs:element name="EoriNumber" type="emcs:EoriNumberType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="language" type="emcs:LanguageCodeType" use="required" />
  </xs:complexType>
  <xs:complexType name="DeliveryPlaceTraderType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(DELIVERY PLACE) TRADER" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Traderid" type="emcs:TraderidType" minOccurs="0" />
      <xs:element name="TraderName" type="emcs:TraderNameType" minOccurs="0" />
      <xs:element name="StreetName" type="emcs:StreetNameType" minOccurs="0" />
      <xs:element name="StreetNumber" type="emcs:StreetNumberType" minOccurs="0" />
      <xs:element name="Postcode" type="emcs:PostcodeType" minOccurs="0" />
      <xs:element name="City" type="emcs:CityType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="language" type="emcs:LanguageCodeType" use="optional" />
  </xs:complexType>
  <xs:complexType name="DeliveryPlaceCustomsOfficeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(DELIVERY PLACE) CUSTOMS OFFICE" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ReferenceNumber" type="emcs:ExciseOfficeCodeType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DestinationOfficeType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(DESTINATION) OFFICE" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ReferenceNumber" type="emcs:ExciseOfficeCodeType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="NewTransporterTraderType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(NEW TRANSPORTER) TRADER" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="VatNumber" type="emcs:VatNumberType" minOccurs="0" />
      <xs:element name="TraderName" type="emcs:TraderNameType" />
      <xs:element name="StreetName" type="emcs:StreetNameType" />
      <xs:element name="StreetNumber" type="emcs:StreetNumberType" minOccurs="0" />
      <xs:element name="Postcode" type="emcs:PostcodeType" />
      <xs:element name="City" type="emcs:CityType" />
    </xs:sequence>
    <xs:attribute name="language" type="emcs:LanguageCodeType" use="required" />
  </xs:complexType>
  <xs:complexType name="TransportDetailsType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="TRANSPORT DETAILS" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="TransportUnitCode" type="emcs:TransportUnitCodeType" />
      <xs:element name="IdentityOfTransportUnits" type="emcs:IdentityOfTransportUnitsType" minOccurs="0" />
      <xs:element name="CommercialSealIdentification" type="emcs:CommercialSealIdentificationType" minOccurs="0" />
      <xs:element name="ComplementaryInformation" type="ie:LSDComplementaryInformationType" minOccurs="0" />
      <xs:element name="SealInformation" type="ie:LSDSealInformationType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="LSDComplementaryInformationType">
    <xs:simpleContent>
      <xs:extension base="emcs:ComplementaryInformationType">
        <xs:attribute name="language" type="emcs:LanguageCodeType" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="LSDSealInformationType">
    <xs:simpleContent>
      <xs:extension base="emcs:SealInformationType">
        <xs:attribute name="language" type="emcs:LanguageCodeType" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:schema>

