/rnndb/rules-ng-ng.xsd

https://github.com/lucaotta/envytools · XML Schema · 388 lines · 342 code · 46 blank · 0 comment · 0 complexity · 25456c0abbd5b2ea1e022205cfdd8e26 MD5 · raw file

  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. <annotation>
  7. <documentation>
  8. An updated version of the old rules.xml file from the
  9. RivaTV project. Specifications by Pekka Paalanen,
  10. preliminary attempt by KoalaBR,
  11. first working version by Jakob Bornecrantz.
  12. For specifications, see the file rules-ng-format.txt
  13. in Nouveau CVS module 'rules-ng'.
  14. </documentation>
  15. <documentation>Version 0.1</documentation>
  16. </annotation>
  17. <!-- Elements -->
  18. <element name="database" type="rng:databaseType" />
  19. <element name="import" type="rng:importType" />
  20. <element name="domain" type="rng:domainType" />
  21. <element name="group" type="rng:groupType" />
  22. <element name="use-group" type="rng:refType" />
  23. <element name="array" type="rng:arrayType" />
  24. <element name="stripe" type="rng:stripeType" />
  25. <element name="reg64" type="rng:registerType" />
  26. <element name="reg32" type="rng:registerType" />
  27. <element name="reg16" type="rng:registerType" />
  28. <element name="reg8" type="rng:registerType" />
  29. <element name="bitset" type="rng:bitsetType" />
  30. <element name="bitfield" type="rng:bitfieldType" />
  31. <element name="enum" type="rng:enumType" />
  32. <element name="value" type="rng:valueType" />
  33. <!-- Documentation elements -->
  34. <!-- FIXME: allowed only one per parent element -->
  35. <element name="brief" type="rng:briefType" />
  36. <element name="doc" type="rng:docType" />
  37. <element name="b" type="rng:textformatType" />
  38. <element name="i" type="rng:textformatType" />
  39. <element name="u" type="rng:textformatType" />
  40. <element name="code" type="rng:textcodeType" />
  41. <element name="ul" type="rng:listType" />
  42. <element name="ol" type="rng:listType" />
  43. <element name="li" type="rng:listitemType" />
  44. <!-- Database element types -->
  45. <complexType name="databaseType">
  46. <annotation>
  47. <documentation>databaseType</documentation>
  48. </annotation>
  49. <choice minOccurs="0" maxOccurs="unbounded">
  50. <group ref="rng:docGroup" />
  51. <group ref="rng:topGroup" />
  52. </choice>
  53. </complexType>
  54. <complexType name="importType">
  55. <annotation>
  56. <documentation>importType</documentation>
  57. </annotation>
  58. <attribute name="file" type="string" use="required" />
  59. </complexType>
  60. <complexType name="domainType">
  61. <annotation>
  62. <documentation>domainType</documentation>
  63. </annotation>
  64. <choice minOccurs="0" maxOccurs="unbounded">
  65. <group ref="rng:docGroup" />
  66. <group ref="rng:topGroup" />
  67. <group ref="rng:regarrayGroup" />
  68. </choice>
  69. <attribute name="name" type="NMTOKEN" use="required" />
  70. <attribute name="bare" type="boolean" use="optional" />
  71. <attribute name="prefix" type="NMTOKENS" use="optional" />
  72. <attribute name="width" type="rng:DomainWidth" use="optional" />
  73. <attribute name="size" type="rng:Hexadecimal" use="optional" />
  74. </complexType>
  75. <complexType name="groupType">
  76. <annotation>
  77. <documentation>groupType</documentation>
  78. </annotation>
  79. <choice minOccurs="0" maxOccurs="unbounded">
  80. <group ref="rng:docGroup" />
  81. <group ref="rng:topGroup" />
  82. <group ref="rng:regarrayGroup" />
  83. </choice>
  84. <attribute name="name" type="NMTOKEN" use="required" />
  85. </complexType>
  86. <complexType name="arrayType">
  87. <annotation>
  88. <documentation>arrayType</documentation>
  89. </annotation>
  90. <choice minOccurs="0" maxOccurs="unbounded">
  91. <group ref="rng:docGroup" />
  92. <group ref="rng:topGroup" />
  93. <group ref="rng:regarrayGroup" />
  94. </choice>
  95. <attribute name="name" type="NMTOKEN" use="required" />
  96. <attribute name="offset" type="rng:Hexadecimal" use="required" />
  97. <attribute name="stride" type="rng:HexOrNumber" use="required" />
  98. <attribute name="length" type="rng:HexOrNumber" use="required" />
  99. <attribute name="varset" type="NMTOKEN" use="optional" />
  100. <attribute name="variants" type="string" use="optional" />
  101. </complexType>
  102. <complexType name="stripeType">
  103. <annotation>
  104. <documentation>stripeType</documentation>
  105. </annotation>
  106. <choice minOccurs="0" maxOccurs="unbounded">
  107. <group ref="rng:docGroup" />
  108. <group ref="rng:topGroup" />
  109. <group ref="rng:regarrayGroup" minOccurs="0" />
  110. </choice>
  111. <attribute name="name" type="NMTOKEN" use="optional" />
  112. <attribute name="offset" type="rng:Hexadecimal" use="optional" />
  113. <attribute name="stride" type="rng:HexOrNumber" use="optional" />
  114. <attribute name="length" type="rng:HexOrNumber" use="optional" />
  115. <attribute name="varset" type="NMTOKEN" use="optional" />
  116. <attribute name="variants" type="string" use="optional" />
  117. <attribute name="prefix" type="NMTOKENS" use="optional" />
  118. </complexType>
  119. <complexType name="registerType">
  120. <annotation>
  121. <documentation>
  122. registerType used by reg8, reg16, reg32, reg64
  123. </documentation>
  124. </annotation>
  125. <choice minOccurs="0" maxOccurs="unbounded">
  126. <group ref="rng:docGroup" />
  127. <group ref="rng:topGroup" />
  128. <element ref="rng:value" />
  129. <element ref="rng:bitfield" />
  130. </choice>
  131. <attribute name="name" type="NMTOKEN" use="required" />
  132. <attribute name="offset" type="rng:Hexadecimal" use="required" />
  133. <attribute name="access" type="rng:Access" default="rw" use="optional" />
  134. <attribute name="type" type="NMTOKENS" use="optional" />
  135. <attribute name="shr" type="nonNegativeInteger" use="optional" />
  136. <attribute name="varset" type="NMTOKEN" use="optional" />
  137. <attribute name="variants" type="string" use="optional" />
  138. <attribute name="stride" type="rng:HexOrNumber" use="optional" />
  139. <attribute name="length" type="rng:HexOrNumber" use="optional" />
  140. </complexType>
  141. <complexType name="bitsetType">
  142. <annotation>
  143. <documentation>bitsetType</documentation>
  144. </annotation>
  145. <choice maxOccurs="unbounded">
  146. <element ref="rng:bitfield" />
  147. <group ref="rng:docGroup" />
  148. <group ref="rng:topGroup" />
  149. </choice>
  150. <attribute name="name" type="NMTOKEN" use="required" />
  151. <attribute name="inline" type="boolean" use="optional" />
  152. <attribute name="bare" type="boolean" use="optional" />
  153. <attribute name="prefix" type="NMTOKENS" use="optional" />
  154. </complexType>
  155. <complexType name="bitfieldType">
  156. <annotation>
  157. <documentation>bitfieldType</documentation>
  158. </annotation>
  159. <choice minOccurs="0" maxOccurs="unbounded">
  160. <element ref="rng:value" maxOccurs="unbounded" />
  161. <group ref="rng:docGroup" />
  162. <group ref="rng:topGroup" />
  163. </choice>
  164. <attribute name="name" type="NMTOKEN" use="required" />
  165. <attribute name="high" type="nonNegativeInteger" use="required" />
  166. <attribute name="low" type="nonNegativeInteger" use="required" />
  167. <attribute name="type" type="NMTOKENS" use="optional" />
  168. <attribute name="varset" type="NMTOKEN" use="optional" />
  169. <attribute name="variants" type="string" use="optional" />
  170. <attribute name="shr" type="nonNegativeInteger" use="optional" />
  171. </complexType>
  172. <complexType name="enumType">
  173. <annotation>
  174. <documentation>enumType</documentation>
  175. </annotation>
  176. <choice maxOccurs="unbounded">
  177. <element ref="rng:value" />
  178. <group ref="rng:docGroup" />
  179. <group ref="rng:topGroup" />
  180. </choice>
  181. <attribute name="name" type="NMTOKEN" use="required" />
  182. <attribute name="inline" type="boolean" use="optional" />
  183. <attribute name="bare" type="boolean" use="optional" />
  184. <attribute name="prefix" type="NMTOKENS" use="optional" />
  185. </complexType>
  186. <complexType name="valueType">
  187. <annotation>
  188. <documentation>valueType</documentation>
  189. </annotation>
  190. <choice minOccurs="0" maxOccurs="unbounded">
  191. <group ref="rng:docGroup" />
  192. <group ref="rng:topGroup" />
  193. </choice>
  194. <attribute name="name" type="NMTOKEN" use="required" />
  195. <attribute name="value" type="string" use="optional" />
  196. <attribute name="varset" type="NMTOKEN" use="optional" />
  197. <attribute name="variants" type="string" use="optional" />
  198. </complexType>
  199. <complexType name="refType">
  200. <annotation>
  201. <documentation>refType</documentation>
  202. </annotation>
  203. <attribute name="ref" type="NMTOKEN" use="required" />
  204. </complexType>
  205. <!-- Documentation element types -->
  206. <complexType name="briefType">
  207. <annotation>
  208. <documentation>
  209. brief documentation, no markup
  210. </documentation>
  211. </annotation>
  212. <simpleContent>
  213. <extension base="string" />
  214. </simpleContent>
  215. </complexType>
  216. <complexType name="docType" mixed="true">
  217. <annotation>
  218. <documentation>
  219. root element of documentation sub-tree
  220. </documentation>
  221. </annotation>
  222. <choice minOccurs="0" maxOccurs="unbounded">
  223. <group ref="rng:textformatGroup" />
  224. <group ref="rng:listGroup" />
  225. <element ref="rng:code" />
  226. </choice>
  227. </complexType>
  228. <complexType name="textformatType" mixed="true">
  229. <annotation>
  230. <documentation>
  231. for bold, underline, italics
  232. </documentation>
  233. </annotation>
  234. <choice minOccurs="0" maxOccurs="unbounded">
  235. <group ref="rng:textformatGroup" />
  236. </choice>
  237. </complexType>
  238. <complexType name="textcodeType">
  239. <simpleContent>
  240. <extension base="string">
  241. <attribute name="title" type="string" />
  242. </extension>
  243. </simpleContent>
  244. </complexType>
  245. <complexType name="listType">
  246. <annotation>
  247. <documentation>
  248. definition of a list, ordered or unordered
  249. </documentation>
  250. </annotation>
  251. <choice minOccurs="0" maxOccurs="unbounded">
  252. <element ref="rng:li" />
  253. </choice>
  254. </complexType>
  255. <complexType name="listitemType" mixed="true">
  256. <annotation>
  257. <documentation>
  258. items of a list
  259. </documentation>
  260. </annotation>
  261. <choice minOccurs="0" maxOccurs="unbounded">
  262. <group ref="rng:textformatGroup" />
  263. <group ref="rng:listGroup" />
  264. <element ref="rng:code" />
  265. </choice>
  266. </complexType>
  267. <!-- Attribute value types -->
  268. <simpleType name="Hexadecimal">
  269. <restriction base="string">
  270. <pattern value="0x[0-9a-f]+" />
  271. <pattern value="0x[0-9A-F]+" />
  272. <pattern value="[0-9]" />
  273. </restriction>
  274. </simpleType>
  275. <simpleType name="HexOrNumber">
  276. <annotation>
  277. <documentation>HexOrNumber</documentation>
  278. </annotation>
  279. <union memberTypes="rng:Hexadecimal nonNegativeInteger" />
  280. </simpleType>
  281. <simpleType name="Access">
  282. <annotation>
  283. <documentation>Access</documentation>
  284. </annotation>
  285. <restriction base="string">
  286. <enumeration value="r" />
  287. <enumeration value="w" />
  288. <enumeration value="rw" />
  289. </restriction>
  290. </simpleType>
  291. <simpleType name="DomainWidth">
  292. <annotation>
  293. <documentation>DomainWidth</documentation>
  294. </annotation>
  295. <restriction base="string">
  296. <enumeration value="8" />
  297. <enumeration value="16" />
  298. <enumeration value="32" />
  299. <enumeration value="64" />
  300. </restriction>
  301. </simpleType>
  302. <!-- Element groups -->
  303. <group name="topGroup">
  304. <choice>
  305. <element ref="rng:domain" />
  306. <element ref="rng:enum" />
  307. <element ref="rng:group" />
  308. <element ref="rng:bitset" />
  309. <element ref="rng:import" />
  310. </choice>
  311. </group>
  312. <group name="regarrayGroup">
  313. <choice>
  314. <element ref="rng:reg64" />
  315. <element ref="rng:reg32" />
  316. <element ref="rng:reg16" />
  317. <element ref="rng:reg8" />
  318. <element ref="rng:array" />
  319. <element ref="rng:stripe" />
  320. <element ref="rng:use-group" />
  321. </choice>
  322. </group>
  323. <group name="docGroup">
  324. <choice>
  325. <element ref="rng:brief" />
  326. <element ref="rng:doc" />
  327. </choice>
  328. </group>
  329. <group name="textformatGroup">
  330. <choice>
  331. <element ref="rng:b" />
  332. <element ref="rng:i" />
  333. <element ref="rng:u" />
  334. </choice>
  335. </group>
  336. <group name="listGroup">
  337. <choice>
  338. <element ref="rng:ul" />
  339. <element ref="rng:ol" />
  340. </choice>
  341. </group>
  342. </schema>