xml/config.xsd
author František Kučera <franta-hg@frantovo.cz>
Tue, 30 Apr 2019 20:04:06 +0200
branchv_0
changeset 249 7655df0622ee
parent 203 504c4ba56d1c
child 250 aae5009bd0af
permissions -rw-r--r--
change XMLNS for the configuration
Use The 'tag' URI Scheme <http://www.faqs.org/rfcs/rfc4151.html>
Upgrade local configuration:
sed 's@https://sql-dk.globalcode.info/xmlns/configuration@tag:globalcode.info,2018:sqldk/configuration@g' -i ~/.sql-dk/config.xml
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3 SQL-DK
     4 Copyright © 2013 František Kučera (frantovo.cz)
     5 
     6 This program is free software: you can redistribute it and/or modify
     7 it under the terms of the GNU General Public License as published by
     8 the Free Software Foundation, either version 3 of the License, or
     9 (at your option) any later version.
    10 
    11 This program is distributed in the hope that it will be useful,
    12 but WITHOUT ANY WARRANTY; without even the implied warranty of
    13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    14 GNU General Public License for more details.
    15 
    16 You should have received a copy of the GNU General Public License
    17 along with this program. If not, see <http://www.gnu.org/licenses/>.
    18 -->
    19 <xs:schema
    20 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
    21 	elementFormDefault="qualified"
    22 	targetNamespace="tag:globalcode.info,2018:sqldk/configuration"
    23 	xmlns:c="tag:globalcode.info,2018:sqldk/configuration">
    24 	
    25 	<xs:element name="configuration">
    26 		<xs:complexType>
    27 			<xs:sequence>
    28 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:database"/>
    29 				<xs:element minOccurs="0" ref="c:defaultFormatter"/>
    30 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:formatter"/>
    31 			</xs:sequence>
    32 		</xs:complexType>
    33 	</xs:element>
    34 	
    35 	<xs:element name="database">
    36 		<xs:complexType>
    37 			<xs:sequence>
    38 				<xs:element ref="c:name"/>
    39 				<xs:element ref="c:url"/>
    40 				<xs:element minOccurs="0" ref="c:userName"/>
    41 				<xs:element minOccurs="0" ref="c:password"/>
    42 				<xs:element minOccurs="0" ref="c:driver"/>
    43 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:property"/>
    44 				<xs:element minOccurs="0" ref="c:tunnel"/>
    45 			</xs:sequence>
    46 		</xs:complexType>
    47 	</xs:element>
    48 	
    49 	<xs:element name="name" type="xs:string"/>
    50 	<xs:element name="url" type="xs:string"/>
    51 	<xs:element name="userName" type="xs:string"/>
    52 	<xs:element name="password" type="xs:string"/>
    53 	<xs:element name="driver" type="xs:string"/>
    54 	
    55 	<xs:element name="property">
    56 		<xs:complexType mixed="true">
    57 			<xs:attribute name="name" use="required"/>
    58 		</xs:complexType>
    59 	</xs:element>
    60 	
    61 	<xs:element name="tunnel">
    62 		<xs:complexType>
    63 			<xs:sequence>
    64 				<xs:element ref="c:command"/>
    65 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:argument"/>
    66 			</xs:sequence>
    67 		</xs:complexType>
    68 	</xs:element>
    69 	
    70 	<xs:element name="command" type="xs:string"/>
    71 	
    72 	<xs:element name="argument">
    73 		<xs:complexType mixed="true">
    74 			<xs:attribute name="type">
    75 				<xs:simpleType>
    76 					<xs:restriction base="xs:token">
    77 						<xs:enumeration value="literal"/>
    78 						<xs:enumeration value="host"/>
    79 						<xs:enumeration value="port"/>
    80 						<xs:enumeration value="env"/>
    81 						<xs:enumeration value="dbProperty"/>
    82 					</xs:restriction>
    83 				</xs:simpleType>
    84 			</xs:attribute>
    85 		</xs:complexType>
    86 	</xs:element>
    87 	
    88 	<xs:element name="defaultFormatter" type="xs:string"/>
    89 	
    90 	<xs:element name="formatter">
    91 		<xs:complexType>
    92 			<xs:sequence>
    93 				<xs:element ref="c:name"/>
    94 				<xs:element ref="c:class"/>
    95 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:property"/>
    96 			</xs:sequence>
    97 		</xs:complexType>
    98 	</xs:element>
    99 	
   100 	<xs:element name="class" type="xs:string"/>
   101 	
   102 </xs:schema>