• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<schema xmlns="http://www.w3.org/2001/XMLSchema"
3	targetNamespace="http://nouveau.freedesktop.org/"
4	xmlns:rng="http://nouveau.freedesktop.org/"
5	elementFormDefault="qualified">
6
7	<annotation>
8		<documentation>
9			An updated version of the old rules.xml file from the
10			RivaTV project. Specifications by Pekka Paalanen,
11			preliminary attempt by KoalaBR,
12			first working version by Jakob Bornecrantz.
13			For specifications, see the file rules-ng-format.txt
14			in Nouveau CVS module 'rules-ng'.
15		</documentation>
16		<documentation>Version 0.1</documentation>
17	</annotation>
18
19
20	<!-- Elements -->
21
22	<element name="database"       type="rng:databaseType" />
23	<element name="import"         type="rng:importType" />
24	<element name="copyright"      type="rng:copyrightType" />
25	<element name="domain"         type="rng:domainType" />
26	<element name="group"          type="rng:groupType" />
27	<element name="use-group"      type="rng:refType" />
28	<element name="array"          type="rng:arrayType" />
29	<element name="stripe"         type="rng:stripeType" />
30	<element name="reg64"          type="rng:registerType" />
31	<element name="reg32"          type="rng:registerType" />
32	<element name="reg16"          type="rng:registerType" />
33	<element name="reg8"           type="rng:registerType" />
34	<element name="bitset"         type="rng:bitsetType" />
35	<element name="bitfield"       type="rng:bitfieldType" />
36	<element name="enum"           type="rng:enumType" />
37	<element name="value"          type="rng:valueType" />
38
39	<!-- Copyright elements -->
40	<element name="author"         type="rng:authorType" />
41	<element name="nick"           type="rng:nickType" />
42	<element name="license"        type="rng:docType" />
43
44	<!-- Documentation elements -->
45
46	<!-- FIXME: allowed only one  per parent element -->
47	<element name="brief" type="rng:briefType" />
48
49	<element name="doc"  type="rng:docType" />
50	<element name="b"    type="rng:textformatType" />
51	<element name="i"    type="rng:textformatType" />
52	<element name="u"    type="rng:textformatType" />
53	<element name="code" type="rng:textcodeType" />
54	<element name="ul"   type="rng:listType" />
55	<element name="ol"   type="rng:listType" />
56	<element name="li"   type="rng:listitemType" />
57
58	<!-- Copyright element types -->
59
60	<complexType name="authorType" mixed="true">
61		<annotation>
62			<documentation>
63				register database author
64			</documentation>
65		</annotation>
66		<choice minOccurs="0" maxOccurs="unbounded">
67			<element ref="rng:nick" />
68		</choice>
69		<attribute name="name" type="string" use="required" />
70		<attribute name="email" type="string" use="required" />
71	</complexType>
72
73	<complexType name="nickType">
74		<annotation>
75			<documentation>nickType</documentation>
76		</annotation>
77		<attribute name="name" type="string" use="required" />
78	</complexType>
79
80	<!-- Database element types -->
81
82	<complexType name="databaseType">
83		<annotation>
84			<documentation>databaseType</documentation>
85		</annotation>
86		<choice minOccurs="0" maxOccurs="unbounded">
87			<group ref="rng:docGroup" />
88			<group ref="rng:topGroup" />
89		</choice>
90	</complexType>
91
92	<complexType name="importType">
93		<annotation>
94			<documentation>importType</documentation>
95		</annotation>
96		<attribute name="file" type="string" use="required" />
97	</complexType>
98
99	<complexType name="copyrightType">
100		<annotation>
101			<documentation>copyrightType</documentation>
102		</annotation>
103		<choice minOccurs="0" maxOccurs="unbounded">
104			<group ref="rng:docGroup" />
105			<group ref="rng:topGroup" />
106			<element ref="rng:author" />
107			<element ref="rng:license" />
108		</choice>
109		<attribute name="year" type="nonNegativeInteger" use="optional" />
110	</complexType>
111
112	<complexType name="domainType">
113		<annotation>
114			<documentation>domainType</documentation>
115		</annotation>
116		<choice minOccurs="0" maxOccurs="unbounded">
117			<group ref="rng:docGroup" />
118			<group ref="rng:topGroup" />
119			<group ref="rng:regarrayGroup" />
120		</choice>
121		<attribute name="name" type="NMTOKEN" use="required" />
122		<attribute name="bare" type="rng:Boolean" use="optional" />
123		<attribute name="prefix" type="NMTOKENS" use="optional" />
124		<attribute name="width" type="rng:DomainWidth" use="optional" />
125		<attribute name="size" type="rng:HexOrNumber" use="optional" />
126		<attribute name="varset" type="NMTOKEN" use="optional" />
127		<attribute name="variants" type="string" use="optional" />
128	</complexType>
129
130	<complexType name="groupType">
131		<annotation>
132			<documentation>groupType</documentation>
133		</annotation>
134		<choice minOccurs="0" maxOccurs="unbounded">
135			<group ref="rng:docGroup" />
136			<group ref="rng:topGroup" />
137			<group ref="rng:regarrayGroup" />
138		</choice>
139		<attribute name="name" type="NMTOKEN" use="required" />
140	</complexType>
141
142	<complexType name="arrayType">
143		<annotation>
144			<documentation>arrayType</documentation>
145		</annotation>
146		<choice minOccurs="0" maxOccurs="unbounded">
147			<group ref="rng:docGroup" />
148			<group ref="rng:topGroup" />
149			<group ref="rng:regarrayGroup" />
150		</choice>
151		<attribute name="name" type="NMTOKEN" use="optional" />
152		<attribute name="offset" type="rng:HexOrNumber" use="optional" />
153		<attribute name="offsets" type="string" use="optional"/>
154		<attribute name="doffsets" type="string" use="optional"/>
155		<attribute name="index" type="NMTOKENS" use="optional"/>
156		<attribute name="stride" type="rng:HexOrNumber" use="required" />
157		<attribute name="length" type="rng:HexOrNumber" use="required" />
158		<attribute name="varset" type="NMTOKEN" use="optional" />
159		<attribute name="variants" type="string" use="optional" />
160	</complexType>
161
162	<complexType name="stripeType">
163		<annotation>
164			<documentation>stripeType</documentation>
165		</annotation>
166		<choice minOccurs="0" maxOccurs="unbounded">
167			<group ref="rng:docGroup" />
168			<group ref="rng:topGroup" />
169			<group ref="rng:regarrayGroup" minOccurs="0" />
170		</choice>
171		<attribute name="name" type="NMTOKEN" use="optional" />
172		<attribute name="offset" type="rng:HexOrNumber" use="optional" />
173		<attribute name="stride" type="rng:HexOrNumber" use="optional" />
174		<attribute name="length" type="rng:HexOrNumber" use="optional" />
175		<attribute name="varset" type="NMTOKEN" use="optional" />
176		<attribute name="variants" type="string" use="optional" />
177		<attribute name="prefix" type="NMTOKENS" use="optional" />
178	</complexType>
179
180	<complexType name="registerType">
181		<annotation>
182			<documentation>
183				registerType used by reg8, reg16, reg32, reg64
184			</documentation>
185		</annotation>
186		<choice minOccurs="0" maxOccurs="unbounded">
187			<group ref="rng:docGroup" />
188			<group ref="rng:topGroup" />
189			<element ref="rng:value" />
190			<element ref="rng:bitfield" />
191		</choice>
192		<attribute name="name" type="NMTOKEN" use="required" />
193		<attribute name="offset" type="rng:HexOrNumber" use="required" />
194		<attribute name="access" type="rng:Access" default="rw" use="optional" />
195		<attribute name="type" type="NMTOKENS" use="optional" />
196		<attribute name="shr" type="nonNegativeInteger" use="optional" />
197		<attribute name="varset" type="NMTOKEN" use="optional" />
198		<attribute name="variants" type="string" use="optional" />
199		<attribute name="stride" type="rng:HexOrNumber" use="optional" />
200		<attribute name="length" type="rng:HexOrNumber" use="optional" />
201		<attribute name="high" type="nonNegativeInteger" use="optional" />
202		<attribute name="low" type="nonNegativeInteger" use="optional" />
203		<attribute name="pos" type="nonNegativeInteger" use="optional" />
204		<attribute name="align" type="nonNegativeInteger" use="optional" />
205		<attribute name="radix" type="nonNegativeInteger" use="optional" />
206	</complexType>
207
208	<complexType name="bitsetType">
209		<annotation>
210			<documentation>bitsetType</documentation>
211		</annotation>
212		<choice maxOccurs="unbounded">
213			<element ref="rng:bitfield" />
214			<group ref="rng:docGroup" />
215			<group ref="rng:topGroup" />
216		</choice>
217		<attribute name="name" type="NMTOKEN" use="required" />
218		<attribute name="inline" type="rng:Boolean" use="optional" />
219		<attribute name="bare" type="rng:Boolean" use="optional" />
220		<attribute name="prefix" type="NMTOKENS" use="optional" />
221	</complexType>
222
223	<complexType name="bitfieldType">
224		<annotation>
225			<documentation>bitfieldType</documentation>
226		</annotation>
227		<choice minOccurs="0" maxOccurs="unbounded">
228			<element ref="rng:value" maxOccurs="unbounded" />
229			<group ref="rng:docGroup" />
230			<group ref="rng:topGroup" />
231		</choice>
232		<attribute name="name" type="NMTOKEN" use="required" />
233		<attribute name="high" type="nonNegativeInteger" use="optional" />
234		<attribute name="low" type="nonNegativeInteger" use="optional" />
235		<attribute name="pos" type="nonNegativeInteger" use="optional" />
236		<attribute name="radix" type="nonNegativeInteger" use="optional" />
237		<attribute name="align" type="nonNegativeInteger" use="optional" />
238		<attribute name="type" type="NMTOKENS" use="optional" />
239		<attribute name="varset" type="NMTOKEN" use="optional" />
240		<attribute name="variants" type="string" use="optional" />
241		<attribute name="addvariant" type="rng:Boolean" use="optional" />
242		<attribute name="shr" type="nonNegativeInteger" use="optional" />
243	</complexType>
244
245	<complexType name="enumType">
246		<annotation>
247			<documentation>enumType</documentation>
248		</annotation>
249		<choice maxOccurs="unbounded">
250			<element ref="rng:value" />
251			<group ref="rng:docGroup" />
252			<group ref="rng:topGroup" />
253		</choice>
254		<attribute name="name" type="NMTOKEN" use="required" />
255		<attribute name="inline" type="rng:Boolean" use="optional" />
256		<attribute name="bare" type="rng:Boolean" use="optional" />
257		<attribute name="prefix" type="NMTOKENS" use="optional" />
258	</complexType>
259
260	<complexType name="valueType">
261		<annotation>
262			<documentation>valueType</documentation>
263		</annotation>
264		<choice minOccurs="0" maxOccurs="unbounded">
265			<group ref="rng:docGroup" />
266			<group ref="rng:topGroup" />
267		</choice>
268		<attribute name="name" type="NMTOKEN" use="required" />
269		<attribute name="value" type="string" use="optional" />
270		<attribute name="varset" type="NMTOKEN" use="optional" />
271		<attribute name="variants" type="string" use="optional" />
272	</complexType>
273
274	<complexType name="refType">
275		<annotation>
276			<documentation>refType</documentation>
277		</annotation>
278		<attribute name="ref" type="NMTOKEN" use="required" />
279	</complexType>
280
281
282	<!-- Documentation element types -->
283
284	<complexType name="briefType">
285		<annotation>
286			<documentation>
287				brief documentation, no markup
288			</documentation>
289		</annotation>
290		<simpleContent>
291			<extension base="string" />
292		</simpleContent>
293	</complexType>
294
295	<complexType name="docType" mixed="true">
296		<annotation>
297			<documentation>
298				root element of documentation sub-tree
299			</documentation>
300		</annotation>
301		<choice minOccurs="0" maxOccurs="unbounded">
302			<group ref="rng:textformatGroup" />
303			<group ref="rng:listGroup" />
304			<element ref="rng:code" />
305		</choice>
306	</complexType>
307
308	<complexType name="textformatType" mixed="true">
309		<annotation>
310			<documentation>
311				for bold, underline, italics
312			</documentation>
313		</annotation>
314		<choice minOccurs="0" maxOccurs="unbounded">
315			<group ref="rng:textformatGroup" />
316		</choice>
317	</complexType>
318
319	<complexType name="textcodeType">
320		<simpleContent>
321			<extension base="string">
322				<attribute name="title" type="string" />
323			</extension>
324		</simpleContent>
325	</complexType>
326
327	<complexType name="listType">
328		<annotation>
329			<documentation>
330				definition of a list, ordered or unordered
331			</documentation>
332		</annotation>
333		<choice minOccurs="0" maxOccurs="unbounded">
334			<element ref="rng:li" />
335		</choice>
336	</complexType>
337
338	<complexType name="listitemType" mixed="true">
339		<annotation>
340			<documentation>
341				items of a list
342			</documentation>
343		</annotation>
344		<choice minOccurs="0" maxOccurs="unbounded">
345			<group ref="rng:textformatGroup" />
346			<group ref="rng:listGroup" />
347			<element ref="rng:code" />
348		</choice>
349	</complexType>
350
351
352
353	<!-- Attribute value types -->
354
355	<simpleType name="Hexadecimal">
356		<restriction base="string">
357			<pattern value="0x[0-9a-f]+" />
358			<pattern value="0x[0-9A-F]+" />
359			<pattern value="[0-9]" />
360		</restriction>
361	</simpleType>
362
363	<simpleType name="HexOrNumber">
364		<annotation>
365			<documentation>HexOrNumber</documentation>
366		</annotation>
367		<union memberTypes="rng:Hexadecimal nonNegativeInteger" />
368	</simpleType>
369
370	<simpleType name="Boolean">
371		<restriction base="string">
372			<enumeration value="true" />
373			<enumeration value="1" />
374			<enumeration value="yes" />
375			<enumeration value="false" />
376			<enumeration value="0" />
377			<enumeration value="no" />
378		</restriction>
379	</simpleType>
380
381	<simpleType name="Access">
382		<annotation>
383			<documentation>Access</documentation>
384		</annotation>
385		<restriction base="string">
386			<enumeration value="r" />
387			<enumeration value="w" />
388			<enumeration value="rw" />
389		</restriction>
390	</simpleType>
391
392	<simpleType name="DomainWidth">
393		<annotation>
394			<documentation>DomainWidth</documentation>
395		</annotation>
396		<restriction base="string">
397			<enumeration value="8" />
398			<enumeration value="16" />
399			<enumeration value="32" />
400			<enumeration value="64" />
401		</restriction>
402	</simpleType>
403
404
405
406	<!-- Element groups -->
407
408	<group name="topGroup">
409		<choice>
410			<element ref="rng:copyright" />
411			<element ref="rng:domain" />
412			<element ref="rng:enum" />
413			<element ref="rng:group" />
414			<element ref="rng:bitset" />
415			<element ref="rng:import" />
416		</choice>
417	</group>
418
419	<group name="regarrayGroup">
420		<choice>
421			<element ref="rng:reg64" />
422			<element ref="rng:reg32" />
423			<element ref="rng:reg16" />
424			<element ref="rng:reg8" />
425			<element ref="rng:array" />
426			<element ref="rng:stripe" />
427			<element ref="rng:use-group" />
428		</choice>
429	</group>
430
431	<group name="docGroup">
432		<choice>
433			<element ref="rng:brief" />
434			<element ref="rng:doc" />
435		</choice>
436	</group>
437
438	<group name="textformatGroup">
439		<choice>
440			<element ref="rng:b" />
441			<element ref="rng:i" />
442			<element ref="rng:u" />
443		</choice>
444	</group>
445
446	<group name="listGroup">
447		<choice>
448			<element ref="rng:ul" />
449			<element ref="rng:ol" />
450		</choice>
451	</group>
452
453</schema>
454