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="array" type="rng:arrayType" />
27 <element name="stripe" type="rng:stripeType" />
28 <element name="reg64" type="rng:registerType" />
29 <element name="reg32" type="rng:registerType" />
30 <element name="bitset" type="rng:bitsetType" />
31 <element name="bitfield" type="rng:bitfieldType" />
32 <element name="enum" type="rng:enumType" />
33 <element name="value" type="rng:valueType" />
35 <!-- Copyright elements -->
36 <element name="author" type="rng:authorType" />
37 <element name="nick" type="rng:nickType" />
38 <element name="license" type="rng:docType" />
40 <!-- Documentation elements -->
42 <!-- FIXME: allowed only one per parent element -->
43 <element name="brief" type="rng:briefType" />
45 <element name="doc" type="rng:docType" />
46 <element name="b" type="rng:textformatType" />
47 <element name="i" type="rng:textformatType" />
48 <element name="u" type="rng:textformatType" />
49 <element name="code" type="rng:textcodeType" />
50 <element name="ul" type="rng:listType" />
51 <element name="ol" type="rng:listType" />
52 <element name="li" type="rng:listitemType" />
54 <!-- Copyright element types -->
56 <complexType name="authorType" mixed="true">
59 register database author
62 <choice minOccurs="0" maxOccurs="unbounded">
63 <element ref="rng:nick" />
65 <attribute name="name" type="string" use="required" />
66 <attribute name="email" type="string" use="required" />
69 <complexType name="nickType">
71 <documentation>nickType</documentation>
73 <attribute name="name" type="string" use="required" />
76 <!-- Database element types -->
78 <complexType name="databaseType">
80 <documentation>databaseType</documentation>
82 <choice minOccurs="0" maxOccurs="unbounded">
83 <group ref="rng:docGroup" />
84 <group ref="rng:topGroup" />
88 <complexType name="importType">
90 <documentation>importType</documentation>
92 <attribute name="file" type="string" use="required" />
95 <complexType name="copyrightType">
97 <documentation>copyrightType</documentation>
99 <choice minOccurs="0" maxOccurs="unbounded">
100 <group ref="rng:docGroup" />
101 <group ref="rng:topGroup" />
102 <element ref="rng:author" />
103 <element ref="rng:license" />
105 <attribute name="year" type="nonNegativeInteger" use="optional" />
108 <complexType name="domainType">
110 <documentation>domainType</documentation>
112 <choice minOccurs="0" maxOccurs="unbounded">
113 <group ref="rng:docGroup" />
114 <group ref="rng:topGroup" />
115 <group ref="rng:regarrayGroup" />
117 <attribute name="name" type="NMTOKEN" use="required" />
118 <attribute name="prefix" type="NMTOKENS" use="optional" />
119 <attribute name="width" type="rng:DomainWidth" use="optional" />
120 <attribute name="varset" type="NMTOKEN" use="optional" />
121 <attribute name="variants" type="string" use="optional" />
124 <complexType name="arrayType">
126 <documentation>arrayType</documentation>
128 <choice minOccurs="0" maxOccurs="unbounded">
129 <group ref="rng:docGroup" />
130 <group ref="rng:topGroup" />
131 <group ref="rng:regarrayGroup" />
133 <attribute name="name" type="NMTOKEN" use="optional" />
134 <attribute name="offset" type="rng:HexOrNumber" use="optional" />
135 <attribute name="offsets" type="string" use="optional"/>
136 <attribute name="doffsets" type="string" use="optional"/>
137 <attribute name="index" type="NMTOKENS" use="optional"/>
138 <attribute name="stride" type="rng:HexOrNumber" use="required" />
139 <attribute name="length" type="rng:HexOrNumber" use="required" />
140 <attribute name="varset" type="NMTOKEN" use="optional" />
141 <attribute name="variants" type="string" use="optional" />
142 <attribute name="usage" type="string" use="optional" />
145 <complexType name="stripeType">
147 <documentation>stripeType</documentation>
149 <choice minOccurs="0" maxOccurs="unbounded">
150 <group ref="rng:docGroup" />
151 <group ref="rng:topGroup" />
152 <group ref="rng:regarrayGroup" minOccurs="0" />
154 <attribute name="varset" type="NMTOKEN" use="optional" />
155 <attribute name="variants" type="string" use="optional" />
156 <attribute name="prefix" type="NMTOKENS" use="optional" />
159 <complexType name="registerType">
162 registerType used by reg32, reg64
165 <choice minOccurs="0" maxOccurs="unbounded">
166 <group ref="rng:docGroup" />
167 <group ref="rng:topGroup" />
168 <element ref="rng:value" />
169 <element ref="rng:bitfield" />
171 <attribute name="name" type="NMTOKEN" use="required" />
172 <attribute name="offset" type="rng:HexOrNumber" use="required" />
173 <attribute name="type" type="NMTOKENS" use="optional" />
174 <attribute name="shr" type="nonNegativeInteger" use="optional" />
175 <attribute name="varset" type="NMTOKEN" use="optional" />
176 <attribute name="variants" type="string" use="optional" />
177 <attribute name="stride" type="rng:HexOrNumber" use="optional" />
178 <attribute name="length" type="rng:HexOrNumber" use="optional" />
179 <attribute name="high" type="nonNegativeInteger" use="optional" />
180 <attribute name="low" type="nonNegativeInteger" use="optional" />
181 <attribute name="pos" type="nonNegativeInteger" use="optional" />
182 <attribute name="align" type="nonNegativeInteger" use="optional" />
183 <attribute name="radix" type="nonNegativeInteger" use="optional" />
184 <attribute name="usage" type="string" use="optional" />
187 <complexType name="bitsetType">
189 <documentation>bitsetType</documentation>
191 <choice maxOccurs="unbounded">
192 <element ref="rng:bitfield" />
193 <group ref="rng:docGroup" />
194 <group ref="rng:topGroup" />
196 <attribute name="name" type="NMTOKEN" use="required" />
197 <attribute name="inline" type="rng:Boolean" use="optional" />
198 <attribute name="varset" type="NMTOKEN" use="optional" />
201 <complexType name="bitfieldType">
203 <documentation>bitfieldType</documentation>
205 <choice minOccurs="0" maxOccurs="unbounded">
206 <element ref="rng:value" maxOccurs="unbounded" />
207 <group ref="rng:docGroup" />
208 <group ref="rng:topGroup" />
210 <attribute name="name" type="NMTOKEN" use="required" />
211 <attribute name="high" type="nonNegativeInteger" use="optional" />
212 <attribute name="low" type="nonNegativeInteger" use="optional" />
213 <attribute name="pos" type="nonNegativeInteger" use="optional" />
214 <attribute name="radix" type="nonNegativeInteger" use="optional" />
215 <attribute name="type" type="NMTOKENS" use="optional" />
216 <attribute name="varset" type="NMTOKEN" use="optional" />
217 <attribute name="variants" type="string" use="optional" />
218 <attribute name="addvariant" type="rng:Boolean" use="optional" />
219 <attribute name="shr" type="nonNegativeInteger" use="optional" />
222 <complexType name="enumType">
224 <documentation>enumType</documentation>
226 <choice maxOccurs="unbounded">
227 <element ref="rng:value" />
228 <group ref="rng:docGroup" />
229 <group ref="rng:topGroup" />
231 <attribute name="name" type="NMTOKEN" use="required" />
232 <attribute name="bare" type="rng:Boolean" use="optional" />
233 <attribute name="prefix" type="NMTOKENS" use="optional" />
234 <attribute name="varset" type="NMTOKEN" use="optional" />
237 <complexType name="valueType">
239 <documentation>valueType</documentation>
241 <choice minOccurs="0" maxOccurs="unbounded">
242 <group ref="rng:docGroup" />
243 <group ref="rng:topGroup" />
245 <attribute name="name" type="NMTOKEN" use="required" />
246 <attribute name="value" type="string" use="optional" />
247 <attribute name="varset" type="NMTOKEN" use="optional" />
248 <attribute name="variants" type="string" use="optional" />
251 <!-- Documentation element types -->
253 <complexType name="briefType">
256 brief documentation, no markup
260 <extension base="string" />
264 <complexType name="docType" mixed="true">
267 root element of documentation sub-tree
270 <choice minOccurs="0" maxOccurs="unbounded">
271 <group ref="rng:textformatGroup" />
272 <group ref="rng:listGroup" />
273 <element ref="rng:code" />
277 <complexType name="textformatType" mixed="true">
280 for bold, underline, italics
283 <choice minOccurs="0" maxOccurs="unbounded">
284 <group ref="rng:textformatGroup" />
288 <complexType name="textcodeType">
290 <extension base="string">
291 <attribute name="title" type="string" />
296 <complexType name="listType">
299 definition of a list, ordered or unordered
302 <choice minOccurs="0" maxOccurs="unbounded">
303 <element ref="rng:li" />
307 <complexType name="listitemType" mixed="true">
313 <choice minOccurs="0" maxOccurs="unbounded">
314 <group ref="rng:textformatGroup" />
315 <group ref="rng:listGroup" />
316 <element ref="rng:code" />
322 <!-- Attribute value types -->
324 <simpleType name="Hexadecimal">
325 <restriction base="string">
326 <pattern value="0x[0-9a-f]+" />
327 <pattern value="0x[0-9A-F]+" />
328 <pattern value="[0-9]" />
332 <simpleType name="HexOrNumber">
334 <documentation>HexOrNumber</documentation>
336 <union memberTypes="rng:Hexadecimal nonNegativeInteger" />
339 <simpleType name="Boolean">
340 <restriction base="string">
341 <enumeration value="true" />
342 <enumeration value="1" />
343 <enumeration value="yes" />
344 <enumeration value="false" />
345 <enumeration value="0" />
346 <enumeration value="no" />
350 <simpleType name="DomainWidth">
352 <documentation>DomainWidth</documentation>
354 <restriction base="string">
355 <enumeration value="32" />
361 <!-- Element groups -->
363 <group name="topGroup">
365 <element ref="rng:copyright" />
366 <element ref="rng:domain" />
367 <element ref="rng:enum" />
368 <element ref="rng:bitset" />
369 <element ref="rng:import" />
373 <group name="regarrayGroup">
375 <element ref="rng:reg64" />
376 <element ref="rng:reg32" />
377 <element ref="rng:array" />
378 <element ref="rng:stripe" />
382 <group name="docGroup">
384 <element ref="rng:brief" />
385 <element ref="rng:doc" />
389 <group name="textformatGroup">
391 <element ref="rng:b" />
392 <element ref="rng:i" />
393 <element ref="rng:u" />
397 <group name="listGroup">
399 <element ref="rng:ul" />
400 <element ref="rng:ol" />