<?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:emcstypes="http://www.mf.gov.pl/schematy/EMCSPL3/EMCSTYPES/2019/10/"
           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/PL825/2019/10/"
           targetNamespace="http://www.mf.gov.pl/schematy/EAD/PL825/2019/10/">
  <!--=========================================-->
  <!--=====        IE825:E_SPL_SUB        =====-->
  <!--=====  Projekt podziału przesyłki   =====-->
  <!--=========================================-->
  <!--===== 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/EMCSPL3/EMCSTYPES/2019/10/" schemaLocation="emcsTypes.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="PL825" type="ie:PL825Type" />

  <!--===== EMCS Data Groups Declarations =====-->
  <xs:complexType name="PL825Type">
    <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="SubmittedDraftOfSplittingOperation" type="ie:SubmittedDraftOfSplittingOperationType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="SubmittedDraftOfSplittingOperationType">
    <xs:sequence>
      <xs:element name="SplittingEad" type="ie:SplittingEadType" />
      <xs:element name="SplitDetailsEad" type="ie:SplitDetailsEadType" minOccurs="2" maxOccurs="9" />
      <xs:element name="MsaOfSplitting" type="ie:MsaOfSplittingType" />
      <xs:element name="TranshipmentDetails" type="ie:TranshipmentDetailsType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                  Splitting Ead                 =====-->
  <!--==========================================================-->
  <xs:complexType name="SplittingEadType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(SPLITTING) E-AD" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="UpstreamArc" type="emcs:UpstreamArcType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                Split Details Ead               =====-->
  <!--==========================================================-->
  <xs:complexType name="SplitDetailsEadType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(SPLIT DETAILS) E-AD" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="LocalReferenceNumber" type="pltypes:LocalReferenceNumberType" />
      <xs:element name="JourneyTime" type="emcs:JourneyTimeType" minOccurs="0" />
      <xs:element name="ChangedTransportArrangement" type="tcl:TransportArrangement" minOccurs="0" />
      <xs:element name="DestinationChanged" type="ie:DestinationChangedType" />
      <xs:element name="NewConsigneeTrader" type="pltypes:ConsigneeTraderType" minOccurs="0" />
      <xs:element name="DeliveryPlaceTrader" type="pltypes:DeliveryPlaceTraderType" minOccurs="0" />
      <xs:element name="DeliveryPlaceCustomsOffice" type="pltypes:CustomsOfficeType" minOccurs="0" />
      <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:element name="BodyEad" type="ie:BodyEadType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====               Destination Changed              =====-->
  <!--==========================================================-->
  <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:SplittingDestinationTypeCode" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                    Body Ead                    =====-->
  <!--==========================================================-->
  <xs:complexType name="BodyEadType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="(BODY) E-AD" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="BodyRecordUniqueReference" type="emcs:BodyRecordUniqueReferenceType" />
      <xs:element name="ExciseProductCode" type="emcs:ExciseProductCodeType" />
      <xs:element name="CnCode" type="emcs:CnCodeType" />
      <xs:element name="Quantity" type="emcs:QuantityType" />
      <xs:element name="AdditionalQuantity" type="emcs:QuantityType" minOccurs="0" />
      <xs:element name="GrossWeight" type="emcs:GrossWeightType" />
      <xs:element name="NetWeight" type="emcs:NetWeightType" />
      <xs:element name="FuelType" type="emcstypes:FuelTypeType" minOccurs="0" />
      <xs:element name="NotColouredAndMarkedFuelOils" type="tcl:Flag" minOccurs="0" />
      <xs:element name="BiofuelContentMeetsQualityRequirements" type="tcl:Flag" minOccurs="0" />
      <xs:element name="FiscalMark" type="pltypes:LSDFiscalMarkType" minOccurs="0" />
      <xs:element name="FiscalMarkUsedFlag" type="tcl:Flag" minOccurs="0" />
      <xs:element name="Density" type="emcs:DensityType" minOccurs="0" />
      <xs:element name="CommercialDescription" type="pltypes:LSDCommercialDescriptionType" minOccurs="0" />
      <xs:element name="BrandNameOfProducts" type="pltypes:LSDBrandNameOfProductsType" minOccurs="0" />
      <xs:element name="Package" type="pltypes:PackageType" maxOccurs="99" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                 Msa Of Splitting               =====-->
  <!--==========================================================-->
  <xs:complexType name="MsaOfSplittingType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="MSA OF SPLITTING" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="MemberStateCode" type="emcs:MemberStateCodeType" />
    </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="PlaceOfTranshipment" type="pltypes:PlaceOfTranshipmentType"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>