<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.00"
           xmlns:emcs="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:EMCS:V2.02"
           xmlns:pltypes="http://www.mf.gov.pl/schematy/EAD/PLTYPES/2019/10/"
           xmlns:tms="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:TMS:V2.02"
           xmlns:tcl="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:TCL:V2.02"
           xmlns:doc="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:DOC:V2.02"
           xmlns:ie="http://www.mf.gov.pl/schematy/EAD/PL812/2019/10/"
           targetNamespace="http://www.mf.gov.pl/schematy/EAD/PL812/2019/10/">
  <!--===============================================-->
  <!--=====          IE812:PL_TRS_SUB           =====-->
  <!--===== Powiadomienie o przeładunku wyrobów =====-->
  <!--===============================================-->
  <!--===== Imports =====-->
  <xs:import namespace="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:EMCS:V2.02" schemaLocation="types.xsd" />
  <xs:import namespace="http://www.mf.gov.pl/schematy/EAD/PLTYPES/2019/10/" schemaLocation="plTypes.xsd" />
  <xs:import namespace="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:TMS:V2.02" schemaLocation="tms.xsd" />
  <xs:import namespace="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:TCL:V2.02" schemaLocation="tcl.xsd" />
  <xs:import namespace="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:DOC:V2.02" schemaLocation="doc.xsd" />

  <!--===== Root Element =====-->
  <xs:element name="PL812" type="ie:PL812Type" />

  <!--===== EMCS Data Groups Declarations =====-->
  <xs:complexType name="PL812Type">
    <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="TranshipmentOfProducts" type="ie:TranshipmentOfProductsType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TranshipmentOfProductsType">
    <xs:sequence>
      <xs:element name="ExciseMovementEad" type="pltypes:ExciseMovementEadType" />
      <xs:element name="TranshipmentDetails" type="ie:TranshipmentDetailsType" />
      <xs:element name="NewTransportArrangerTrader" type="pltypes:TransportTraderType" minOccurs="0" />
      <xs:element name="NewTransporterTrader" type="pltypes:TransportTraderType" minOccurs="0" />
      <xs:element name="TransportDetails" type="pltypes:TransportDetailsType" minOccurs="0" maxOccurs="99" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====               Transhipment Details             =====-->
  <!--==========================================================-->
  <xs:complexType name="TranshipmentDetailsType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Szczegóły przeładunku" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="CompetentAuthorityReferenceNumber" type="emcs:ExciseOfficeCodeType" />
      <xs:element name="DateAndTimeOfTranshipment" type="emcs:DateTimeType"/>
      <xs:element name="ComplementaryInformation" type="emcs:ComplementaryInformationType" minOccurs="0" />
      <xs:element name="ChangedTransportArrangement" type="tcl:TransportArrangement" minOccurs="0" />
      <xs:element name="TransportModeCode" type="emcs:TransportModeCodeType" minOccurs="0" />
      <xs:element name="PlaceOfTranshipment" type="pltypes:PlaceOfTranshipmentType"/>
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                   Update Ead                   =====-->
  <!--==========================================================-->
  <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:sequence>
  </xs:complexType>

</xs:schema>
