<?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:emcstypes="http://www.mf.gov.pl/schematy/EMCSPL3/EMCSTYPES/2019/10/"
           targetNamespace="http://www.mf.gov.pl/schematy/EMCSPL3/EMCSTYPES/2019/10/">

  <!--==========================================================-->
  <!--===                     Fuel Type                      ===-->
  <!--==========================================================-->
  <xs:simpleType name="FuelTypeType">
    <xs:annotation>
      <xs:documentation xml:lang="pl" >
        Rodzaj paliwa
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:enumeration value="1">
        <xs:annotation>
          <xs:documentation>Skroplone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="2">
        <xs:annotation>
          <xs:documentation>Gazowe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3">
        <xs:annotation>
          <xs:documentation>Silnikowe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="4">
        <xs:annotation>
          <xs:documentation>Ciekłe</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>

  <!--==========================================================-->
  <!--=====           Guarantee Reference Number           =====-->
  <!--==========================================================-->
  <xs:simpleType name="GuaranteeReferenceNumberType">
    <xs:annotation>
      <xs:documentation>
        Numer GRN
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="17" />
      <xs:pattern value="[0-9]{2}PL[0-9]{4}(GD|GT|YD|YT|XD|ZD)[0-9]{7}" />
    </xs:restriction>
  </xs:simpleType>

  <!--==========================================================-->
  <!--=====     Guarantee Reference Number Access Code     =====-->
  <!--==========================================================-->
  <xs:simpleType name="GuaranteeReferenceNumberAccessCodeType">
    <xs:annotation>
      <xs:documentation>
        Kod dostępu do numeru GRN
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:pattern value="[0-9]{4}" />
      <xs:length value="4" />
    </xs:restriction>
  </xs:simpleType>

  <!--==========================================================-->
  <!--=====                       TIN                      =====-->
  <!--==========================================================-->
  <xs:simpleType name="TINType">
    <xs:annotation>
      <xs:documentation>
        Numer TIN
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:pattern value="PL[0-9]{10}" />
      <xs:length value="12" />
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
