<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fn="metainfo.ispop.cz">
  <xsd:annotation id="obec" fn:field="Obec (příp. Kód KÚ nebo ORP)" />
  <xsd:annotation id="poplatek" fn:field="Poplatek" />
  <xsd:annotation id="rok" fn:field="Údaje za rok" />
  <xsd:annotation id="datum" fn:field="Datum" />
  <xsd:annotation id="statutar" fn:field="Jméno a příjmení statutárního zástupce provozovatele" />

  <xsd:annotation id="nazev" fn:field="Název" />
  <xsd:annotation id="ico" fn:field="Identifikační číslo - IČO" />
  <!--xsd:annotation id="obec" fn:field="Obec" / duplicita -->
  <xsd:annotation id="popisne" fn:field="Číslo popisné" />
  <xsd:annotation id="castObce" fn:field="Část obce; městská část/obvod" />
  <xsd:annotation id="orientacni" fn:field="Číslo orientační" />
  <xsd:annotation id="ulice" fn:field="Ulice" />
  <xsd:annotation id="psc" fn:field="PSČ" />

  <!--xsd:annotation id="nazev" fn:field="Název provozovny" / duplicita -->
  <xsd:annotation id="icp" fn:field="Identifikační číslo provozovny (IČP)" />
  <!--xsd:annotation id="obec" fn:field="" />
  <xsd:annotation id="popisne" fn:field="" />
  <xsd:annotation id="castObce" fn:field="" />
  <xsd:annotation id="orientacni" fn:field="" />
  <xsd:annotation id="ulice" fn:field="" />
  <xsd:annotation id="psc" fn:field="" / duplicita -->
  <xsd:annotation id="UTJ" fn:field="Územně technická jednotka (UTJ)" />

  <xsd:annotation id="jmeno" fn:field="Jméno" />
  <xsd:annotation id="telefonPredvolba" fn:field="Telefon (předvolba)" />
  <xsd:annotation id="telefon" fn:field="Telefon" />
  <xsd:annotation id="prijmeni" fn:field="Příjmení" />
  <xsd:annotation id="mobilPredvolba" fn:field="Mobilní telefon (předvolba)" />
  <xsd:annotation id="mobil" fn:field="Mobilní telefon" />
  <xsd:annotation id="email" fn:field="Elektronická adresa (e-mail)" />
  <xsd:annotation id="faxPredvolba" fn:field="Fax (předvolba)" />
  <xsd:annotation id="fax" fn:field="Fax" />


  <xsd:annotation id="cislo" fn:field="Pořadové číslo zdroje" />
  <xsd:annotation id="kategorie" fn:field="Kategorie zdroje" />
  <xsd:annotation id="sektor" fn:field="Označení sektoru" />
  <!--xsd:annotation id="nazev" fn:field="Název zdroje" / duplicita -->
  <xsd:annotation id="ucinnost" fn:field="Účinnost" />
  <xsd:annotation id="tepelnyVykon" fn:field="Jmenovitý tepelný výkon" />
  <xsd:annotation id="elektrickyVykon" fn:field="Instalovaný elektrický výkon" />
  <xsd:annotation id="tepelnyPrikon" fn:field="Jmenovitý tepelný příkon" />
  <xsd:annotation id="kapacita" fn:field="Projektovaná kapacita spalovny odpadu" />
  <xsd:annotation id="druhTopeniste" fn:field="Druh topeniště" />
  <xsd:annotation id="provozniHodiny" fn:field="Provozní hodiny" />
  <xsd:annotation id="vyuzitiKapcity" fn:field="Využití kapacity" />
  <xsd:annotation id="vyrobaTepla" fn:field="Celková výroba tepla" />
  <xsd:annotation id="kombinovane" fn:field="Kombinovaná výroba tepla a el. energie" />

  <xsd:annotation id="nazevPalivo" fn:field="Druh paliva nebo odpadu" />
  <xsd:annotation id="vyhrevnostPaliva" fn:field="Výhřevnost paliva" />
  <xsd:annotation id="spotrebaPaliva" fn:field="Spotřeba paliva nebo odpadů" />

  <xsd:annotation id="emiseTZL" fn:field="TZL" />
  <xsd:annotation id="emiseSO2" fn:field="SO2" />
  <xsd:annotation id="emiseNOx" fn:field="NOx" />
  <xsd:annotation id="emiseCO" fn:field="CO" />

  <xsd:annotation id="typ" fn:field="Název látky" />
  <xsd:annotation id="mnozstvi" fn:field="Množství" />

  <!--xsd:annotation id="cislo" fn:field="" / duplicita -->

  <xsd:annotation id="TZL" fn:field="TZL" />
  <xsd:annotation id="SO2" fn:field="SO2" />
  <xsd:annotation id="NOx" fn:field="NOx" />
  <xsd:annotation id="CO" fn:field="CO" />

  <!--xsd:annotation id="nazev" fn:field="" />
  <xsd:annotation id="mnozstvi" fn:field="" />
  <xsd:annotation id="poplatek" fn:field="Poplatek" / duplicita -->

  <xsd:annotation id="poplatekCelkem" fn:field="Poplatek celkem za zdroj" />


  <!--xsd:annotation id="cislo" fn:field="" />
  <xsd:annotation id="kategorie" fn:field="" />
  <xsd:annotation id="sektor" fn:field="" />
  <xsd:annotation id="nazev" fn:field="" / duplicita -->
  <xsd:annotation id="nevyjmenovany" fn:field="Název nevyjmenovaného zdroje" />

  <!--xsd:annotation id="nazevPalivo" fn:field="" />
  <xsd:annotation id="vyhrevnostPaliva" fn:field="" />
  <xsd:annotation id="spotrebaPaliva" fn:field="" / duplicita -->

  <xsd:annotation id="spotrebaVOCa" fn:field="Spotřeba VOC dle § 3a)" />
  <xsd:annotation id="spotrebaVOCb" fn:field="Spotřeba VOC dle § 3b)" />
  <xsd:annotation id="spotrebaVOCc" fn:field="Spotřeba VOC dle § 3c)" />
  <xsd:annotation id="druhVyrobku" fn:field="Druh výrobku" />
  <xsd:annotation id="mnozstviVyrobku" fn:field="Množství výrobku" />
  <!--xsd:annotation id="emiseTZL" fn:field="" />
  <xsd:annotation id="emiseSO2" fn:field="" />
  <xsd:annotation id="emiseNOx" fn:field="" />
  <xsd:annotation id="emiseCO" fn:field="" / duplicita -->
  <xsd:annotation id="emiseVOC" fn:field="VOC" />
  <xsd:annotation id="emiseNH3" fn:field="NH3" />

  <!--xsd:annotation id="typ" fn:field="" />
  <xsd:annotation id="mnozstvi" fn:field="" / duplicita -->

  <!--xsd:annotation id="cislo" fn:field="" />
  <xsd:annotation id="TZL" fn:field="" />
  <xsd:annotation id="SO2" fn:field="" />
  <xsd:annotation id="NOx" fn:field="" />
  <xsd:annotation id="CO" fn:field="" / duplicita -->
  <xsd:annotation id="VOC" fn:field="VOC" />
  <xsd:annotation id="NH3" fn:field="NH3" />

  <!--xsd:annotation id="nazev" fn:field="" />
  <xsd:annotation id="mnozstvi" fn:field="" />
  <xsd:annotation id="poplatek" fn:field="" / duplicita -->

  <!--xsd:annotation id="poplatekCelkem" fn:field="" / duplicita -->


  <!--xsd:annotation id="cislo" fn:field="Pořadové číslo výduchu " / DUPLICITA!!! -->
  <xsd:annotation id="fiktivni" fn:field="Fiktivní komín" />
  <xsd:annotation id="zdroj" fn:field="Pořadové číslo zdroje zaústěného do komína" />
  <xsd:annotation id="vyska" fn:field="Výška komínu" />
  <xsd:annotation id="prurez" fn:field="Průřez v koruně komínu, průřezu výduchu" />
  <xsd:annotation id="souradniceNdeg" fn:field="Zeměpisné souřadnice paty komínu nebo výduchu (N)" />
  <xsd:annotation id="souradniceNmin" fn:field="Zeměpisné souřadnice paty komínu nebo výduchu (N)" />
  <xsd:annotation id="souradniceNsec" fn:field="Zeměpisné souřadnice paty komínu nebo výduchu (N)" />
  <xsd:annotation id="souradniceEdeg" fn:field="Zeměpisné souřadnice paty komínu nebo výduchu (E)" />
  <xsd:annotation id="souradniceEmin" fn:field="Zeměpisné souřadnice paty komínu nebo výduchu (E)" />
  <xsd:annotation id="souradniceEsec" fn:field="Zeměpisné souřadnice paty komínu nebo výduchu (E)" />
  <xsd:annotation id="rychlostPlynu" fn:field="Průměrná rychlost plynů" />
  <xsd:annotation id="teplotaPlynu" fn:field="Průměrná teplota plynů" />

  <xsd:annotation id="PetAzSestnact" fn:field="Denní režim (hod)" />
  <xsd:annotation id="ctrnactAzPulnoc" fn:field="Denní režim (hod)" />
  <xsd:annotation id="dvacetazOsm" fn:field="Denní režim (hod)" />

  <xsd:annotation id="pracDny" fn:field="Týdenní režim" />
  <xsd:annotation id="soboty" fn:field="Týdenní režim" />
  <xsd:annotation id="nedele" fn:field="Týdenní režim" />

  <xsd:annotation id="ADekada" fn:field="Roční režim" />
  <xsd:annotation id="BDekada" fn:field="Roční režim" />
  <xsd:annotation id="CDekada" fn:field="Roční režim" />
  <xsd:annotation id="DDekada" fn:field="Roční režim" />

  <xsd:annotation id="casRezim" fn:field="Časový režim" />

  <!--xsd:annotation id="provozniHodiny" fn:field="Provozní hodiny" / duplicita -->
  <xsd:annotation id="odlucovace" fn:field="Druh odlučovače" />
  <!--xsd:annotation id="emiseTZL" fn:field="" />
  <xsd:annotation id="emiseSO2" fn:field="" />
  <xsd:annotation id="emiseNOx" fn:field="" />
  <xsd:annotation id="emiseCO" fn:field="" />
  <xsd:annotation id="emiseVOC" fn:field="" />

  <xsd:annotation id="typ" fn:field="" />
  <xsd:annotation id="mnozstvi" fn:field="" / duplicita -->


  <!--xsd:annotation id="cislo" fn:field="" / duplicita -->

  <!--xsd:annotation id="datum" fn:field="Datum" / DUPLICITA!!! -->
  <!--xsd:annotation id="emiseTZL" fn:field="" />
  <xsd:annotation id="emiseSO2" fn:field="" />
  <xsd:annotation id="emiseNOx" fn:field="" />
  <xsd:annotation id="emiseCO" fn:field="" />
  <xsd:annotation id="emisoVOC" fn:field="" /-->

  <xsd:annotation id="latka" fn:field="Látka" />
  <xsd:annotation id="koncentrace" fn:field="Hmot. koncentrace" />
  <xsd:annotation id="jednotkaKoncentrace" fn:field="Jednotka koncentrace" />
  <xsd:annotation id="MVE" fn:field="MVE (měrná výrobní emise)" />
  <xsd:annotation id="MVEjednotka" fn:field="Jednotka MVE" />


  <!--xsd:annotation id="cislo" fn:field="" / duplicita -->

  <xsd:annotation id="celkovyObsah" fn:field="Celkový obsah VOC v kg/kg produktu" />
  <xsd:annotation id="obsahNetekavych" fn:field="Obsah netěkavých látek (sušiny) v produktu v objemových %" />
  <xsd:annotation id="hustota" fn:field="Hustota produktu" />

  <xsd:annotation id="VOCvstup" fn:field="Celková hmotnost VOC na vstupu do procesů" />
  <xsd:annotation id="VOCrecyklace" fn:field="Celková hmotnost VOC, které jsou recyklovány" />

  <xsd:annotation id="vPlynu" fn:field="VOC v odpadním plynu (v emisích)" />
  <xsd:annotation id="veVode" fn:field="VOC v odpadní vodě" />
  <xsd:annotation id="rezidua" fn:field="VOC jako rezidua v expedovaných produktech" />
  <xsd:annotation id="odvetrani" fn:field="VOC volně unikající do ovzduší (odvětrávání)" />
  <xsd:annotation id="zachyceno" fn:field="Hmotnost zachycených nebo zakotvených VOC" />
  <xsd:annotation id="shromazdeno" fn:field="VOC ve shromážděných odpadech" />
  <xsd:annotation id="komercniProdukt" fn:field="VOC v přípravcích expedovaných jako komerční produkt" />
  <xsd:annotation id="regenerace" fn:field="VOC v rozpouštědlech určených k regeneraci" />
  <xsd:annotation id="uvolnenoJinak" fn:field="VOC uvolněných do ŽP jiným způsobem" />

  <xsd:annotation id="radekA" fn:field="C = I1 - O8" />
  <xsd:annotation id="radekB" fn:field="N = suroviny * podíl sušiny" />
  <xsd:annotation id="radekC" fn:field="F = I1 - O1 - O5 - O6 - O7 - O8, nebo F = O2 + O3 + O4 + O9" />
  <xsd:annotation id="radekD" fn:field="E = F + O1" />
  <xsd:annotation id="radekE1" fn:field="MVEfe = F [g nebo kg] / roční produkce" />
  <xsd:annotation id="radekE2" fn:field="MVEfe = F [g] / roční produkce [m2]" />
  <xsd:annotation id="radekE3" fn:field="MVEfe = F [g] / roční produkce (počet vyrobených párů)" />
  <xsd:annotation id="radekE4" fn:field="MVEfe = F [kg] / roční produkce [m3]" />
  <xsd:annotation id="radekF1" fn:field="MVEce = E [g nebo kg] / roční produkce" />
  <xsd:annotation id="radekF2" fn:field="MVEce = E [g] / roční produkce [m2]" />
  <xsd:annotation id="radekF3" fn:field="MVEce = E [g] / roční produkce (počet vyrobených párů)" />
  <xsd:annotation id="radekF4" fn:field="MVEce = E [kg] / roční produkce [m3]" />
  <xsd:annotation id="radekG" fn:field="EPfe = F * 100 / (I1 + I2)" />
  <xsd:annotation id="radekH" fn:field="EPce = E * 100 / (I1 + I2)" />


  <!--xsd:annotation id="nazev" fn:field="" />
  <xsd:annotation id="ico" fn:field="" / duplicita -->
  <xsd:annotation id="pracovnik" fn:field="Jméno odpovědného pracovníka" />
  <!--xsd:annotation id="telefon" fn:field="" />
  <xsd:annotation id="fax" fn:field="" / duplicita -->
  <xsd:annotation id="cinnost" fn:field="Označení činnosti dle přílohy č. 1" />
  <xsd:annotation id="spotrebaA" fn:field="Celková roční spotřeba těkavých organických látek" />
  <xsd:annotation id="spotrebaB" fn:field="Celková roční spotřeba halogenovaných těkavých organických látek" />
  <xsd:annotation id="spotrebaC" fn:field="Celková roční či jednorázová spotřeba těkavých organických látek" />
  <xsd:annotation id="plneni" fn:field="Předepsané emisní limity jsou" />
  <!--xsd:annotation id="datum" fn:field="Datum" / duplicita -->

  <xsd:annotation id="verze" fn:field="Verze dokumentu" />
  <xsd:annotation id="revize" fn:field="Revize dokumentu" />
  <xsd:annotation id="subRevize" fn:field="Subrevize dokumentu" />
  <xsd:annotation id="podepsano" fn:field="El. podpis" />


  <xsd:element name="F_OVZ_SPOJ">
    <xsd:complexType>
      <!-- tady bude xsd:all, predtim je vsak nutne zabalit "oznameniRozpoustedla" do nadrazeneho elementu (napr. "oznameniRozpoustedla") -->
      <xsd:sequence>
        <xsd:element name="uvod">
          <xsd:complexType>
            <xsd:all>
              <xsd:element name="obec">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:pattern value="(\d{4})|(CZ0\d{2})"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
              <xsd:element name="poplatek" type="xsd:decimal" />
              <xsd:element name="rok" >
                <xsd:simpleType>
                  <xsd:restriction base="xsd:integer">
                    <xsd:minInclusive value="2009" />
                    <xsd:maxInclusive value="2010" />
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
              <xsd:element name="datum" type="xsd:date" />
              <xsd:element name="statutar" type="xsd:string" minOccurs="0"/>
              
              <xsd:element name="provozovatel">
                <xsd:complexType>
                  <xsd:all>
                    <xsd:element name="nazev" type="NotEmptyStringType" />
                    <xsd:element name="ico" type="ICType" />
                    <xsd:element name="obec" type="NotEmptyStringType" />
                    <xsd:element name="popisne" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="castObce" type="xsd:string"  minOccurs="0"/>
                    <xsd:element name="orientacni" type="xsd:string" minOccurs="0" />
                    <xsd:element name="ulice" type="xsd:string"  minOccurs="0"/>
                    <xsd:element name="psc" type="PscType" />
                  </xsd:all>
                </xsd:complexType>
              </xsd:element>
              
              <xsd:element name="provozovna">
                <xsd:complexType>
                  <xsd:all>
                    <xsd:element name="nazev" type="NotEmptyStringType" />
                    <xsd:element name="icp">
                      <xsd:simpleType>
                        <xsd:restriction base="xsd:string">
                          <xsd:pattern value="\d{8}[12]"/>
                        </xsd:restriction>
                      </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name="obec" type="NotEmptyStringType" />
                    <xsd:element name="popisne" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="castObce" type="xsd:string" minOccurs="0" />
                    <xsd:element name="orientacni" type="xsd:string" minOccurs="0" />
                    <xsd:element name="ulice" type="xsd:string" minOccurs="0" />
                    <xsd:element name="psc" type="PscType" />
                    <xsd:element name="UTJ">
                      <xsd:simpleType>
                        <xsd:restriction base="xsd:integer">
                          <xsd:pattern value="[6-9]\d{5}" />
                        </xsd:restriction>
                      </xsd:simpleType>
                    </xsd:element>
                  </xsd:all>
                </xsd:complexType>
              </xsd:element>
              
              <xsd:element name="zpracovatel">
                <xsd:complexType>
                  <xsd:all>
                    <xsd:element name="jmeno" type="xsd:string" minOccurs="0" />
                    <xsd:element name="telefonPredvolba" type="xsd:string" minOccurs="0" />
                    <xsd:element name="telefon" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="prijmeni" type="xsd:string" minOccurs="0" />
                    <xsd:element name="mobilPredvolba" type="xsd:string" minOccurs="0" />
                    <xsd:element name="mobil" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="email" type="NotEmptyStringType" />
                    <xsd:element name="faxPredvolba" type="xsd:string" minOccurs="0" />
                    <xsd:element name="fax" type="xsd:decimal" minOccurs="0" />
                  </xsd:all>
                </xsd:complexType>
              </xsd:element>
            </xsd:all>
          </xsd:complexType>
        </xsd:element>

        <xsd:element name="spalovaciZdroje" type="SpalovaciZdrojeType" minOccurs="0">
          <!-- prozatim reseno pomoci logickych validaci
          <xsd:key name="cisloZdrojeKey">
            <xsd:selector xpath ="./Zdroje/zdroj" />
            <xsd:field xpath="cislo" />
          </xsd:key>
          <xsd:keyref name="cisloZdrojeKeyRef" refer="cisloZdrojeKey">
            <xsd:selector xpath="./poplatkySpalovaciZdroje/poplatekZdroj/zdroje/zdroj" />
            <xsd:field xpath="cislo" />
          </xsd:keyref>
          -->
        </xsd:element>
        <xsd:element name="ostatniZdroje" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="zdroj" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <!-- tady bude xsd:all, predtim je vsak nutne zabalit "palivo" do nadrazeneho elementu (napr. "paliva"), to same plati pro "emise" -->
                  <xsd:sequence>
                    <xsd:element name="cislo" type="CisloZdrojeOstatniType" />
                    <xsd:element name="kategorie" type="NotEmptyStringType" />
                    <xsd:element name="sektor" type="NotEmptyStringType" />
                    <xsd:element name="nazev" type="NotEmptyStringType" />
                    <xsd:element name="nevyjmenovany" type="xsd:string" minOccurs="0" />
                    <xsd:element name="palivo" minOccurs="0" maxOccurs="unbounded" >
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="nazevPalivo" type="xsd:string" minOccurs="0" />
                          <xsd:element name="vyhrevnostPaliva" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="spotrebaPaliva" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="spotrebaVOCa" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="spotrebaVOCb" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="spotrebaVOCc" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="druhVyrobku" type="xsd:string" minOccurs="0" />
                    <xsd:element name="mnozstviVyrobku" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseTZL" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseSO2" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseNOx" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseCO" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseVOC" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseNH3" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emise" minOccurs="0" maxOccurs="unbounded" >
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="typ" type="xsd:string" minOccurs="0" />
                          <xsd:element name="mnozstvi" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="poplatkyOstatniZdroje" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="poplatekZdroj" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <!-- tady bude xsd:all, predtim je vsak nutne zabalit "jinaZL" do nadrazeneho elementu -->
                  <xsd:sequence>
                    <xsd:element name="zdroje" minOccurs="0">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="cislo" type="CisloZdrojeOstatniType" minOccurs="0" />
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="TZL" type="PoplatekType" minOccurs="0" />
                    <xsd:element name="SO2" type="PoplatekType" minOccurs="0" />
                    <xsd:element name="NOx" type="PoplatekType" minOccurs="0" />
                    <xsd:element name="CO" type="PoplatekType" minOccurs="0" />
                    <xsd:element name="VOC" type="PoplatekType" minOccurs="0" />
                    <xsd:element name="NH3" type="PoplatekType" minOccurs="0" />
                    <xsd:element name="jinaZL" minOccurs="0" maxOccurs="unbounded">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="nazev" type="xsd:string" minOccurs="0" />
                          <xsd:element name="mnozstvi" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="poplatek" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="poplatekCelkem" type="xsd:decimal" />
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="kominy" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="komin" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <!-- tady bude xsd:all, predtim je vsak nutne zabalit "casovyRezim" a "emise" do nadrazeneho elementu -->
                  <xsd:sequence>
                    <xsd:element name="cislo" type="CisloKominuType" />
                    <xsd:element name="fiktivni" type="xsd:boolean" />
                    <xsd:element name="zdroj" type="CisloZdrojeObecneType" />
                    <xsd:element name="vyska" type="xsd:decimal" />
                    <xsd:element name="prurez" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="souradniceNdeg" type="xsd:decimal" />
                    <xsd:element name="souradniceNmin" type="xsd:decimal" />
                    <xsd:element name="souradniceNsec" type="xsd:decimal" />
                    <xsd:element name="souradniceEdeg" type="xsd:decimal" />
                    <xsd:element name="souradniceEmin" type="xsd:decimal" />
                    <xsd:element name="souradniceEsec" type="xsd:decimal" />
                    <xsd:element name="rychlostPlynu" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="teplotaPlynu" type="xsd:decimal" />
                    <xsd:element name="casovyRezim" minOccurs="0" maxOccurs="unbounded">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="denni">
                            <xsd:complexType>
                              <xsd:all>
                                <xsd:element name="PetAzSestnact" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="ctrnactAzPulnoc" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="dvacetazOsm" type="xsd:boolean" minOccurs="0" />
                              </xsd:all>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element name="tydenni">
                            <xsd:complexType>
                              <xsd:all>
                                <xsd:element name="pracDny" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="soboty" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="nedele" type="xsd:boolean" minOccurs="0" />
                              </xsd:all>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element name="rocni">
                            <xsd:complexType>
                              <xsd:all>
                                <xsd:element name="ADekada" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="BDekada" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="CDekada" type="xsd:boolean" minOccurs="0" />
                                <xsd:element name="DDekada" type="xsd:boolean" minOccurs="0" />
                              </xsd:all>
                            </xsd:complexType>
                          </xsd:element>
                          <xsd:element name="casRezim" type="xsd:string" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="provozniHodiny" type="xsd:decimal" />
                    <xsd:element name="odlucovace" type="xsd:string" minOccurs="0" />
                    <xsd:element name="emiseTZL" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseSO2" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseNOx" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseCO" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emiseVOC" type="xsd:decimal" minOccurs="0" />
                    <xsd:element name="emise" minOccurs="0" maxOccurs="unbounded">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="typ" type="xsd:string" minOccurs="0" />
                          <xsd:element name="mnozstvi" type="xsd:string" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="autorizovaneMereni" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="mereni" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <!-- tady bude xsd:all, predtim je vsak nutne zabalit "emise" do nadrazeneho elementu -->
                  <xsd:sequence>
                    <xsd:element name="zdroje" minOccurs="0">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="zdroj" minOccurs="0" maxOccurs="unbounded">
                            <xsd:complexType>
                              <xsd:sequence>
                                <xsd:element name="cislo" type="CisloZdrojeObecneType" minOccurs="0"/>
                              </xsd:sequence>
                            </xsd:complexType>
                          </xsd:element>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="datum" type="xsd:date" minOccurs="0" />
                    <xsd:element name="emiseTZL" type="EmiseType" minOccurs="0"/>
                    <xsd:element name="emiseSO2" type="EmiseType" minOccurs="0"/>
                    <xsd:element name="emiseNOx" type="EmiseType" minOccurs="0"/>
                    <xsd:element name="emiseCO" type="EmiseType" minOccurs="0"/>
                    <xsd:element name="emisoVOC" type="EmiseType" minOccurs="0"/>
                    <xsd:element name="emise" minOccurs="0" maxOccurs="unbounded">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="latka" type="xsd:string" minOccurs="0" />
                          <xsd:element name="koncentrace" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="jednotkaKoncentrace" type="xsd:string" minOccurs="0" />
                          <xsd:element name="MVE" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="MVEjednotka" type="xsd:string" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="rozpoustedla" minOccurs="0">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="bilance" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:all>
                    <xsd:element name="zdroje" minOccurs="0">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="zdroj" minOccurs="0" maxOccurs="unbounded">
                            <xsd:complexType>
                              <xsd:sequence>
                                <xsd:element name="cislo" type="CisloZdrojeObecneType" minOccurs="0" />
                              </xsd:sequence>
                            </xsd:complexType>
                          </xsd:element>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="technickeUdaje" minOccurs="0" >
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="celkovyObsah" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="obsahNetekavych" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="hustota" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="hmotnostniBilance" minOccurs="0">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="VOCvstup" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="VOCrecyklace" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="vystupy" minOccurs="0">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="vPlynu" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="veVode" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="rezidua" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="odvetrani" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="zachyceno" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="shromazdeno" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="komercniProdukt" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="regenerace" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="uvolnenoJinak" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="vypocty" minOccurs="0">
                      <xsd:complexType>
                        <xsd:all>
                          <xsd:element name="radekA" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekB" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekC" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekD" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekE1" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekE2" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekE3" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekE4" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekF1" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekF2" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekF3" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekF4" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekG" type="xsd:decimal" minOccurs="0" />
                          <xsd:element name="radekH" type="xsd:decimal" minOccurs="0" />
                        </xsd:all>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:all>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="oznameniRozpoustedla" minOccurs="0" maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="nazev" type="xsd:string" minOccurs="0" />
              <xsd:element name="ico" type="ICType" minOccurs="0" />
              <xsd:element name="pracovnik" type="xsd:string" minOccurs="0" />
              <xsd:element name="telefon" type="xsd:string" minOccurs="0" />
              <xsd:element name="fax" type="xsd:string" minOccurs="0" />
              <xsd:element name="cinnost" type="xsd:string" minOccurs="0" />
              <xsd:element name="spotrebaA" type="xsd:decimal" minOccurs="0" />
              <xsd:element name="spotrebaB" type="xsd:decimal" minOccurs="0" />
              <xsd:element name="spotrebaC" type="xsd:decimal" minOccurs="0" />
              <xsd:element name="plneni" type="xsd:string" minOccurs="0" />
              <xsd:element name="datum" type="xsd:date" minOccurs="0" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        
        <xsd:element name="verze" type="xsd:integer" fixed="1"/>
        <xsd:element name="revize" type="xsd:integer" fixed="2"/>
        <xsd:element name="subRevize" type="xsd:nonNegativeInteger" minOccurs="0" />
        <xsd:element name="podepsano" type="xsd:boolean" minOccurs="0" />
            
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  
  <xsd:complexType name="SpalovaciZdrojeType">
    <xsd:all>
      <xsd:element name="Zdroje">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="zdroj" type="ZdrojType" minOccurs="0" maxOccurs="unbounded">  
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="poplatkySpalovaciZdroje" minOccurs="0">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="poplatekZdroj" minOccurs="0" maxOccurs="unbounded">
              <xsd:complexType>
                <xsd:all>
                  <xsd:element name="zdroje" minOccurs="0">
                    <xsd:complexType>
                      <xsd:sequence>
                        <xsd:element name="zdroj" minOccurs="0" maxOccurs="unbounded">
                          <xsd:complexType>
                            <xsd:sequence>
                              <xsd:element name="cislo" type="CisloZdrojeType" />
                            </xsd:sequence>
                          </xsd:complexType>
                        </xsd:element>
                      </xsd:sequence>
                    </xsd:complexType>
                  </xsd:element>
                  <xsd:element name="TZL" type="PoplatekType" minOccurs="0" />
                  <xsd:element name="SO2" type="PoplatekType" minOccurs="0" />
                  <xsd:element name="NOx" type="PoplatekType" minOccurs="0" />
                  <xsd:element name="CO" type="PoplatekType" minOccurs="0" />
                  <xsd:element name="jinaZL">
                    <xsd:complexType>
                      <xsd:sequence>
                        <xsd:element name="jinaZL" minOccurs="0" maxOccurs="unbounded">
                          <xsd:complexType>
                            <xsd:all>
                              <xsd:element name="nazev" minOccurs="0" />
                              <xsd:element name="mnozstvi" minOccurs="0" />
                              <xsd:element name="poplatek" minOccurs="0" />
                            </xsd:all>
                          </xsd:complexType>
                        </xsd:element>
                      </xsd:sequence>
                    </xsd:complexType>
                  </xsd:element>
                  <xsd:element name="poplatekCelkem" type="xsd:decimal" minOccurs="0" />
                </xsd:all>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:all>
  </xsd:complexType>

  <xsd:complexType name="ZdrojType">
    <xsd:all>
      <xsd:element name="cislo" type="CisloZdrojeType" />
      <xsd:element name="kategorie" type="NotEmptyStringType" />
      <xsd:element name="sektor" type="NotEmptyStringType" />
      <xsd:element name="nazev" type="NotEmptyStringType" />
      <xsd:element name="ucinnost" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="tepelnyVykon" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="elektrickyVykon" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="tepelnyPrikon" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="kapacita" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="druhTopeniste" type="xsd:string" minOccurs="0" />
      <xsd:element name="provozniHodiny" type="xsd:decimal" />
      <xsd:element name="vyuzitiKapcity" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="vyrobaTepla" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="kombinovane" type="NotEmptyStringType" />
      <xsd:element name="Paliva">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="palivo" minOccurs="0" maxOccurs="unbounded">
              <xsd:complexType>
                <xsd:all>
                  <xsd:element name="nazevPalivo" type="xsd:string" minOccurs="0" />
                  <xsd:element name="vyhrevnostPaliva" type="xsd:decimal" minOccurs="0" />
                  <xsd:element name="spotrebaPaliva" type="xsd:decimal" minOccurs="0" />
                </xsd:all>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="emiseTZL" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="emiseSO2" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="emiseNOx" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="emiseCO" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="Emise">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="emise" minOccurs="0" maxOccurs="unbounded" >
              <xsd:complexType>
                <xsd:all>
                  <xsd:element name="typ" type="xsd:string" minOccurs="0" />
                  <xsd:element name="mnozstvi" type="xsd:decimal" minOccurs="0" />
                </xsd:all>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:all>
  </xsd:complexType>
  
  <xsd:simpleType name="NotEmptyStringType">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:simpleType name="PscType">
    <xsd:restriction base="xsd:nonNegativeInteger">
        <xsd:pattern value="\d{5}" />
    </xsd:restriction>
  </xsd:simpleType>
  
  <xsd:simpleType name="ICType">
    <xsd:restriction base="xsd:string">
        <xsd:pattern value="\d{8}" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="CisloZdrojeType">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0" />
      <xsd:maxInclusive value="99" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="CisloZdrojeOstatniType">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="101" />
      <xsd:maxInclusive value="999" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="CisloKominuType">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="1" />
      <xsd:maxInclusive value="999" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="CisloZdrojeObecneType">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="1" />
      <xsd:maxInclusive value="999" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="PoplatekType">
    <xsd:all>
      <xsd:element name="mnozstvi" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="poplatek" type="xsd:decimal" minOccurs="0" />
    </xsd:all>
  </xsd:complexType>

  <xsd:complexType name="EmiseType">
    <xsd:all>
      <xsd:element name="koncentrace" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="MVE" type="xsd:decimal" minOccurs="0" />
      <xsd:element name="MVEjednotka" type="xsd:string" minOccurs="0" />
    </xsd:all>
  </xsd:complexType>

</xsd:schema>
