xml/config.xsd
author František Kučera <franta-hg@frantovo.cz>
Sat, 25 Jul 2020 17:25:19 +0200
branchv_0
changeset 252 a9d4a8d5c57f
parent 250 aae5009bd0af
permissions -rw-r--r--
improve multiple results support

The specification talks exactly about -1:
> Returns: the current result as an update count;
> -1 if the current result is a ResultSet object or there are no more results

Other negative numbers can theoretically mean something different than „no more results“
e.g. unknown number of updates (?).
     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, version 3 of the License.
     9 
    10 This program is distributed in the hope that it will be useful,
    11 but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 GNU General Public License for more details.
    14 
    15 You should have received a copy of the GNU General Public License
    16 along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 -->
    18 <xs:schema
    19 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
    20 	elementFormDefault="qualified"
    21 	targetNamespace="tag:globalcode.info,2018:sqldk/configuration"
    22 	xmlns:c="tag:globalcode.info,2018:sqldk/configuration">
    23 	
    24 	<xs:element name="configuration">
    25 		<xs:complexType>
    26 			<xs:sequence>
    27 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:database"/>
    28 				<xs:element minOccurs="0" ref="c:defaultFormatter"/>
    29 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:formatter"/>
    30 			</xs:sequence>
    31 		</xs:complexType>
    32 	</xs:element>
    33 	
    34 	<xs:element name="database">
    35 		<xs:complexType>
    36 			<xs:sequence>
    37 				<xs:element ref="c:name"/>
    38 				<xs:element ref="c:url"/>
    39 				<xs:element minOccurs="0" ref="c:userName"/>
    40 				<xs:element minOccurs="0" ref="c:password"/>
    41 				<xs:element minOccurs="0" ref="c:driver"/>
    42 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:property"/>
    43 				<xs:element minOccurs="0" ref="c:tunnel"/>
    44 			</xs:sequence>
    45 		</xs:complexType>
    46 	</xs:element>
    47 	
    48 	<xs:element name="name" type="xs:string"/>
    49 	<xs:element name="url" type="xs:string"/>
    50 	<xs:element name="userName" type="xs:string"/>
    51 	<xs:element name="password" type="xs:string"/>
    52 	<xs:element name="driver" type="xs:string"/>
    53 	
    54 	<xs:element name="property">
    55 		<xs:complexType mixed="true">
    56 			<xs:attribute name="name" use="required"/>
    57 		</xs:complexType>
    58 	</xs:element>
    59 	
    60 	<xs:element name="tunnel">
    61 		<xs:complexType>
    62 			<xs:sequence>
    63 				<xs:element ref="c:command"/>
    64 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:argument"/>
    65 			</xs:sequence>
    66 		</xs:complexType>
    67 	</xs:element>
    68 	
    69 	<xs:element name="command" type="xs:string"/>
    70 	
    71 	<xs:element name="argument">
    72 		<xs:complexType mixed="true">
    73 			<xs:attribute name="type">
    74 				<xs:simpleType>
    75 					<xs:restriction base="xs:token">
    76 						<xs:enumeration value="literal"/>
    77 						<xs:enumeration value="host"/>
    78 						<xs:enumeration value="port"/>
    79 						<xs:enumeration value="env"/>
    80 						<xs:enumeration value="dbProperty"/>
    81 					</xs:restriction>
    82 				</xs:simpleType>
    83 			</xs:attribute>
    84 		</xs:complexType>
    85 	</xs:element>
    86 	
    87 	<xs:element name="defaultFormatter" type="xs:string"/>
    88 	
    89 	<xs:element name="formatter">
    90 		<xs:complexType>
    91 			<xs:sequence>
    92 				<xs:element ref="c:name"/>
    93 				<xs:element ref="c:class"/>
    94 				<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:property"/>
    95 			</xs:sequence>
    96 		</xs:complexType>
    97 	</xs:element>
    98 	
    99 	<xs:element name="class" type="xs:string"/>
   100 	
   101 </xs:schema>