Removed 'image' test (superseeded by 'luaimage' test)
[tagua/yd.git] / src / config.xsd
blobbd2a32e52ad5cdc680783ae48381cf9d45e6e713
1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
4 <xs:complexType name="Configuration">
5 <xs:sequence>
6 <xs:element name="general" type="General" />
7 <xs:element name="animations" type="AnimationConfiguration" />
8 <xs:element name="board-border" type="BoardBorderConfiguration" />
9 <xs:element name="ics" type="IcsConfiguration" />
10 <xs:element name="clock" type="ClockConfiguration" />
11 <xs:element name="highlighting" type="HighlightingConfiguration" />
12 <xs:element name="movelist" type="MovelistConfiguration" />
13 <xs:element name="variants" type="VariantConfiguration" />
14 <xs:element name="engines" type="EngineConfiguration" />
15 </xs:sequence>
16 </xs:complexType>
18 <!-- general -->
20 <xs:complexType name="General">
21 <xs:sequence>
22 <xs:element name="data-dir" type="xs:string" />
23 </xs:sequence>
24 </xs:complexType>
26 <!-- board border -->
28 <xs:complexType name="BoardBorderConfiguration">
29 <xs:sequence>
30 <xs:element name="visible" type="xs:string" />
31 <xs:element name="color" type="xs:string" />
32 <xs:element name="font" type="xs:string" />
33 <xs:element name="text-color" type="xs:string" />
34 </xs:sequence>
35 </xs:complexType>
37 <!-- ics -->
39 <xs:complexType name="IcsConfiguration">
40 <xs:sequence>
41 <xs:element name="username" type="xs:string" />
42 <xs:element name="password" type="xs:string" />
43 <xs:element name="host" type="xs:string" />
44 <xs:element name="port" type="xs:integer" />
45 <xs:element name="timeseal" type="Timeseal" />
46 </xs:sequence>
47 </xs:complexType>
49 <xs:complexType name="Timeseal">
50 <xs:sequence>
51 <xs:element name="command" type="TimesealCommand" />
52 <xs:element name="path" type="xs:string" />
53 </xs:sequence>
54 <xs:attribute name="use" use="optional" default="false" type="xs:boolean" />
55 </xs:complexType>
57 <xs:complexType name="TimesealCommand">
58 <xs:simpleContent>
59 <xs:extension base="xs:string">
60 <xs:attribute name="use" use="optional" default="true" type="xs:boolean" />
61 </xs:extension>
62 </xs:simpleContent>
63 </xs:complexType>
65 <!-- clock -->
67 <xs:complexType name="ClockConfiguration">
68 <xs:sequence>
69 <xs:element name="background-color" type="Color" />
70 <xs:element name="caption" type="ClockElement" />
71 <xs:element name="decimals" type="ClockElement" />
72 <xs:element name="player" type="ClockElement" />
73 <xs:element name="time" type="ClockElement" />
74 </xs:sequence>
75 </xs:complexType>
77 <xs:complexType name="ClockElement">
78 <xs:sequence>
79 <xs:element name="size" type="xs:integer" />
80 </xs:sequence>
81 </xs:complexType>
83 <!-- highlighting -->
85 <xs:complexType name="HighlightingConfiguration">
86 <xs:sequence>
87 <xs:element name="lua" type="LuaHLConfiguration" />
88 <xs:element name="simple-highlighting" type="SimpleHighlighting" />
89 </xs:sequence>
90 </xs:complexType>
92 <xs:complexType name="LuaHLConfiguration">
93 <xs:sequence>
94 <xs:element name="library-path" type="xs:string" />
95 <xs:element name="scripts" type="ScriptList" />
96 </xs:sequence>
97 <xs:attribute name="use" use="optional" default="true" type="xs:boolean" />
98 </xs:complexType>
100 <xs:complexType name="ScriptList">
101 <xs:sequence>
102 <xs:element name="script" maxOccurs="unbounded" type="xs:string" />
103 </xs:sequence>
104 </xs:complexType>
106 <xs:complexType name="SimpleHighlighting">
107 <xs:sequence>
108 <xs:element name="pattern" maxOccurs="unbounded" type="HighlightingPattern" />
109 </xs:sequence>
110 </xs:complexType>
112 <xs:complexType name="HighlightingPattern">
113 <xs:sequence>
114 <xs:element name="name" type="xs:string" />
115 <xs:element name="regexp" type="xs:string" />
116 <xs:element name="format" type="HighlightingFormat" />
117 </xs:sequence>
118 </xs:complexType>
120 <xs:complexType name="HighlightingFormat">
121 <xs:sequence>
122 <xs:element name="bold" minOccurs="0" type="xs:boolean" />
123 <xs:element name="italic" minOccurs="0" type="xs:boolean" />
124 <xs:element name="color" minOccurs="0" type="xs:string" />
125 </xs:sequence>
126 </xs:complexType>
128 <!-- movelist -->
130 <xs:complexType name="MovelistConfiguration">
131 <xs:sequence>
132 <xs:element name="animations" type="MovelistAnimationConfiguration" />
133 <xs:element name="comments" type="MovelistComments" />
134 <xs:element name="selection-color" type="Color" />
135 <xs:element name="selection-font" type="Font" />
136 <xs:element name="font" type="Font" />
137 </xs:sequence>
138 </xs:complexType>
140 <xs:complexType name="MovelistAnimationConfiguration">
141 <xs:sequence>
142 <xs:element name="speed" type="xs:integer" />
143 <xs:element name="smoothness" type="xs:integer" />
144 <xs:element name="animation-list" type="MovelistAnimationList" />
145 </xs:sequence>
146 <xs:attribute name="enabled" type="xs:boolean" />
147 </xs:complexType>
149 <xs:complexType name="MovelistAnimationList">
150 <xs:sequence>
151 <xs:element name="hide-show" type="MovelistAnimation" />
152 <xs:element name="highlight" type="MovelistAnimation" />
153 <xs:element name="moving" type="MovelistAnimation" />
154 </xs:sequence>
155 </xs:complexType>
157 <xs:complexType name="MovelistAnimation">
158 <xs:attribute name="enabled" use="optional" default="false" type="xs:boolean" />
159 </xs:complexType>
161 <xs:complexType name="MovelistComments">
162 <xs:sequence>
163 <xs:element name="color" type="xs:string" />
164 <xs:element name="font" type="xs:string" />
165 </xs:sequence>
166 </xs:complexType>
168 <!-- variants -->
170 <xs:complexType name="VariantConfiguration">
171 <xs:sequence>
172 <xs:element name="variant" maxOccurs="unbounded" type="Variant" />
173 </xs:sequence>
174 </xs:complexType>
176 <xs:complexType name="Variant">
177 <xs:sequence>
178 <xs:element name="name" type="xs:string" />
179 <xs:element name="theme" type="VariantTheme" />
180 </xs:sequence>
181 </xs:complexType>
183 <xs:complexType name="VariantTheme">
184 <xs:sequence>
185 <xs:element name="pieces" type="xs:string" />
186 <xs:element name="squares" type="xs:string" />
187 </xs:sequence>
188 <xs:attribute name="inherit-pieces" use="optional" default="false" type="xs:boolean" />
189 <xs:attribute name="inherit-squares" use="optional" default="false" type="xs:boolean" />
190 </xs:complexType>
193 <!-- animations -->
195 <xs:complexType name="AnimationConfiguration">
196 <xs:sequence>
197 <xs:element name="smoothness" minOccurs="0" type="xs:integer" />
198 <xs:element name="speed" minOccurs="0" type="xs:integer" />
199 <xs:element name="animation-list" type="AnimationList" />
200 </xs:sequence>
201 </xs:complexType>
203 <xs:complexType name="AnimationList">
204 <xs:sequence>
205 <xs:element name="capture" type="Animation" />
206 <xs:element name="fade" type="Animation" />
207 <xs:element name="movement" type="Animation" />
208 <xs:element name="transform" type="Animation" />
209 <xs:element name="sequence" type="SequenceAnimation" />
210 </xs:sequence>
211 </xs:complexType>
213 <xs:complexType name="Animation">
214 <xs:attribute name="enabled" type="xs:boolean" />
215 </xs:complexType>
217 <xs:complexType name="SequenceAnimation">
218 <xs:complexContent>
219 <xs:extension base="Animation">
220 <xs:sequence>
221 <xs:element name="max" type="xs:integer" />
222 </xs:sequence>
223 </xs:extension>
224 </xs:complexContent>
225 </xs:complexType>
227 <!-- engines -->
229 <xs:complexType name="EngineConfiguration">
230 <xs:sequence>
231 <xs:element name="default" minOccurs="0" type="xs:integer" />
232 <xs:element name="engine-list" type="EngineList" />
233 </xs:sequence>
234 </xs:complexType>
236 <xs:complexType name="EngineList">
237 <xs:sequence>
238 <xs:element name="engine" maxOccurs="unbounded" type="Engine" />
239 </xs:sequence>
240 </xs:complexType>
242 <xs:complexType name="Engine">
243 <xs:sequence>
244 <xs:element name="name" type="xs:string" />
245 <xs:element name="path" type="xs:string" />
246 </xs:sequence>
247 <xs:attribute name="type" type="EngineType" />
248 </xs:complexType>
250 <xs:simpleType name="EngineType">
251 <xs:restriction base="xs:string">
252 <xs:enumeration value="xboard"/>
253 <xs:enumeration value="UCI"/>
254 <xs:enumeration value="kboard"/>
255 </xs:restriction>
256 </xs:simpleType>
258 <!-- colors and fonts -->
260 <xs:complexType name="Color">
261 <xs:attribute name="r" use="required" type="xs:integer" />
262 <xs:attribute name="g" use="required" type="xs:integer" />
263 <xs:attribute name="b" use="required" type="xs:integer" />
264 </xs:complexType>
266 <xs:simpleType name="Font">
267 <xs:restriction base="xs:string" />
268 </xs:simpleType>
270 <!-- global element -->
272 <xs:element name="configuration" type="Configuration" />
274 </xs:schema>