<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="urn:cz:isvs:iszr:schemas:IszrTypy:v1" xmlns:iszr="urn:cz:isvs:iszr:schemas:IszrTypy:v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:reg="urn:cz:isvs:reg:schemas:RegTypy:v1" targetNamespace="urn:cz:isvs:iszr:schemas:IszrTypy:v1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.1">
	<xs:annotation>
		<xs:documentation xml:lang="cs">XML schéma s definicemi společných datových prvků ISZR.</xs:documentation>
	</xs:annotation>
	<!-- Vývojová verze 0.1.0, 14.10.2011, Pavel Odstrčil -->
	<!-- Vývojová verze 0.1.1, 26.10.2011 Aleš Teplý, formální úpravy -->
	<!-- Vývojová verze 0.1.2, 12.12.2011 Aleš Teplý, rozšíření VysledekSubKodIszrType -->
	<!-- Katalog.7 verze 1.1.0, 14.03.2012 Aleš Teplý -->
	<!-- Verze pro revizi 1.1.1, 14.05.2012 Aleš Teplý, FormularDataType - povolení zakázaných znaků x0A a x0D -->
	<!-- Verze pro revizi 1.1.2, 09.05.2014 Pavel Odstrčil, StavReklamaceType revize -->
	<!-- Verze pro revizi 1.3.0, 09.05.2018 Pavel Odstrčil, novy kod NEVALIDNI DATA -->
	<!-- Verze pro revizi 1.4.0, 09.10.2021 Pavel Odstrčil, nove kody PROBIHA ZPRACOVANI, PREKROCEN POCET, INTERNI CHYBA, OMEZENI CETNOST -->
	<!-- Verze pro revizi 1.4.1, 21.02.2025 Pavel Odstrčil, podpora pečetění -->
	<!-- AutoCont CZ a.s. -->
	<xs:import namespace="urn:cz:isvs:reg:schemas:RegTypy:v1" schemaLocation="../../RegTypy.xsd"/>
	<xs:simpleType name="Text100Type">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Text 100 znaků.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:NonEmptyStringType">
			<xs:maxLength value="100"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="MimeTypeType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Mime type - 255 znaků.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:NonEmptyStringType">
			<xs:maxLength value="255"/>
			<xs:pattern value="\w+/[-+.\w]+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="Text1000Type">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Text 1000 znaků.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:NonEmptyStringType">
			<xs:maxLength value="1000"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="CiselnikKodType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Kód číselníku poskytovaného ISZR.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:IdentifikatorType">
			<xs:maxLength value="50"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="CiselnikPopisType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Textový popis číselníku poskytovaného ISZR.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:NonEmptyStringType">
			<xs:maxLength value="500"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SouborCiselnikuFormatType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Formát číselníku, popis, v jakém formátu je číselník k dispozici, informace o dokumentaci apod..</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:NonEmptyStringType">
			<xs:maxLength value="1000"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FormularDataType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">XML data pro formulář.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:NonEmptyLineStringType"/>
	</xs:simpleType>
	<xs:simpleType name="ManualniZpracovaniType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Příznak, zda při chybě předávat k manuálnímu zpracování.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:boolean"/>
	</xs:simpleType>
	<!-- chyby -->
	<xs:simpleType name="VysledekSubKodIszrType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Detailní kód výsledku, výčtový typ.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="CHYBA KOD CISELNIKU">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Nenalezen kód číselníku.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="CHYBA FORMULARE">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Formulář není validní nebo nebyl rozpoznán.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="CHYBA DAT FORMULARE">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Formulář není správně vyplněn.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="CHYBA REKLAMACE">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Žádost o reklamaci nebylo možné realizovat.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="CERTIFIKAT NENALEZEN">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Nebylo nalezeno zadané sériové číslo certifikátu.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="NEPODPOROVANO">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Požadovaná funkce neni podporována, například manuální zpracování.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="SPECIFIKACE V POPISU">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Detailní popis uveden v popisu.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ZAZNAM NENALEZEN">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Nebyl nalezen záznam odpovídající vstupním podmínkám.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="NEVALIDNI DATA">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Data nejsou validní podle XSD dokumentů nebo aplikační logiky.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="PREKROCEN POCET">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Překročen interní limit omezení počtu, nebyla vrácena všechna data odpovídající dotazu.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="INTERNI CHYBA">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Nastala blíže nespecifikovaná interní chyba..</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="PROBIHA ZPRACOVANI">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Probíhá zpracování operace, výsledek není dosud k dispozici.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="OMEZENI CETNOST">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Překročen povolený limit četnosti dotazování.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="NENI OPRAVNENI">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Žadatel nemá oprávnění na provedení.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="IszrAplikacniStatusType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Aplikační chyba, doplnění k StatusType ze systémové části zprávy, odpověď.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="VysledekIszrKodType" type="reg:VysledekKodType"/>
			<xs:element name="VysledekDetail" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="VysledekSubKod" type="VysledekSubKodIszrType"/>
						<xs:element name="VysledekPopis" type="reg:VysledekPopisType" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="CiselnikData">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Obsah číselníku.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Typ" type="reg:NonEmptyStringType"/>
			<xs:any namespace="##any" processContents="lax"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SouborCiselnikuInfoType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Informace o číselníku poskytovaném ISZR.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="KodCiselniku" type="CiselnikKodType"/>
			<xs:element name="Verze" type="reg:VerzeType"/>
			<xs:element name="DatumZmeny" type="reg:CasovaZnackaType"/>
			<xs:element name="Popis" type="CiselnikPopisType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SouborCiselnikuType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Definice číselníku poskytovaného prostřednictvím ISZR. Číselník je předán jako odkaz na URL nebo přímo obsah číselníku.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Info" type="SouborCiselnikuInfoType"/>
			<xs:element name="Format" type="SouborCiselnikuFormatType"/>
			<xs:choice>
				<xs:element name="UmisteniURL" type="xs:anyURI"/>
				<xs:element name="Data" type="CiselnikData"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="BinarniDokumentType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Binární dokument base64 nebo MTOM/XOP.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="reg:BinarniDataType"/>
		</xs:complexContent>
	</xs:complexType>
	<!-- podpora pro form storage -->
	<xs:simpleType name="BinarniDataType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Binarni obsah v Base64 podobě".</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:base64Binary">
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="KodFormulareType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Kód formuláře pro FormStorage.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:IdentifikatorType">
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="FormularMetadataZapisType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Metadata formuláře pro FormStorage - zápis.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="OvmSpravce" type="reg:KodOvmType" minOccurs="1">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Kod OVM spravce definice. Typicky totozny jako Kod OVM zadatele o sluzbu.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PosledniZmenaCas" type="reg:CasovaZnackaType" minOccurs="1">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Čas směny ve zdrojovém systému</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Nazev" type="Text100Type" minOccurs="1"/>
			<xs:element name="PlatnostDo" type="xs:date" minOccurs="0" nillable="true"/>
			<xs:element name="Popis" type="Text1000Type" minOccurs="0"/>
			<xs:element name="Autor" type="Text1000Type" minOccurs="0"/>
			<xs:element name="MimeType" type="MimeTypeType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="FormularMetadataType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Metadata formuláře pro FormStorage - výpis.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="OvmSpravce" type="reg:KodOvmType" minOccurs="1"/>
			<xs:element name="PosledniZmenaCas" type="reg:CasovaZnackaType" minOccurs="1">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Čas změny ve zdrojovém systému</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Nazev" type="Text100Type" minOccurs="0"/>
			<xs:element name="PlatnostDo" type="xs:date" minOccurs="0"/>
			<xs:element name="Popis" type="Text1000Type" minOccurs="0"/>
			<xs:element name="Autor" type="Text1000Type" minOccurs="0"/>
			<xs:element name="MimeType" type="MimeTypeType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="FormularMetadataDotazType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Metadata formuláře pro FormStorage - dotaz.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="OvmSpravce" type="reg:KodOvmType" minOccurs="0"/>
			<xs:element name="PosledniZmenaCasOd" type="reg:CasovaZnackaType" minOccurs="0"/>
			<xs:element name="PosledniZmenaCasDo" type="reg:CasovaZnackaType" minOccurs="0"/>
			<xs:element name="Nazev" type="Text100Type" minOccurs="0">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Obsahuje zadanou hodnotu.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="DefiniceFormulareType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Informace o definici formulare</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="KodFormulare" type="iszr:KodFormulareType" minOccurs="1"/>
			<xs:element name="VerzeFormulare" type="reg:VerzeType" minOccurs="1"/>
			<xs:element name="Identifikator" type="reg:UuidType" minOccurs="1"/>
			<xs:element name="Metadata" type="iszr:FormularMetadataType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!-- podpora pro reklamace -->
	<xs:simpleType name="StavReklamaceType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Detailní kód výsledku reklamace, výčtový typ.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="PRIJATO">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Požadavek reklamace zaevidován v ISZR. Tento stav nastavuje pouze ISZR.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ODESLANO">
				<xs:annotation>
					<xs:documentation xml:lang="cs">Požadavek reklamace odeslán editorovi. Tento stav nastavuje pouze ISZR.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ZPRACOVANO">
				<xs:annotation>
					<xs:documentation xml:lang="cs">
						Požadavek zpracován. Odesláno editorovi a editor odpověděl nebo editor neposkytuje informaci o vyřízení. 
						Detailní informace o výsledku zpracování v popisu. Tento stav může nastavit ISZR a editor.
					</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="CHYBA ZPRACOVANI">
				<xs:annotation>
					<xs:documentation xml:lang="cs">
						Požadavek nebylo možné zpracovat. Odesláno editorovi a editor odpověděl nebo nebylo možné zpracovat (například
						v průběhu zpracování zaniklo AIFO a podobně). Detailní informace o výsledku zpracování v popisu. 
						Tento stav může nastavit ISZR a editor.
					</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="StavReklamacePopisType">
		<xs:restriction base="xs:string">
			<xs:maxLength value="1000"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- peceteni -->
	<xs:simpleType name="KodProstredkuType">
		<xs:annotation>
			<xs:documentation xml:lang="cs">Kód prostředku určuujícího použitý zdroj. Kód prostředku přiděluje DIA.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="reg:IdentifikatorType">
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
