<?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:dd818b="http://www.mf.gov.pl/schematy/EDD/DD818B/2020/05/"
           targetNamespace="http://www.mf.gov.pl/schematy/EDD/DD818B/2020/05/">
  <!--==================================================== -->
  <!--======                 DD818B                 ====== -->
  <!--====== ACCEPTED OR REJECTED REPORT OF RECEIPT ====== -->
  <!--==================================================== -->

  <!--===== Imports =====-->
  <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" />
  <xs:import namespace="http://www.mf.gov.pl/schematy/EDD/DDTYPES/2020/05/" schemaLocation="ddTypes.xsd" />

  <!--===== Root Element =====-->
  <xs:element name="DD818B" type="dd818b:DD818BType" />

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

  <!--===== DD Specific Data Groups Declarations =====-->
  <xs:complexType name="BodyType">
    <xs:sequence>
      <xs:element name="AcceptedOrRejectedReportOfReceipt" type="dd818b:AcceptedOrRejectedReportOfReceiptType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--===       AcceptedOrRejectedReportOfReceiptType        ===-->
  <!--==========================================================-->
  <xs:complexType name="AcceptedOrRejectedReportOfReceiptType">
    <xs:sequence>
      <xs:element name="Attributes" type="dd818b:AttributesType" minOccurs="0" />
      <xs:element name="DocumentReference" type="ddtypes:AdministrativeReferenceType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ConsigneeTraders" type="ddtypes:DDConsigneeTradersReceiptType" minOccurs="1" maxOccurs="unbounded"/>
      <xs:element name="BodyEDDInfo" type="dd818b:BodyEDDInfoType" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--===                  AttributesType                    ===-->
  <!--==========================================================-->
  <xs:complexType name="AttributesType">
    <xs:sequence>
      <xs:element name="DateAndTimeOfValidationOfReportOfReceipt" type="emcs:DateTimeType" />
      <xs:element name="RemainingQuantity" type="emcs:QuantityType" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--===                  BodyEDDInfoType                   ===-->
  <!--==========================================================-->
  <xs:complexType name="BodyEDDInfoType">
    <xs:annotation>
      <xs:documentation>
        <doc:description xml:lang="pl" value="e-DD Wyrób informacje"/>
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ExciseProductCode" type="emcs:ExciseProductCodeType"/>
      <xs:element name="CnCode" type="emcs:CnCodeType"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>