<?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:dd803="http://www.mf.gov.pl/schematy/EDD/DD803/2020/05/"
           targetNamespace="http://www.mf.gov.pl/schematy/EDD/DD803/2020/05/">
  <!--=============================================-->
  <!--=====              DD803                =====-->
  <!--=============================================-->

  <!--===== 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="DD803" type="dd803:DD803Type" />

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

  <!--===== IE Specific Data Groups Declarations =====-->
  <xs:complexType name="BodyType">
    <xs:sequence>
      <xs:element name="NotificationOfDivertedEDD" type="dd803:NotificationOfDivertedEDDType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====          Notification Of Diverted EDD          =====-->
  <!--==========================================================-->
  <xs:complexType name="NotificationOfDivertedEDDType">
    <xs:sequence>
      <xs:element name="DeliveryNotification" type="dd803:DeliveryNotificationType" />
    </xs:sequence>
  </xs:complexType>

  <!--==========================================================-->
  <!--=====              Delivery Notification             =====-->
  <!--==========================================================-->
  <xs:complexType name="DeliveryNotificationType">
    <xs:annotation>
      <xs:documentation>
        <doc:description value="Powiadomienie dotyczące dokumentu dostawy" />
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="NotificationType" type="tcl:NotificationType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="NotificationDateAndTime" type="emcs:DateTimeType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="DocumentReference" type="ddtypes:AdministrativeReferenceType" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>