<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:c="http://www.arimr.gov.pl/irzplus/xml/commons/"
            targetNamespace="http://www.arimr.gov.pl/irzplus/xml/commons/">

    <xsd:simpleType name="empty">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value=""/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="wartoscLogiczna">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="TAK"/>
            <xsd:enumeration value="NIE"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="numerDzialalnosci">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[0-9]{9}-[0-9]{3}"/>
            <xsd:pattern value=""/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="identyfikatorLochy">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[0-9]{15}"/>
            <xsd:pattern value=""/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="numerPartii">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[0-9]{1,14}"/>
            <xsd:pattern value=""/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="data_DDMMRRRR">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[0-9]{2}-[0-9]{2}-[0-9]{4}"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="positive_NNNN.N">
        <xsd:restriction base="xsd:decimal">
            <xsd:fractionDigits value="1" />
            <xsd:minExclusive value="0" />
            <xsd:maxExclusive value="9999.9" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="empty_or_positive_NNNN.N">
        <xsd:union memberTypes="c:empty c:positive_NNNN.N"/>
    </xsd:simpleType>

    <xsd:attributeGroup name="transport">
        <xsd:attribute name="wni-przewoznika" type="xsd:string" use="required"/>
        <xsd:attribute name="srodek-transportu" type="xsd:string" use="required"/>
        <xsd:attribute name="numer-rejestracyjny-srodka-transportu" type="xsd:string" use="required"/>
        <xsd:attribute name="transport-wlasny" type="c:wartoscLogiczna" use="required"/>
    </xsd:attributeGroup>



    <!-- slowniki -->
    <xsd:simpleType name="wartoscSlownika_SIA-SL02138_SIA-SL02137">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02266">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02128">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02127">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02271">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02267">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02268">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02143">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02111">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:simpleType name="wartoscSlownika_SIA-SL02145">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    
</xsd:schema>