xml/config.xsd
author František Kučera <franta-hg@frantovo.cz>
Thu, 24 Oct 2019 21:43:08 +0200
branchv_0
changeset 250 aae5009bd0af
parent 249 7655df0622ee
permissions -rw-r--r--
fix license version: GNU GPLv3

<?xml version="1.0" encoding="UTF-8"?>
<!--
SQL-DK
Copyright © 2013 František Kučera (frantovo.cz)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<xs:schema
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified"
	targetNamespace="tag:globalcode.info,2018:sqldk/configuration"
	xmlns:c="tag:globalcode.info,2018:sqldk/configuration">
	
	<xs:element name="configuration">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:database"/>
				<xs:element minOccurs="0" ref="c:defaultFormatter"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:formatter"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="database">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="c:name"/>
				<xs:element ref="c:url"/>
				<xs:element minOccurs="0" ref="c:userName"/>
				<xs:element minOccurs="0" ref="c:password"/>
				<xs:element minOccurs="0" ref="c:driver"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:property"/>
				<xs:element minOccurs="0" ref="c:tunnel"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="name" type="xs:string"/>
	<xs:element name="url" type="xs:string"/>
	<xs:element name="userName" type="xs:string"/>
	<xs:element name="password" type="xs:string"/>
	<xs:element name="driver" type="xs:string"/>
	
	<xs:element name="property">
		<xs:complexType mixed="true">
			<xs:attribute name="name" use="required"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="tunnel">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="c:command"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:argument"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="command" type="xs:string"/>
	
	<xs:element name="argument">
		<xs:complexType mixed="true">
			<xs:attribute name="type">
				<xs:simpleType>
					<xs:restriction base="xs:token">
						<xs:enumeration value="literal"/>
						<xs:enumeration value="host"/>
						<xs:enumeration value="port"/>
						<xs:enumeration value="env"/>
						<xs:enumeration value="dbProperty"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="defaultFormatter" type="xs:string"/>
	
	<xs:element name="formatter">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="c:name"/>
				<xs:element ref="c:class"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:property"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="class" type="xs:string"/>
	
</xs:schema>