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 <attribute name="varset" type="NMTOKEN" use="optional" /> 259 </complexType> 260 261 <complexType name="valueType"> 262 <annotation> 263 <documentation>valueType</documentation> 264 </annotation> 265 <choice minOccurs="0" maxOccurs="unbounded"> 266 <group ref="rng:docGroup" /> 267 <group ref="rng:topGroup" /> 268 </choice> 269 <attribute name="name" type="NMTOKEN" use="required" /> 270 <attribute name="value" type="string" use="optional" /> 271 <attribute name="varset" type="NMTOKEN" use="optional" /> 272 <attribute name="variants" type="string" use="optional" /> 273 </complexType> 274 275 <complexType name="refType"> 276 <annotation> 277 <documentation>refType</documentation> 278 </annotation> 279 <attribute name="ref" type="NMTOKEN" use="required" /> 280 </complexType> 281 282 283 <!-- Documentation element types --> 284 285 <complexType name="briefType"> 286 <annotation> 287 <documentation> 288 brief documentation, no markup 289 </documentation> 290 </annotation> 291 <simpleContent> 292 <extension base="string" /> 293 </simpleContent> 294 </complexType> 295 296 <complexType name="docType" mixed="true"> 297 <annotation> 298 <documentation> 299 root element of documentation sub-tree 300 </documentation> 301 </annotation> 302 <choice minOccurs="0" maxOccurs="unbounded"> 303 <group ref="rng:textformatGroup" /> 304 <group ref="rng:listGroup" /> 305 <element ref="rng:code" /> 306 </choice> 307 </complexType> 308 309 <complexType name="textformatType" mixed="true"> 310 <annotation> 311 <documentation> 312 for bold, underline, italics 313 </documentation> 314 </annotation> 315 <choice minOccurs="0" maxOccurs="unbounded"> 316 <group ref="rng:textformatGroup" /> 317 </choice> 318 </complexType> 319 320 <complexType name="textcodeType"> 321 <simpleContent> 322 <extension base="string"> 323 <attribute name="title" type="string" /> 324 </extension> 325 </simpleContent> 326 </complexType> 327 328 <complexType name="listType"> 329 <annotation> 330 <documentation> 331 definition of a list, ordered or unordered 332 </documentation> 333 </annotation> 334 <choice minOccurs="0" maxOccurs="unbounded"> 335 <element ref="rng:li" /> 336 </choice> 337 </complexType> 338 339 <complexType name="listitemType" mixed="true"> 340 <annotation> 341 <documentation> 342 items of a list 343 </documentation> 344 </annotation> 345 <choice minOccurs="0" maxOccurs="unbounded"> 346 <group ref="rng:textformatGroup" /> 347 <group ref="rng:listGroup" /> 348 <element ref="rng:code" /> 349 </choice> 350 </complexType> 351 352 353 354 <!-- Attribute value types --> 355 356 <simpleType name="Hexadecimal"> 357 <restriction base="string"> 358 <pattern value="0x[0-9a-f]+" /> 359 <pattern value="0x[0-9A-F]+" /> 360 <pattern value="[0-9]" /> 361 </restriction> 362 </simpleType> 363 364 <simpleType name="HexOrNumber"> 365 <annotation> 366 <documentation>HexOrNumber</documentation> 367 </annotation> 368 <union memberTypes="rng:Hexadecimal nonNegativeInteger" /> 369 </simpleType> 370 371 <simpleType name="Boolean"> 372 <restriction base="string"> 373 <enumeration value="true" /> 374 <enumeration value="1" /> 375 <enumeration value="yes" /> 376 <enumeration value="false" /> 377 <enumeration value="0" /> 378 <enumeration value="no" /> 379 </restriction> 380 </simpleType> 381 382 <simpleType name="Access"> 383 <annotation> 384 <documentation>Access</documentation> 385 </annotation> 386 <restriction base="string"> 387 <enumeration value="r" /> 388 <enumeration value="w" /> 389 <enumeration value="rw" /> 390 </restriction> 391 </simpleType> 392 393 <simpleType name="DomainWidth"> 394 <annotation> 395 <documentation>DomainWidth</documentation> 396 </annotation> 397 <restriction base="string"> 398 <enumeration value="8" /> 399 <enumeration value="16" /> 400 <enumeration value="32" /> 401 <enumeration value="64" /> 402 </restriction> 403 </simpleType> 404 405 406 407 <!-- Element groups --> 408 409 <group name="topGroup"> 410 <choice> 411 <element ref="rng:copyright" /> 412 <element ref="rng:domain" /> 413 <element ref="rng:enum" /> 414 <element ref="rng:group" /> 415 <element ref="rng:bitset" /> 416 <element ref="rng:import" /> 417 </choice> 418 </group> 419 420 <group name="regarrayGroup"> 421 <choice> 422 <element ref="rng:reg64" /> 423 <element ref="rng:reg32" /> 424 <element ref="rng:reg16" /> 425 <element ref="rng:reg8" /> 426 <element ref="rng:array" /> 427 <element ref="rng:stripe" /> 428 <element ref="rng:use-group" /> 429 </choice> 430 </group> 431 432 <group name="docGroup"> 433 <choice> 434 <element ref="rng:brief" /> 435 <element ref="rng:doc" /> 436 </choice> 437 </group> 438 439 <group name="textformatGroup"> 440 <choice> 441 <element ref="rng:b" /> 442 <element ref="rng:i" /> 443 <element ref="rng:u" /> 444 </choice> 445 </group> 446 447 <group name="listGroup"> 448 <choice> 449 <element ref="rng:ul" /> 450 <element ref="rng:ol" /> 451 </choice> 452 </group> 453 454</schema> 455