<?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:ddtypes="http://www.mf.gov.pl/schematy/EDD/DDTYPES/2020/05/"
           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:dd829="http://www.mf.gov.pl/schematy/EDD/DD829/2020/05/"
           targetNamespace="http://www.mf.gov.pl/schematy/EDD/DD829/2020/05/">
  <!--=====================================================-->
  <!--=====                   DD829                   =====-->
  <!--=====      NOTIFICATION OF ACCEPTED EXPORT      =====-->
  <!--=====================================================-->
  
  <!--===== 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="DD829" type="dd829:DD829Type" />
  
  <!--===== EMCS Data Groups Declarations =====-->
  <xs:complexType name="DD829Type">
    <xs:sequence>
      <xs:element name="Header" type="tms:HeaderType" />
      <xs:element name="Body" type="dd829:BodyType" />
    </xs:sequence>
  </xs:complexType>
  
  <!--===== IE Specific Data Groups Declarations =====-->
  <xs:complexType name="BodyType">
    <xs:sequence>
      <xs:element name="NotificationOfAcceptedExport" type="dd829:NotificationOfAcceptedExportType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====         Notification Of Accepted Export        =====-->
  <!--==========================================================-->
  <xs:complexType name="NotificationOfAcceptedExportType">
    <xs:sequence>
      <xs:element name="Attributes" type="dd829:AttributesType" />
      <xs:element name="ConsigneeTrader" type="ddtypes:DDTraderType" minOccurs="0" maxOccurs="1" />
      <xs:element name="DeliveryPlaceTrader" type="ddtypes:DDTraderType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="DocumentReference" type="ddtypes:AdministrativeReferenceType" maxOccurs="99" />
      <xs:element name="ExportPlaceCustomsOffice" type="ddtypes:DDCustomsOfficeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="ExportAcceptance" type="dd829:ExportAcceptanceType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                   Attributes                   =====-->
  <!--==========================================================-->
  <xs:complexType name="AttributesType">
    <xs:sequence>
      <xs:element name="DateAndTimeOfIssuance" type="emcs:DateTimeType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====                Export Acceptance               =====-->
  <!--==========================================================-->
  <xs:complexType name="ExportAcceptanceType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="EXPORT ACCEPTANCE" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ReferenceNumberOfSenderCustomsOffice" type="emcs:ExciseOfficeCodeType" />
      <xs:element name="IdentificationOfSenderCustomsOfficer" type="emcs:IdentificationOfSenderCustomsOfficerType" minOccurs="0" maxOccurs="1" />
      <xs:element name="DateOfAcceptance" type="emcs:DateType" />
      <xs:element name="DocumentReferenceNumber" type="emcs:DocumentReferenceNumberType" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>