<!--  Oznamenie na zauctovanie odvodov regulovanej osoby podla par. 9 ods. 1 o osobitnom odvode z podnikania v regulovaných odvetviach, vzor 2025  -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xsd:annotation>
        <xsd:documentation>OZNRO91v25 Oznamenie na zauctovanie odvodov regulovanej osoby podla par. 9 ods. 1 o osobitnom odvode z podnikania v regulovaných odvetviach, vzor 2025</xsd:documentation>
    </xsd:annotation>
    <!--  prazdny retazec  -->
    <xsd:simpleType name="emptyStrType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value=""/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  nepovinna suma  -->
    <xsd:simpleType name="optDec">
        <xsd:union memberTypes="suma13 emptyStrType"/>
    </xsd:simpleType>
    <!--  suma  -->
    <xsd:simpleType name="suma13">
        <xsd:restriction base="xsd:decimal">
            <xsd:totalDigits value="13"/>
            <xsd:fractionDigits value="2"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  nepovinne cislo 0.01 - 1.00  -->
    <xsd:simpleType name="optDec01">
        <xsd:union memberTypes="suma01 emptyStrType"/>
    </xsd:simpleType>
    <!--  suma01  -->
    <xsd:simpleType name="suma01">
        <xsd:restriction base="xsd:decimal">
            <xsd:totalDigits value="3"/>
            <xsd:fractionDigits value="2"/>
            <xsd:minExclusive value="0.00"/>
            <xsd:maxExclusive value="1.01"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  datum  -->
    <xsd:simpleType name="datum">
        <xsd:restriction base="xsd:string">
            <xsd:pattern
                value="(((([0])?[1-9])|([1-2][0-9])|([3][0]))[.]((([0])?[13-9])|([1][0-2]))[.]([0-9][0-9][0-9][0-9]))"/>
            <xsd:pattern value="([3][1][.]((([0])?[13578])|([1][02]))[.]([0-9][0-9][0-9][0-9]))"/>
            <xsd:pattern
                value="(((([0])?[1-9])|([1][0-9])|([2][0-8]))[.]([0])?[2][.]([0-9][0-9][0-9][0-9]))"/>
            <xsd:pattern value="([2][9][.]([0])?[2])[.][0-9][0-9][13579][26]"/>
            <xsd:pattern value="([2][9][.]([0])?[2])[.][0-9][0-9][02468][048]"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  nepovinny datum v tvare: (d)d.(m)m.rrrr  -->
    <xsd:simpleType name="optOneFieldDateType">
        <xsd:union memberTypes="datum emptyStrType"/>
    </xsd:simpleType>
    <!--   povinny den/mesiac v tvare: (d)d/(m)m   -->
    <xsd:simpleType name="dayMonthType">
        <xsd:restriction base="xsd:decimal">
            <xsd:pattern value="\d?\d"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--   nepovinny den/mesiac v tvare: (d)d/(m)m   -->
    <xsd:simpleType name="optDayMonthType">
        <xsd:union memberTypes="dayMonthType emptyStrType"/>
    </xsd:simpleType>
    <!--  povinny rok  -->
    <xsd:simpleType name="yearType">
        <xsd:restriction base="xsd:decimal">
            <xsd:pattern value="\d\d\d\d"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  nepovinny rok  -->
    <xsd:simpleType name="optYearType">
        <xsd:union memberTypes="yearType emptyStrType"/>
    </xsd:simpleType>
    <!--  nepovinny stvrtrok  -->
    <xsd:simpleType name="optStvrtRok">
        <xsd:union memberTypes="emptyStrType stvrtRokType"/>
    </xsd:simpleType>
    <!--  nepovinny checkbox  -->
    <xsd:simpleType name="checkbox">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="1"/>
            <xsd:enumeration value="0"/>
            <xsd:enumeration value="1"/>
            <xsd:enumeration value=""/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  stvrtrok  -->
    <xsd:simpleType name="stvrtRokType">
        <xsd:restriction base="xsd:int">
            <xsd:totalDigits value="1"/>
            <xsd:minExclusive value="0"/>
            <xsd:maxExclusive value="5"/>
        </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="only_0_1">
        <xsd:restriction base="xsd:decimal">
            <xsd:totalDigits value="1"/>
            <xsd:pattern value="[0-1]"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  korenovy element  -->
    <xsd:element name="dokument">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="hlavicka" type="hlavicka"/>
                <xsd:element name="odvod" type="odvodType"/>
                <xsd:element name="vypracoval" type="vypracovalType"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <!--  hlavicka  -->
    <xsd:complexType name="hlavicka">
        <xsd:sequence>
            <xsd:element name="dic" type="optDicType"/>
            <xsd:element name="ico" type="optIcoType"/>
            <xsd:element name="fyzickaOsoba" type="fyzickaOsobaType"/>
            <xsd:element name="pravnickaOsoba" type="pravnickaOsobaType"/>
            <xsd:element name="sidlo" type="sidloType"/>
            <xsd:element name="miestoPodnikaniaFO" type="sidloType"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  povinne dic  -->
    <xsd:simpleType name="dicType">
        <xsd:restriction base="xsd:decimal">
            <xsd:pattern value="\d{10}"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  nepovinne dic  -->
    <xsd:simpleType name="optDicType">
        <xsd:union memberTypes="dicType emptyStrType"/>
    </xsd:simpleType>
    <!--   povinne ico   -->
    <xsd:simpleType name="icoType">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="\d{8,12}"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--   nepovinne ico   -->
    <xsd:simpleType name="optIcoType">
        <xsd:union memberTypes="icoType emptyStrType"/>
    </xsd:simpleType>
    <!--  nepovinne dvojciferne cislo  -->
    <xsd:simpleType name="optInt2">
        <xsd:union memberTypes="cislo2 emptyStrType"/>
    </xsd:simpleType>
    <!--  nepovinne patciferne cislo  -->
    <xsd:simpleType name="optInt5">
        <xsd:union memberTypes="cislo5 emptyStrType"/>
    </xsd:simpleType>
    <!--  nepovinne desatciferne cislo  -->
    <xsd:simpleType name="optInt10">
        <xsd:union memberTypes="cislo10 emptyStrType"/>
    </xsd:simpleType>
    <!--  cele dvojciferne cislo  -->
    <xsd:simpleType name="cislo2">
        <xsd:restriction base="xsd:integer">
            <xsd:totalDigits value="2"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  cele patciferne cislo  -->
    <xsd:simpleType name="cislo5">
        <xsd:restriction base="xsd:integer">
            <xsd:totalDigits value="5"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  cele desatciferne cislo  -->
    <xsd:simpleType name="cislo10">
        <xsd:restriction base="xsd:integer">
            <xsd:totalDigits value="10"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 5 znakov  -->
    <xsd:simpleType name="string5">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="5"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 11 znakov  -->
    <xsd:simpleType name="string11">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="11"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 20 znakov  -->
    <xsd:simpleType name="string20">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="20"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 37 znakov  -->
    <xsd:simpleType name="string37">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="37"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 40 znakov  -->
    <xsd:simpleType name="string40">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="40"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 50 znakov  -->
    <xsd:simpleType name="string50">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="50"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 60 znakov  -->
    <xsd:simpleType name="string60">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="60"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  retazec o dlzke 100 znakov  -->
    <xsd:simpleType name="string100">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="100"/>
        </xsd:restriction>
    </xsd:simpleType>
    <!--  za obdobie  -->
    <xsd:complexType name="zaObdobieType">
        <xsd:sequence>
            <xsd:element name="datumOd" type="datum"/>
            <xsd:element name="datumDo" type="datum"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  fyzicka osoba  -->
    <xsd:complexType name="fyzickaOsobaType">
        <xsd:sequence>
            <xsd:element name="priezvisko" type="string40"/>
            <xsd:element name="meno" type="string40"/>
            <xsd:element name="titulPred" type="string20"/>
            <xsd:element name="titulZa" type="string20"/>
            <xsd:element name="datumNarodenia" type="optOneFieldDateType"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  pravnicka osoba  -->
    <xsd:complexType name="pravnickaOsobaType">
        <xsd:sequence>
            <xsd:element name="obchodneMeno" type="obchodneMenoType"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  obchodne meno  -->
    <xsd:complexType name="obchodneMenoType">
        <xsd:sequence>
            <xsd:element name="riadok" type="string37" maxOccurs="3"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  sidlo  -->
    <xsd:complexType name="sidloType">
        <xsd:sequence>
            <xsd:element name="ulica" type="string60"/>
            <xsd:element name="supisneOrientacneCislo" type="string20"/>
            <xsd:element name="psc" type="string5"/>
            <xsd:element name="obec" type="string40"/>
            <!--  <xsd:element name="stat" type="string40"/>  -->
        </xsd:sequence>
    </xsd:complexType>
    <!--  Odhad vysledku, koeficientu, vyska odvodu  -->
    <xsd:complexType name="odvodType">
        <xsd:sequence>
            <xsd:element name="vysledok" type="optDec"/>
            <xsd:element name="zaObdobie" type="zaObdobieType"/>
            <xsd:element name="koeficient" type="optDec01"/>
            <xsd:element name="zaklad" type="optDec"/>
            <xsd:element name="vynosDlhopisu" type="optDec"/>
            <xsd:element name="odvod" type="optDec"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  vypracoval  -->
    <xsd:complexType name="vypracovalType">
        <xsd:sequence>
            <xsd:element name="vypracoval" type="string50"/>
            <xsd:element name="dna" type="optOneFieldDateType"/>
            <xsd:element name="telefon" type="string20"/>
            <xsd:element name="podpis" type="checkbox" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <!--  telefonne cislo  -->
    <xsd:complexType name="telType">
        <xsd:sequence>
            <xsd:element name="cislo" type="string20"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>
