• 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		<attribute name="usage" type="string" use="optional" />
161	</complexType>
162
163	<complexType name="stripeType">
164		<annotation>
165			<documentation>stripeType</documentation>
166		</annotation>
167		<choice minOccurs="0" maxOccurs="unbounded">
168			<group ref="rng:docGroup" />
169			<group ref="rng:topGroup" />
170			<group ref="rng:regarrayGroup" minOccurs="0" />
171		</choice>
172		<attribute name="name" type="NMTOKEN" use="optional" />
173		<attribute name="offset" type="rng:HexOrNumber" use="optional" />
174		<attribute name="stride" type="rng:HexOrNumber" use="optional" />
175		<attribute name="length" type="rng:HexOrNumber" use="optional" />
176		<attribute name="varset" type="NMTOKEN" use="optional" />
177		<attribute name="variants" type="string" use="optional" />
178		<attribute name="prefix" type="NMTOKENS" use="optional" />
179	</complexType>
180
181	<complexType name="registerType">
182		<annotation>
183			<documentation>
184				registerType used by reg8, reg16, reg32, reg64
185			</documentation>
186		</annotation>
187		<choice minOccurs="0" maxOccurs="unbounded">
188			<group ref="rng:docGroup" />
189			<group ref="rng:topGroup" />
190			<element ref="rng:value" />
191			<element ref="rng:bitfield" />
192		</choice>
193		<attribute name="name" type="NMTOKEN" use="required" />
194		<attribute name="offset" type="rng:HexOrNumber" use="required" />
195		<attribute name="access" type="rng:Access" default="rw" use="optional" />
196		<attribute name="type" type="NMTOKENS" use="optional" />
197		<attribute name="shr" type="nonNegativeInteger" use="optional" />
198		<attribute name="varset" type="NMTOKEN" use="optional" />
199		<attribute name="variants" type="string" use="optional" />
200		<attribute name="stride" type="rng:HexOrNumber" use="optional" />
201		<attribute name="length" type="rng:HexOrNumber" use="optional" />
202		<attribute name="high" type="nonNegativeInteger" use="optional" />
203		<attribute name="low" type="nonNegativeInteger" use="optional" />
204		<attribute name="pos" type="nonNegativeInteger" use="optional" />
205		<attribute name="align" type="nonNegativeInteger" use="optional" />
206		<attribute name="radix" type="nonNegativeInteger" use="optional" />
207		<attribute name="usage" type="string" use="optional" />
208	</complexType>
209
210	<complexType name="bitsetType">
211		<annotation>
212			<documentation>bitsetType</documentation>
213		</annotation>
214		<choice maxOccurs="unbounded">
215			<element ref="rng:bitfield" />
216			<group ref="rng:docGroup" />
217			<group ref="rng:topGroup" />
218		</choice>
219		<attribute name="name" type="NMTOKEN" use="required" />
220		<attribute name="inline" type="rng:Boolean" use="optional" />
221		<attribute name="bare" type="rng:Boolean" use="optional" />
222		<attribute name="prefix" type="NMTOKENS" use="optional" />
223		<attribute name="varset" type="NMTOKEN" use="optional" />
224	</complexType>
225
226	<complexType name="bitfieldType">
227		<annotation>
228			<documentation>bitfieldType</documentation>
229		</annotation>
230		<choice minOccurs="0" maxOccurs="unbounded">
231			<element ref="rng:value" maxOccurs="unbounded" />
232			<group ref="rng:docGroup" />
233			<group ref="rng:topGroup" />
234		</choice>
235		<attribute name="name" type="NMTOKEN" use="required" />
236		<attribute name="high" type="nonNegativeInteger" use="optional" />
237		<attribute name="low" type="nonNegativeInteger" use="optional" />
238		<attribute name="pos" type="nonNegativeInteger" use="optional" />
239		<attribute name="radix" type="nonNegativeInteger" use="optional" />
240		<attribute name="align" type="nonNegativeInteger" use="optional" />
241		<attribute name="type" type="NMTOKENS" use="optional" />
242		<attribute name="varset" type="NMTOKEN" use="optional" />
243		<attribute name="variants" type="string" use="optional" />
244		<attribute name="addvariant" type="rng:Boolean" use="optional" />
245		<attribute name="shr" type="nonNegativeInteger" use="optional" />
246	</complexType>
247
248	<complexType name="enumType">
249		<annotation>
250			<documentation>enumType</documentation>
251		</annotation>
252		<choice maxOccurs="unbounded">
253			<element ref="rng:value" />
254			<group ref="rng:docGroup" />
255			<group ref="rng:topGroup" />
256		</choice>
257		<attribute name="name" type="NMTOKEN" use="required" />
258		<attribute name="inline" type="rng:Boolean" use="optional" />
259		<attribute name="bare" type="rng:Boolean" use="optional" />
260		<attribute name="prefix" type="NMTOKENS" use="optional" />
261		<attribute name="varset" type="NMTOKEN" use="optional" />
262	</complexType>
263
264	<complexType name="valueType">
265		<annotation>
266			<documentation>valueType</documentation>
267		</annotation>
268		<choice minOccurs="0" maxOccurs="unbounded">
269			<group ref="rng:docGroup" />
270			<group ref="rng:topGroup" />
271		</choice>
272		<attribute name="name" type="NMTOKEN" use="required" />
273		<attribute name="value" type="string" use="optional" />
274		<attribute name="varset" type="NMTOKEN" use="optional" />
275		<attribute name="variants" type="string" use="optional" />
276	</complexType>
277
278	<complexType name="refType">
279		<annotation>
280			<documentation>refType</documentation>
281		</annotation>
282		<attribute name="ref" type="NMTOKEN" use="required" />
283	</complexType>
284
285
286	<!-- Documentation element types -->
287
288	<complexType name="briefType">
289		<annotation>
290			<documentation>
291				brief documentation, no markup
292			</documentation>
293		</annotation>
294		<simpleContent>
295			<extension base="string" />
296		</simpleContent>
297	</complexType>
298
299	<complexType name="docType" mixed="true">
300		<annotation>
301			<documentation>
302				root element of documentation sub-tree
303			</documentation>
304		</annotation>
305		<choice minOccurs="0" maxOccurs="unbounded">
306			<group ref="rng:textformatGroup" />
307			<group ref="rng:listGroup" />
308			<element ref="rng:code" />
309		</choice>
310	</complexType>
311
312	<complexType name="textformatType" mixed="true">
313		<annotation>
314			<documentation>
315				for bold, underline, italics
316			</documentation>
317		</annotation>
318		<choice minOccurs="0" maxOccurs="unbounded">
319			<group ref="rng:textformatGroup" />
320		</choice>
321	</complexType>
322
323	<complexType name="textcodeType">
324		<simpleContent>
325			<extension base="string">
326				<attribute name="title" type="string" />
327			</extension>
328		</simpleContent>
329	</complexType>
330
331	<complexType name="listType">
332		<annotation>
333			<documentation>
334				definition of a list, ordered or unordered
335			</documentation>
336		</annotation>
337		<choice minOccurs="0" maxOccurs="unbounded">
338			<element ref="rng:li" />
339		</choice>
340	</complexType>
341
342	<complexType name="listitemType" mixed="true">
343		<annotation>
344			<documentation>
345				items of a list
346			</documentation>
347		</annotation>
348		<choice minOccurs="0" maxOccurs="unbounded">
349			<group ref="rng:textformatGroup" />
350			<group ref="rng:listGroup" />
351			<element ref="rng:code" />
352		</choice>
353	</complexType>
354
355
356
357	<!-- Attribute value types -->
358
359	<simpleType name="Hexadecimal">
360		<restriction base="string">
361			<pattern value="0x[0-9a-f]+" />
362			<pattern value="0x[0-9A-F]+" />
363			<pattern value="[0-9]" />
364		</restriction>
365	</simpleType>
366
367	<simpleType name="HexOrNumber">
368		<annotation>
369			<documentation>HexOrNumber</documentation>
370		</annotation>
371		<union memberTypes="rng:Hexadecimal nonNegativeInteger" />
372	</simpleType>
373
374	<simpleType name="Boolean">
375		<restriction base="string">
376			<enumeration value="true" />
377			<enumeration value="1" />
378			<enumeration value="yes" />
379			<enumeration value="false" />
380			<enumeration value="0" />
381			<enumeration value="no" />
382		</restriction>
383	</simpleType>
384
385	<simpleType name="Access">
386		<annotation>
387			<documentation>Access</documentation>
388		</annotation>
389		<restriction base="string">
390			<enumeration value="r" />
391			<enumeration value="w" />
392			<enumeration value="rw" />
393		</restriction>
394	</simpleType>
395
396	<simpleType name="DomainWidth">
397		<annotation>
398			<documentation>DomainWidth</documentation>
399		</annotation>
400		<restriction base="string">
401			<enumeration value="8" />
402			<enumeration value="16" />
403			<enumeration value="32" />
404			<enumeration value="64" />
405		</restriction>
406	</simpleType>
407
408
409
410	<!-- Element groups -->
411
412	<group name="topGroup">
413		<choice>
414			<element ref="rng:copyright" />
415			<element ref="rng:domain" />
416			<element ref="rng:enum" />
417			<element ref="rng:group" />
418			<element ref="rng:bitset" />
419			<element ref="rng:import" />
420		</choice>
421	</group>
422
423	<group name="regarrayGroup">
424		<choice>
425			<element ref="rng:reg64" />
426			<element ref="rng:reg32" />
427			<element ref="rng:reg16" />
428			<element ref="rng:reg8" />
429			<element ref="rng:array" />
430			<element ref="rng:stripe" />
431			<element ref="rng:use-group" />
432		</choice>
433	</group>
434
435	<group name="docGroup">
436		<choice>
437			<element ref="rng:brief" />
438			<element ref="rng:doc" />
439		</choice>
440	</group>
441
442	<group name="textformatGroup">
443		<choice>
444			<element ref="rng:b" />
445			<element ref="rng:i" />
446			<element ref="rng:u" />
447		</choice>
448	</group>
449
450	<group name="listGroup">
451		<choice>
452			<element ref="rng:ul" />
453			<element ref="rng:ol" />
454		</choice>
455	</group>
456
457</schema>
458