<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.mf.gov.pl/schematy/SZPROT/e-Decyzje/WDWOS01/1.0.xsd" xmlns:ed="http://www.mf.gov.pl/schematy/SZPROT/Typy_eDecyzje/1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.mf.gov.pl/schematy/SZPROT/e-Decyzje/WDWOS01/1.0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <!--=====Oświadczenie/ zaświadczenie-->
  <xs:import namespace="http://www.mf.gov.pl/schematy/SZPROT/Typy_eDecyzje/1.0.xsd" schemaLocation="http://seap-intranet-ws:8080/seap_schematy/xsd?id=1022000"/>
  <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://seap-intranet-ws:8080/seap_schematy/xsd?id=10125"/>
  <xs:element name="WDWOS01">
    <xs:annotation>
      <xs:documentation source="rootName" xml:lang="pl">
        WDWOS01
      </xs:documentation>
      <xs:documentation source="rootDoc" xml:lang="pl">
        Oświadczenie/ zaświadczenie.
      </xs:documentation>
      <xs:documentation source="doc" xml:lang="pl">
        Element główny komunikatu z oświadczeniem/ zaświadczeniem.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Naglowek">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Dane ogólne oświadczenia
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="ed:NaglowekWnioskuType"/>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="WnioskodawcaPodmiot" type="ed:PodmiotPozwolenieType">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Podmiot składający oświadczenie/zaświadczenie
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Dane Podmiotu składającego oświadczenie/zaświadczenie
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Oswiadczenie" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Oświadczenie
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Informacje ogólne dotyczące składanego oświadczenia
            </xs:documentation>
            <xs:documentation source="rule">
              R515
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="kod" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Kod dokumentu
                </xs:documentation>
                <xs:documentation source="list">
                  1520
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="36"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="nazwa" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Nazwa dokumentu
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="140"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="dataPodpisania" type="xs:date" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Data podpisania oświadczenia
                </xs:documentation>
                <xs:documentation source="rule">
                  R521
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Zaswiadczenie" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Zaświadczenie
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Informacje ogólne dotyczące składanego zaświadczenia
            </xs:documentation>
            <xs:documentation source="rule">
              R515
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice>
              <xs:element name="WydanyPrzezUS" minOccurs="0">
                <xs:annotation>
                  <xs:documentation source="name" xml:lang="pl">
                    Urząd skarbowy wydający dokument
                  </xs:documentation>
                  <xs:documentation source="rule">
                    R516
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:attribute name="kodUS" use="required">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Kod urzędu skarbowego wydającego dokument
                      </xs:documentation>
                      <xs:documentation source="list">
                        012
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="4"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="nazwaUS" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Nazwa urzędu skarbowego wydającego dokument
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="255"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="WydanyPrzezZUS" minOccurs="0">
                <xs:annotation>
                  <xs:documentation source="name" xml:lang="pl">
                    Oddział Zakładu Ubezpieczeń Społecznych wydający dokument
                  </xs:documentation>
                  <xs:documentation source="rule">
                    R516
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:attribute name="kodZUS" use="required">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Kod placówki ZUS wydającej dokument
                      </xs:documentation>
                      <xs:documentation source="list">
                        019
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="36"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="nazwaZUS" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Nazwa placówki ZUS wydającej dokument
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="255"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attribute name="kod" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Kod dokumentu
                </xs:documentation>
                <xs:documentation source="list">
                  1520
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="36"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="nazwa" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Nazwa dokumentu
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="140"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="numer" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Numer dokumentu
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="35"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="wazneOd" type="xs:date" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Data początkowa ważności dokumentu
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="wazneDo" type="xs:date" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Data końcowa ważności dokumentu
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="GrupaVat" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Grupa VAT
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Informacje dotyczące grupy VAT
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="nip" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  NIP
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  NIP grupy VAT
                </xs:documentation>
                <xs:documentation source="rule">
                  R1018
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="10"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="wojewodztwoKod" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Kod województwa
                </xs:documentation>
                <xs:documentation source="list">
                  501A
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Kod TERYT województwa grupy VAT.
                </xs:documentation>
                <xs:documentation source="rule">
                  R1018
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="wojewodztwoNazwa" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Województwo
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Nazwa województwa Grupy VAT
                </xs:documentation>
                <xs:documentation source="rule"/>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="90"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="InformacjaDodatkowa" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Dodatkowe informacje 
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="tekst" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Tekst informacji dodatkowej.
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Zalacznik" type="ed:ZalacznikType" minOccurs="0" maxOccurs="9">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Załączony dokument
            </xs:documentation>
            <xs:documentation source="doc">
              Załączny dokument elektroniczny w postaci pliku lub numeru e-Dokumentu w podsystemie e-Dokumenty.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="SkladajacyWniosek" type="ed:SkladajacyWniosekType">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Data i dane osoby składającej wniosek 
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ds:Signature" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Podpis elektroniczny osoby składającej wniosek.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>