<?xml version="1.0" encoding="Windows-1250"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:typ="http://www.stormware.cz/schema/type.xsd"
			xmlns:rdc="http://www.stormware.cz/schema/documentresponse.xsd"
			xmlns:prm="http://www.stormware.cz/schema/parameter.xsd"
			xmlns="http://www.stormware.cz/schema/parameter.xsd"
			targetNamespace="http://www.stormware.cz/schema/parameter.xsd"
			elementFormDefault="qualified"
>

<xsd:import namespace="http://www.stormware.cz/schema/type.xsd"					schemaLocation="type.xsd"/>
<xsd:import namespace="http://www.stormware.cz/schema/documentresponse.xsd" 	schemaLocation="documentresponse.xsd"/>

<!-- **************************************************************************
		root element must be <parameter>
	 ************************************************************************** -->

<xsd:element name="parameter" type="prm:parameterType"/>

<!-- **************************************************************************
		parameter
	 ************************************************************************** -->

<xsd:complexType name="parameterType">
	<xsd:annotation>
		<xsd:documentation>Definice volitelných parametrů formuláře a položek agendy.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="userAgendaDef" type="prm:userAgendaDefType" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="formParameter" type="prm:parameterItemListType" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="itemParameter" type="prm:parameterItemListType" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="userForm" type="prm:formItemListType" minOccurs="0" maxOccurs="6"/>
		<xsd:element name="userCode" type="prm:userCodeType" minOccurs="0" maxOccurs="1"/>
	</xsd:sequence>
	<xsd:attribute name="version" type="prm:prmVersionType" use="required"/>
	<xsd:attribute name="idsAgenda" type="typ:parameterAgendaType" use="required"/>
	<xsd:attribute name="idsUserAgenda" type="typ:string10"/>
</xsd:complexType>

<xsd:simpleType name="prmVersionType">
	<xsd:annotation>
		<xsd:documentation>Verze, které jsou dostupné k tomuto dokladu. Podrobnosti k jednotlivým verzím najdete na www.stormware.cz/xml</xsd:documentation>
	</xsd:annotation>
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="1.0"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="parameterDefType">
	<xsd:annotation>
		<xsd:documentation>Definice volitelného parametru.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="label" type="typ:string32" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="name" type="typ:string16" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="type" type="typ:parameterDataType" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="length" type="xsd:integer" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="list" type="typ:refType" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="use0" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
		<xsd:element name="use1" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
		<xsd:element name="use2" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
		<xsd:element name="use3" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
		<xsd:element name="use4" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
		<xsd:element name="use5" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
	</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ctrlDefType">
	<xsd:annotation>
		<xsd:documentation>Definice prvku formuláře.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="name" type="typ:string16" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="label" type="typ:string240" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="rect" type="typ:rectangle" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="type" type="typ:ctrlType" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="style" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
	</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="parameterItemListType">
	<xsd:annotation>
		<xsd:documentation>Seznam definic volitelných parametrů. U běžných agend je počet programově omezen na 64, uživatelské agendy mají maximálně 128 polí.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="parameterDef" type="prm:parameterDefType" minOccurs="0" maxOccurs="128"/>
	</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="formItemListType">
	<xsd:annotation>
		<xsd:documentation>Seznam definic volitelných parametrů.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="ctrlDef" type="prm:ctrlDefType" minOccurs="0" maxOccurs="255"/>
	</xsd:sequence>
	<xsd:attribute name="formAgenda" type="typ:parameterAgendaFormType"/>
</xsd:complexType>

<xsd:simpleType name="userCodeType">
	<xsd:annotation>
		<xsd:documentation>Řetězec o délce 64000 znaků.</xsd:documentation>
	</xsd:annotation>
	<xsd:restriction base="xsd:string">
		<xsd:maxLength value="64000"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="userAgendaDefType">
	<xsd:annotation>
		<xsd:documentation>Definice uživatelské agendy.</xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="idsUserAgenda" type="typ:string10" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="name" type="typ:string32" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="tabMain" type="typ:string16" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="tabItem" type="typ:string16" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="number" type="typ:numberType" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="items" type="typ:boolean" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="templates" type="typ:boolean" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="documents" type="typ:boolean" minOccurs="1" maxOccurs="1"/>
		<xsd:element name="list" type="typ:boolean" minOccurs="0" maxOccurs="1" default="false"/>
		<xsd:element name="listIDS" type="typ:string16" minOccurs="0" maxOccurs="1"/>
		<xsd:element name="listSText" type="typ:string16" minOccurs="0" maxOccurs="1"/>
	</xsd:sequence>
</xsd:complexType>

<!-- RESPONSE -->
<xsd:element name="parameterItemResponse" type="prm:parameterItemResponseType"/>

<xsd:complexType name="parameterItemResponseType">
	<xsd:complexContent>
		<xsd:extension  base="rdc:documentResponseType"/>
	</xsd:complexContent>
</xsd:complexType>


</xsd:schema>
