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">
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'.
16 <documentation>Version 0.1</documentation>
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" />
39 <!-- Copyright elements -->
40 <element name="author" type="rng:authorType" />
41 <element name="nick" type="rng:nickType" />
42 <element name="license" type="rng:docType" />
44 <!-- Documentation elements -->
46 <!-- FIXME: allowed only one per parent element -->
47 <element name="brief" type="rng:briefType" />
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" />
58 <!-- Copyright element types -->
60 <complexType name="authorType" mixed="true">
63 register database author
66 <choice minOccurs="0" maxOccurs="unbounded">
67 <element ref="rng:nick" />
69 <attribute name="name" type="string" use="required" />
70 <attribute name="email" type="string" use="required" />
73 <complexType name="nickType">
75 <documentation>nickType</documentation>
77 <attribute name="name" type="string" use="required" />
80 <!-- Database element types -->
82 <complexType name="databaseType">
84 <documentation>databaseType</documentation>
86 <choice minOccurs="0" maxOccurs="unbounded">
87 <group ref="rng:docGroup" />
88 <group ref="rng:topGroup" />
92 <complexType name="importType">
94 <documentation>importType</documentation>
96 <attribute name="file" type="string" use="required" />
99 <complexType name="copyrightType">
101 <documentation>copyrightType</documentation>
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" />
109 <attribute name="year" type="nonNegativeInteger" use="optional" />
112 <complexType name="domainType">
114 <documentation>domainType</documentation>
116 <choice minOccurs="0" maxOccurs="unbounded">
117 <group ref="rng:docGroup" />
118 <group ref="rng:topGroup" />
119 <group ref="rng:regarrayGroup" />
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" />
130 <complexType name="groupType">
132 <documentation>groupType</documentation>
134 <choice minOccurs="0" maxOccurs="unbounded">
135 <group ref="rng:docGroup" />
136 <group ref="rng:topGroup" />
137 <group ref="rng:regarrayGroup" />
139 <attribute name="name" type="NMTOKEN" use="required" />
142 <complexType name="arrayType">
144 <documentation>arrayType</documentation>
146 <choice minOccurs="0" maxOccurs="unbounded">
147 <group ref="rng:docGroup" />
148 <group ref="rng:topGroup" />
149 <group ref="rng:regarrayGroup" />
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" />
162 <complexType name="stripeType">
164 <documentation>stripeType</documentation>
166 <choice minOccurs="0" maxOccurs="unbounded">
167 <group ref="rng:docGroup" />
168 <group ref="rng:topGroup" />
169 <group ref="rng:regarrayGroup" minOccurs="0" />
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" />
180 <complexType name="registerType">
183 registerType used by reg8, reg16, reg32, reg64
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" />
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" />
208 <complexType name="bitsetType">
210 <documentation>bitsetType</documentation>
212 <choice maxOccurs="unbounded">
213 <element ref="rng:bitfield" />
214 <group ref="rng:docGroup" />
215 <group ref="rng:topGroup" />
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" />
223 <complexType name="bitfieldType">
225 <documentation>bitfieldType</documentation>
227 <choice minOccurs="0" maxOccurs="unbounded">
228 <element ref="rng:value" maxOccurs="unbounded" />
229 <group ref="rng:docGroup" />
230 <group ref="rng:topGroup" />
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" />
245 <complexType name="enumType">
247 <documentation>enumType</documentation>
249 <choice maxOccurs="unbounded">
250 <element ref="rng:value" />
251 <group ref="rng:docGroup" />
252 <group ref="rng:topGroup" />
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" />
260 <complexType name="valueType">
262 <documentation>valueType</documentation>
264 <choice minOccurs="0" maxOccurs="unbounded">
265 <group ref="rng:docGroup" />
266 <group ref="rng:topGroup" />
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" />
274 <complexType name="refType">
276 <documentation>refType</documentation>
278 <attribute name="ref" type="NMTOKEN" use="required" />
282 <!-- Documentation element types -->
284 <complexType name="briefType">
287 brief documentation, no markup
291 <extension base="string" />
295 <complexType name="docType" mixed="true">
298 root element of documentation sub-tree
301 <choice minOccurs="0" maxOccurs="unbounded">
302 <group ref="rng:textformatGroup" />
303 <group ref="rng:listGroup" />
304 <element ref="rng:code" />
308 <complexType name="textformatType" mixed="true">
311 for bold, underline, italics
314 <choice minOccurs="0" maxOccurs="unbounded">
315 <group ref="rng:textformatGroup" />
319 <complexType name="textcodeType">
321 <extension base="string">
322 <attribute name="title" type="string" />
327 <complexType name="listType">
330 definition of a list, ordered or unordered
333 <choice minOccurs="0" maxOccurs="unbounded">
334 <element ref="rng:li" />
338 <complexType name="listitemType" mixed="true">
344 <choice minOccurs="0" maxOccurs="unbounded">
345 <group ref="rng:textformatGroup" />
346 <group ref="rng:listGroup" />
347 <element ref="rng:code" />
353 <!-- Attribute value types -->
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]" />
363 <simpleType name="HexOrNumber">
365 <documentation>HexOrNumber</documentation>
367 <union memberTypes="rng:Hexadecimal nonNegativeInteger" />
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" />
381 <simpleType name="Access">
383 <documentation>Access</documentation>
385 <restriction base="string">
386 <enumeration value="r" />
387 <enumeration value="w" />
388 <enumeration value="rw" />
392 <simpleType name="DomainWidth">
394 <documentation>DomainWidth</documentation>
396 <restriction base="string">
397 <enumeration value="8" />
398 <enumeration value="16" />
399 <enumeration value="32" />
400 <enumeration value="64" />
406 <!-- Element groups -->
408 <group name="topGroup">
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" />
419 <group name="regarrayGroup">
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" />
431 <group name="docGroup">
433 <element ref="rng:brief" />
434 <element ref="rng:doc" />
438 <group name="textformatGroup">
440 <element ref="rng:b" />
441 <element ref="rng:i" />
442 <element ref="rng:u" />
446 <group name="listGroup">
448 <element ref="rng:ul" />
449 <element ref="rng:ol" />