<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*   Copyright 2004 The Apache Software Foundation
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *  limitations under the License.
 */
-->

<xs:schema targetNamespace="urn:ehd/001" xmlns="urn:ehd/001" xmlns:ehd="urn:ehd/001" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="substitution">
	<!-- ************************ keytabs ********************************* -->
	<xs:element name="keytabs" type="keytabs_typ" final="extension">
		<xs:annotation>
			<xs:documentation>Schlüsseltabellen zu den Daten</xs:documentation>
		</xs:annotation>
		<xs:unique name="u_keytab_S_SV">
			<xs:selector xpath="./ehd:keytab"/>
			<xs:field xpath="@S"/>
			<xs:field xpath="@SV"/>
		</xs:unique>
	</xs:element>
	<xs:complexType name="keytabs_typ">
		<xs:sequence>
			<xs:element ref="keytab" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!-- ************************ keytab ********************************* -->
	<xs:element name="keytab" type="keytab_typ">
		<xs:annotation>
			<xs:documentation>Sclüsseltabelle mit S=OID, SN=Name der Schlüsseltabelle, SV=Version</xs:documentation>
		</xs:annotation>
		<xs:key name="k_keytab_S_SV">
			<xs:selector xpath="."/>
			<xs:field xpath="@S"/>
			<xs:field xpath="@SV"/>
		</xs:key>
		<xs:keyref name="kref_keytab_S_SV" refer="k_keytab_S_SV">
			<xs:selector xpath="ehd:key"/>
			<xs:field xpath="@S"/>
			<xs:field xpath="@SV"/>
		</xs:keyref>
		<xs:unique name="u_key_V_S_SV">
			<xs:selector xpath="ehd:key"/>
			<xs:field xpath="@V"/>
			<xs:field xpath="@S"/>
			<xs:field xpath="@SV"/>
		</xs:unique>
	</xs:element>
	<xs:complexType name="keytab_typ">
		<xs:sequence>
			<xs:element ref="key" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="S" type="xs:string" use="required"/>
		<xs:attribute name="SN" type="xs:string" use="required"/>
		<xs:attribute name="SV" type="xs:string" use="required"/>
	</xs:complexType>
	<!-- ************************ key ********************************* -->
	<xs:element name="key" type="key_typ">
		<xs:annotation>
			<xs:documentation>Schlüssel mit V=Wert, DN=WertBezeichnung, S=OID zur welchen Sclüsseltabelle der Wert gehört, SV=Version der Schlüsseltabelle</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="key_typ">
		<xs:attribute name="V" type="xs:string" use="required"/>
		<xs:attribute name="S" type="xs:string" use="required"/>
		<xs:attribute name="SV" type="xs:string" use="required"/>
		<xs:attribute name="DN" type="xs:string" use="required"/>
	</xs:complexType>
</xs:schema>
