<?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: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:ddtypes="http://www.mf.gov.pl/schematy/EDD/DDTYPES/2020/05/"
           xmlns:dd812="http://www.mf.gov.pl/schematy/EDD/DD812/2020/05/"
           targetNamespace="http://www.mf.gov.pl/schematy/EDD/DD812/2020/05/">
  <!--===============================================-->
  <!--=====                DD812                =====-->
  <!--===== Powiadomienie o przeładunku wyrobów =====-->
  <!--===============================================-->
  <!--===== Imports =====-->
  <xs:import namespace="http://www.mf.gov.pl/schematy/EDD/DDTYPES/2020/05/" schemaLocation="ddTypes.xsd" />
  <xs:import namespace="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE3:EMCS:V2.02" schemaLocation="types.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="DD812" type="dd812:DD812Type" />

  <!--===== EMCS Data Groups Declarations =====-->
  <xs:complexType name="DD812Type">
    <xs:sequence>
      <xs:element name="Header" type="tms:HeaderType" />
      <xs:element name="Body" type="dd812:BodyType" />
    </xs:sequence>
  </xs:complexType>

  <!--===== IE Specific Data Groups Declarations =====-->
  <xs:complexType name="BodyType">
    <xs:sequence>
      <xs:element name="TranshipmentOfProducts" type="dd812:TranshipmentOfProductsType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====               Transhipment Details             =====-->
  <!--==========================================================-->
  <xs:complexType name="TranshipmentOfProductsType">
    <xs:sequence>
      <xs:element name="DocumentReference" type="ddtypes:AdministrativeReferenceType" />
      <xs:element name="TranshipmentDetails" type="dd812:TranshipmentDetailsType" />
      <xs:element name="TransportDetails" type="ddtypes:DDTransportDetailsType" 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="TransportModeCode" type="emcs:TransportModeCodeType" minOccurs="0" />
      <xs:element name="PlaceOfTranshipment" type="dd812:PlaceOfTranshipmentType"/>
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====              Place Of Transhipment             =====-->
  <!--==========================================================-->
  <xs:complexType name="PlaceOfTranshipmentType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Miejsce przeładunku wyrobów" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="PlaceName" type="ddtypes:PlaceNameType" minOccurs="0" />
      <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:complexType>

</xs:schema>
