<?xml version="1.0" encoding="utf-8"?>
<!-- OZNÁMENIE
podľa § 7 zákona č. 519/2022 Z. z. o solidárnom príspevku z činností
v odvetviach ropy, zemného plynu, uhlia a rafinérií a o doplnení niektorých zákonov v znení neskorších predpisov (ďalej len „zákon“) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:annotation>
    <xs:documentation>OZNSOLPv24_1</xs:documentation>
  </xs:annotation>
  <!--  **************************************************************************  -->
  <!--                                ZAKLADNE TYPY                                 -->
  <!--  **************************************************************************  -->
  <!-- povinny checkbox -->
  <xs:simpleType name="only_0_1">
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="1"/>
      <xs:pattern value="[0-1]"/>
    </xs:restriction>
  </xs:simpleType>
  <!-- nepovinny checkbox -->
  <xs:simpleType name="space_0_1">
    <xs:union memberTypes="only_0_1 emptyStrType"/>
  </xs:simpleType>
  <!--  povinny datum v tvare: (d)d.(m)m.rrrr  -->
  <xs:simpleType name="oneFieldDateType">
    <xs:restriction base="xs:string">
      <xs:pattern value="\d?\d\.\d?\d\.\d\d\d\d"/>
    </xs:restriction>
  </xs:simpleType>
  <!--  prazdny retazec  -->
  <xs:simpleType name="emptyStrType">
    <xs:restriction base="xs:string">
      <xs:enumeration value=""/>
    </xs:restriction>
  </xs:simpleType>
  <!--  nepovinny datum v tvare: (d)d.(m)m.rrrr  -->
  <xs:simpleType name="optOneFieldDateType">
    <xs:union memberTypes="oneFieldDateType emptyStrType"/>
  </xs:simpleType>
  <!--  povinne dic  -->
  <xs:simpleType name="dicType">
    <xs:restriction base="xs:decimal">
      <xs:pattern value="\d{10}"/>
    </xs:restriction>
  </xs:simpleType>
  <!--  nepovinne dic  -->
  <xs:simpleType name="dicOptType">
    <xs:union memberTypes="dicType emptyStrType"/>
  </xs:simpleType>
  <!--  povinne ico  -->
  <xs:simpleType name="icoType">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="100000"/>
      <xs:maxInclusive value="999999999999"/>
    </xs:restriction>
  </xs:simpleType>
  <!--  nepovinne ico  -->
  <xs:simpleType name="icoOptType">
    <xs:union memberTypes="icoType emptyStrType"/>
  </xs:simpleType>
  <!--  retazec na max. 6 znakov  -->
  <xs:simpleType name="string6">
    <xs:restriction base="xs:string">
      <xs:maxLength value="6"/>
    </xs:restriction>
  </xs:simpleType>
  <!--  retazec na max. 4 znaky  -->
  <xs:simpleType name="string4">
    <xs:restriction base="xs:string">
      <xs:maxLength value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <!--  nepovinne decimal cislo  -->
  <xs:simpleType name="optDecimal">
    <xs:union memberTypes="xs:decimal emptyStrType"/>
  </xs:simpleType>
  <!-- cele dvojciferne cislo -->
  <xs:simpleType name="cislo2">
    <xs:restriction base="xs:integer">
      <xs:totalDigits value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <!-- nepovinne dvojciferne cislo -->
  <xs:simpleType name="optInt2">
    <xs:union memberTypes="cislo2 emptyStrType"/>
  </xs:simpleType>
  <!-- cele trojciferne cislo pravna forma-->
  <xs:simpleType name="pfType">
    <xs:restriction base="xs:integer">
      <xs:pattern value="\d{3}"/>
    </xs:restriction>
  </xs:simpleType>
  <!-- cele patciferne cislo SKNACE -->
  <xs:simpleType name="skNaceType">
    <xs:restriction base="xs:integer">
      <xs:pattern value="\d{5}"/>
    </xs:restriction>
  </xs:simpleType>
  <!-- nepovinne cele cislo -->
  <xs:simpleType name="optInt">
    <xs:union memberTypes="xs:integer emptyStrType"/>
  </xs:simpleType>
  <!--  **************************************************************************  -->
  <!--                                HLAVICKA                                      -->
  <!--  **************************************************************************  -->
  <!--  typ osoby  -->
  <xs:complexType name="typOsobyType">
    <xs:sequence>
      <xs:element name="fyzickaOsoba" type="only_0_1"/>
      <xs:element name="pravnickaOsoba" type="only_0_1"/>
      <xs:element name="zahranicnaOsoba" type="only_0_1"/>
    </xs:sequence>
  </xs:complexType>
  <!--  odvodove obdobie  -->
  <xs:complexType name="zdanovacieObdobieType">
    <xs:sequence>
      <xs:element name="datumOd" type="optOneFieldDateType"/>
      <xs:element name="datumDo" type="optOneFieldDateType"/>
    </xs:sequence>
  </xs:complexType>
  <!--  druh oznamenia  -->
  <xs:complexType name="druhOznameniaType">
    <xs:sequence>
      <xs:element name="riadne" type="only_0_1"/>
      <xs:element name="opravne" type="only_0_1"/>
      <xs:element name="dodatocne" type="only_0_1"/>
    </xs:sequence>
  </xs:complexType>
  <!--  hlavicka  -->
  <xs:complexType name="hlavicka">
    <xs:sequence>
      <xs:element name="dic" type="dicOptType"/>
      <xs:element name="ico" type="icoOptType"/>
      <xs:element name="pf" type="pfType"/>
      <xs:element name="skNace">
        <xs:simpleType>
          <xs:restriction base="skNaceType">
            <xs:pattern value="[\-+]?[0-9]+"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="hpc" type="xs:string"/>
      <xs:element name="druhOznamenia" type="druhOznameniaType"/>
      <xs:element name="zdanovacieObdobie" type="zdanovacieObdobieType"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                ODDIEL 1                                      -->
  <!--  **************************************************************************  -->
  <!--  obchodne meno na dva riadky  -->
  <xs:complexType name="obchodneMenoType">
    <xs:sequence>
      <xs:element name="riadok" type="xs:string" minOccurs="3" maxOccurs="3"/>
    </xs:sequence>
  </xs:complexType>
  <!--  Adresa sidla / trvaleho pobytu -->
  <xs:complexType name="adresaType">
    <xs:sequence>
      <xs:element name="ulica" type="xs:string"/>
      <xs:element name="supisneOrientacneCislo" type="xs:string"/>
      <xs:element name="psc" type="xs:string"/>
      <xs:element name="obec" type="xs:string"/>
      <xs:element name="stat" type="xs:string"/>
      <xs:element name="telefonneCislo" type="xs:string"/>
      <xs:element name="emailFax" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
  <!--  oddiel I  -->
  <xs:complexType name="oddiel1">
    <xs:sequence>
      <xs:element name="obchodneMeno" type="obchodneMenoType"/>
      <xs:element name="adresa" type="adresaType"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                ODDIEL 2                                      -->
  <!--  **************************************************************************  -->
  <!--  typ osoby, ktora podava oznamenie  -->
  <xs:complexType name="typOsobyPodavajucejOznamenieType">
    <xs:sequence>
      <xs:element name="zastupca" type="only_0_1"/>
      <xs:element name="dedic" type="only_0_1"/>
      <xs:element name="spravcaKK" type="only_0_1"/>
      <xs:element name="likvidator" type="only_0_1"/>
      <xs:element name="statutarnyZastupca" type="only_0_1"/>
      <xs:element name="pravnyNastupca" type="only_0_1"/>
    </xs:sequence>
  </xs:complexType>
  <!--  rodne cislo na 2 casti  -->
  <xs:complexType name="rodneCisloType">
    <xs:sequence>
      <xs:element name="rcPredLom" type="string6"/>
      <xs:element name="rcZaLom" type="string4"/>
    </xs:sequence>
  </xs:complexType>
  <!--  osoba, ktora podava oznamenie -->
  <xs:complexType name="osobaType">
    <xs:sequence>
      <xs:element name="priezvisko" type="xs:string"/>
      <xs:element name="meno" type="xs:string"/>
      <xs:element name="titulPred" type="xs:string"/>
      <xs:element name="titulZa" type="xs:string"/>
      <xs:element name="rodneCislo" type="rodneCisloType"/>
      <xs:element name="datumNarodenia" type="optOneFieldDateType"/>
      <xs:element name="dic" type="optInt"/>
      <xs:element name="obchodneMeno" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
  <!--  oddiel II  -->
  <xs:complexType name="oddiel2">
    <xs:sequence>
      <xs:element name="typOsobyPodavajucejOznamenie" type="typOsobyPodavajucejOznamenieType"/>
      <xs:element name="osoba" type="osobaType"/>
      <xs:element name="adresa" type="adresaType"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                ODDIEL 3                                      -->
  <!--  **************************************************************************  -->
  <!--  oddiel III  -->
  <xs:complexType name="oddiel3">
    <xs:sequence>
      <xs:element name="zaklad" type="optDecimal"/>
      <xs:element name="sadzba" type="optInt2"/>
      <xs:element name="prispevok" type="optDecimal"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                ODDIEL 4                                      -->
  <!--  **************************************************************************  -->
  <!--  oddiel IV  -->
  <xs:complexType name="oddiel4">
    <xs:sequence>
      <xs:element name="jednorazovo" type="space_0_1"/>
      <xs:element name="styriSplatky" type="space_0_1"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                ODDIEL 5                                      -->
  <!--  **************************************************************************  -->
  <!--  oddiel V  -->
  <xs:complexType name="oddiel5">
    <xs:sequence>
      <xs:element name="datumZisteniaNaPodanieDO" type="optOneFieldDateType"/>
      <xs:element name="uhradenaPrispevkovaPovinnost" type="optDecimal"/>
      <xs:element name="rozdielPrispevkuNaUhradu" type="optDecimal"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                PATICKA                                       -->
  <!--  **************************************************************************  -->
  <!--  paticka  -->
  <xs:complexType name="paticka">
    <xs:sequence>
      <xs:element name="datum" type="optOneFieldDateType"/>
      <xs:element name="podpis" type="space_0_1"/>
    </xs:sequence>
  </xs:complexType>
  <!--  **************************************************************************  -->
  <!--                                ODDIEL 6                                      -->
  <!--  **************************************************************************  -->
  <!--  oddiel VI  -->
  <xs:complexType name="oddiel6">
    <xs:sequence>
      <xs:element name="ziadamVrateniePreplatku" type="only_0_1"/>
      <xs:element name="iban" type="xs:string"/>
      <xs:element name="bankovyUcet" type="xs:string"/>
      <xs:element name="datum" type="optOneFieldDateType"/>
      <xs:element name="podpis" type="space_0_1"/>
    </xs:sequence>
  </xs:complexType>

  <!--  **************************************************************************  -->
  <!--                               KORENOVY ELEMENT                               -->
  <!--  **************************************************************************  -->
  <!--  korenovy element  -->
  <xs:element name="dokument">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="hlavicka" type="hlavicka"/>
        <xs:element name="oddiel1" type="oddiel1"/>
        <xs:element name="oddiel2" type="oddiel2"/>
        <xs:element name="oddiel3" type="oddiel3"/>
        <xs:element name="oddiel4" type="oddiel4"/>
        <xs:element name="paticka" type="paticka"/>
        <xs:element name="oddiel5" type="oddiel5"/>
        <xs:element name="oddiel6" type="oddiel6"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
