xcb.xsd revision 891601f5
1d4401354Smrg<?xml version="1.0" encoding="utf-8"?> 2d4401354Smrg<!-- 3d4401354SmrgCopyright (C) 2004 Josh Triplett. All Rights Reserved. 4d4401354Smrg 5d4401354SmrgPermission is hereby granted, free of charge, to any person obtaining a copy 6d4401354Smrgof this software and associated documentation files (the "Software"), to deal 7d4401354Smrgin the Software without restriction, including without limitation the rights 8d4401354Smrgto use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9d4401354Smrgcopies of the Software, and to permit persons to whom the Software is 10d4401354Smrgfurnished to do so, subject to the following conditions: 11d4401354Smrg 12d4401354SmrgThe above copyright notice and this permission notice shall be included in all 13d4401354Smrgcopies or substantial portions of the Software. 14d4401354Smrg 15d4401354SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16d4401354SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17d4401354SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18d4401354SmrgAUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19d4401354SmrgACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20d4401354SmrgWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21d4401354Smrg 22d4401354SmrgExcept as contained in this notice, the names of the authors or their 23d4401354Smrginstitutions shall not be used in advertising or otherwise to promote the 24d4401354Smrgsale, use or other dealings in this Software without prior written 25d4401354Smrgauthorization from the authors. 26d4401354Smrg--> 27d4401354Smrg<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 28d4401354Smrg 29d4401354Smrg <!-- The root element --> 30d4401354Smrg <xsd:element name="xcb"> 31d4401354Smrg <xsd:complexType> 32d4401354Smrg <xsd:group ref="macro" minOccurs="0" maxOccurs="unbounded" /> 33d4401354Smrg <xsd:attribute name="header" type="xsd:string" use="required" /> 34d4401354Smrg <xsd:attribute name="extension-xname" type="xsd:string" use="optional" /> 35d4401354Smrg <xsd:attribute name="extension-name" type="xsd:string" use="optional" /> 36d4401354Smrg <xsd:attribute name="extension-multiword" type="xsd:boolean" use="optional" default="false" /> 37d4401354Smrg <xsd:attribute name="major-version" type="xsd:integer" use="optional" /> 38d4401354Smrg <xsd:attribute name="minor-version" type="xsd:integer" use="optional" /> 39d4401354Smrg </xsd:complexType> 40d4401354Smrg </xsd:element> 41d4401354Smrg 42d4401354Smrg <!-- Padding --> 43d4401354Smrg <xsd:element name="pad"> 44d4401354Smrg <xsd:complexType> 45b26960f7Smrg <xsd:attribute name="bytes" type="xsd:integer" use="optional" /> 46b26960f7Smrg <xsd:attribute name="align" type="xsd:integer" use="optional" /> 47d4401354Smrg </xsd:complexType> 48d4401354Smrg </xsd:element> 49d4401354Smrg 50d4401354Smrg <!-- Type for fields or parameters with attributes "name" and "type" --> 51d4401354Smrg <xsd:complexType name="var"> 52d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 53d4401354Smrg <xsd:attribute name="type" type="xsd:string" use="required" /> 54d4401354Smrg <xsd:attribute name="enum" type="xsd:string" use="optional" /> 55d4401354Smrg <xsd:attribute name="altenum" type="xsd:string" use="optional" /> 56d4401354Smrg <xsd:attribute name="mask" type="xsd:string" use="optional" /> 57891601f5Smrg <xsd:attribute name="altmask" type="xsd:string" use="optional" /> 58d4401354Smrg </xsd:complexType> 59d4401354Smrg 60986c8b3dSmrg <!-- case expression --> 61986c8b3dSmrg <xsd:complexType name="caseexpr"> 62986c8b3dSmrg <xsd:sequence> 63986c8b3dSmrg <!-- case expression: --> 64f591e195Smrg <xsd:group ref="expression" minOccurs="1" maxOccurs="unbounded" /> 65986c8b3dSmrg <!-- match --> 66986c8b3dSmrg <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" /> 67986c8b3dSmrg <xsd:choice> 68986c8b3dSmrg <xsd:element ref="switch" minOccurs="0" maxOccurs="unbounded" /> 69986c8b3dSmrg </xsd:choice> 70986c8b3dSmrg </xsd:sequence> 71986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" use="optional" /> 72986c8b3dSmrg </xsd:complexType> 73986c8b3dSmrg 74986c8b3dSmrg <!-- switch expression --> 75986c8b3dSmrg <xsd:complexType name="switchexpr"> 76986c8b3dSmrg <xsd:sequence> 77986c8b3dSmrg <!-- switch(expression) --> 78986c8b3dSmrg <xsd:group ref="expression" minOccurs="1" maxOccurs="1" /> 79986c8b3dSmrg <xsd:choice> 80986c8b3dSmrg <!-- bitcase expression - bit test --> 81891601f5Smrg <xsd:element name="bitcase" type="caseexpr" minOccurs="0" maxOccurs="unbounded" /> 82891601f5Smrg <!-- case expression - value test --> 83891601f5Smrg <xsd:element name="case" type="caseexpr" minOccurs="0" maxOccurs="unbounded" /> 84986c8b3dSmrg </xsd:choice> 85986c8b3dSmrg <!-- default: --> 86986c8b3dSmrg <xsd:group ref="fields" minOccurs="0" maxOccurs="1" /> 87986c8b3dSmrg </xsd:sequence> 88986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" use="required" /> 89986c8b3dSmrg </xsd:complexType> 90986c8b3dSmrg 91986c8b3dSmrg <xsd:element name="switch" type="switchexpr" /> 92986c8b3dSmrg 93d4401354Smrg <!-- field replaces FIELD, PARAM, and REPLY. --> 94d4401354Smrg <xsd:element name="field" type="var" /> 95d4401354Smrg 96f591e195Smrg <!-- fd passing parameter --> 97b26960f7Smrg <xsd:element name="fd"> 98b26960f7Smrg <xsd:complexType> 99b26960f7Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 100b26960f7Smrg </xsd:complexType> 101b26960f7Smrg </xsd:element> 102f591e195Smrg 103d4401354Smrg <!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY. The name and type 104d4401354Smrg are specified as attributes. The content is an expression giving the 105d4401354Smrg length. --> 106d4401354Smrg <xsd:element name="list"> 107d4401354Smrg <xsd:complexType> 108d4401354Smrg <xsd:complexContent> 109d4401354Smrg <xsd:extension base="var"> 110d4401354Smrg <xsd:group ref="expression" minOccurs="0" maxOccurs="1" /> 111d4401354Smrg </xsd:extension> 112d4401354Smrg </xsd:complexContent> 113d4401354Smrg </xsd:complexType> 114d4401354Smrg </xsd:element> 115d4401354Smrg 116d4401354Smrg <!-- Expressions --> 117d4401354Smrg <xsd:group name="expression"> 118d4401354Smrg <xsd:choice> 119d4401354Smrg <xsd:element name="op"> 120d4401354Smrg <xsd:complexType> 121d4401354Smrg <xsd:sequence> 122d4401354Smrg <xsd:group ref="expression" /> 123d4401354Smrg <xsd:group ref="expression" /> 124d4401354Smrg </xsd:sequence> 125d4401354Smrg <xsd:attribute name="op" use="required"> 126d4401354Smrg <xsd:simpleType> 127d4401354Smrg <xsd:restriction base="xsd:string"> 128d4401354Smrg <xsd:pattern value="\+|-|\*|/|&|<<" /> 129d4401354Smrg </xsd:restriction> 130d4401354Smrg </xsd:simpleType> 131d4401354Smrg </xsd:attribute> 132d4401354Smrg </xsd:complexType> 133d4401354Smrg </xsd:element> 134986c8b3dSmrg <xsd:element name="unop"> 135986c8b3dSmrg <xsd:complexType> 136986c8b3dSmrg <xsd:sequence> 137986c8b3dSmrg <xsd:group ref="expression" /> 138986c8b3dSmrg </xsd:sequence> 139986c8b3dSmrg <xsd:attribute name="op" use="required"> 140986c8b3dSmrg <xsd:simpleType> 141986c8b3dSmrg <xsd:restriction base="xsd:string"> 142986c8b3dSmrg <xsd:pattern value="~" /> 143986c8b3dSmrg </xsd:restriction> 144986c8b3dSmrg </xsd:simpleType> 145986c8b3dSmrg </xsd:attribute> 146986c8b3dSmrg </xsd:complexType> 147986c8b3dSmrg </xsd:element> 148d4401354Smrg <xsd:element name="fieldref" type="xsd:string" /> 149891601f5Smrg <xsd:element name="paramref"> 150891601f5Smrg <xsd:complexType> 151891601f5Smrg <xsd:simpleContent> 152891601f5Smrg <xsd:extension base="xsd:string"> 153891601f5Smrg <xsd:attribute name="type" use="required" type="xsd:string" /> 154891601f5Smrg </xsd:extension> 155891601f5Smrg </xsd:simpleContent> 156891601f5Smrg </xsd:complexType> 157891601f5Smrg </xsd:element> 158986c8b3dSmrg <xsd:element name="enumref"> 159986c8b3dSmrg <xsd:complexType> 160986c8b3dSmrg <xsd:simpleContent> 161986c8b3dSmrg <xsd:extension base="xsd:string"> 162986c8b3dSmrg <xsd:attribute name="ref" use="required" type="xsd:string" /> 163986c8b3dSmrg </xsd:extension> 164986c8b3dSmrg </xsd:simpleContent> 165986c8b3dSmrg </xsd:complexType> 166986c8b3dSmrg </xsd:element> 167986c8b3dSmrg <xsd:element name="popcount"> 168986c8b3dSmrg <xsd:complexType> 169986c8b3dSmrg <xsd:group ref="expression" /> 170986c8b3dSmrg </xsd:complexType> 171986c8b3dSmrg </xsd:element> 172986c8b3dSmrg <xsd:element name="sumof"> 173986c8b3dSmrg <xsd:complexType> 174891601f5Smrg <xsd:sequence> 175891601f5Smrg <xsd:group ref="expression" minOccurs="0" maxOccurs="1"/> 176891601f5Smrg </xsd:sequence> 177986c8b3dSmrg <xsd:attribute name="ref" use="required" type="xsd:string" /> 178986c8b3dSmrg </xsd:complexType> 179986c8b3dSmrg </xsd:element> 180891601f5Smrg <xsd:element name="listelement-ref" /> 181b26960f7Smrg <xsd:element name="value" type="xsd:integer" /> 182b26960f7Smrg <xsd:element name="bit" type="bitType" /> 183d4401354Smrg </xsd:choice> 184d4401354Smrg </xsd:group> 185d4401354Smrg 186d4401354Smrg <!-- Fields in requests that are calculated from other information, not 187d4401354Smrg supplied by the caller. --> 188d4401354Smrg <xsd:element name="exprfield" > 189d4401354Smrg <xsd:complexType> 190d4401354Smrg <xsd:complexContent> 191d4401354Smrg <xsd:extension base="var"> 192d4401354Smrg <xsd:group ref="expression" /> 193d4401354Smrg </xsd:extension> 194d4401354Smrg </xsd:complexContent> 195d4401354Smrg </xsd:complexType> 196d4401354Smrg </xsd:element> 197d4401354Smrg 198d4401354Smrg <xsd:group name="fields"> 199d4401354Smrg <xsd:choice> 200d4401354Smrg <xsd:element ref="pad" /> 201d4401354Smrg <xsd:element ref="field" /> 202d4401354Smrg <xsd:element ref="list" /> 203f591e195Smrg <xsd:element ref="fd" /> 204d4401354Smrg </xsd:choice> 205d4401354Smrg </xsd:group> 206d4401354Smrg 207d4401354Smrg <!-- Type for a structure --> 208d4401354Smrg <xsd:complexType name="struct"> 209986c8b3dSmrg <xsd:sequence> 210986c8b3dSmrg <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" /> 211986c8b3dSmrg <xsd:choice minOccurs="0" maxOccurs="1"> 212986c8b3dSmrg <xsd:element ref="switch" /> 213986c8b3dSmrg </xsd:choice> 214986c8b3dSmrg </xsd:sequence> 215d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 216d4401354Smrg </xsd:complexType> 217d4401354Smrg 218d4401354Smrg <!-- Type for a packet structure --> 219d4401354Smrg <xsd:complexType name="packet-struct"> 220986c8b3dSmrg <xsd:sequence> 221986c8b3dSmrg <xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" /> 222986c8b3dSmrg </xsd:sequence> 223d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 224d4401354Smrg <xsd:attribute name="number" type="xsd:integer" use="required" /> 225d4401354Smrg </xsd:complexType> 226d4401354Smrg 227d4401354Smrg <!-- Type for a packet structure copy --> 228d4401354Smrg <xsd:complexType name="packet-struct-copy"> 229d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 230d4401354Smrg <xsd:attribute name="number" type="xsd:integer" use="required" /> 231d4401354Smrg <xsd:attribute name="ref" type="xsd:string" use="required" /> 232d4401354Smrg </xsd:complexType> 233d4401354Smrg 234b26960f7Smrg <!-- Type for bit values --> 235b26960f7Smrg <xsd:simpleType name="bitType"> 236b26960f7Smrg <xsd:restriction base="xsd:integer"> 237b26960f7Smrg <xsd:minInclusive value="0" /> 238b26960f7Smrg <xsd:maxExclusive value="32" /> 239d4401354Smrg </xsd:restriction> 240d4401354Smrg </xsd:simpleType> 241d4401354Smrg 242986c8b3dSmrg <!-- Type for documentation --> 243986c8b3dSmrg <xsd:group name="doc-fields"> 244986c8b3dSmrg <xsd:sequence> 245986c8b3dSmrg <xsd:element name="field"> 246986c8b3dSmrg <xsd:complexType> 247986c8b3dSmrg <xsd:simpleContent> 248986c8b3dSmrg <xsd:extension base="xsd:string"> 249986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" /> 250986c8b3dSmrg </xsd:extension> 251986c8b3dSmrg </xsd:simpleContent> 252986c8b3dSmrg </xsd:complexType> 253986c8b3dSmrg </xsd:element> 254986c8b3dSmrg </xsd:sequence> 255986c8b3dSmrg </xsd:group> 256986c8b3dSmrg 257986c8b3dSmrg <xsd:group name="error-fields"> 258986c8b3dSmrg <xsd:sequence> 259986c8b3dSmrg <xsd:element name="error"> 260986c8b3dSmrg <xsd:complexType> 261986c8b3dSmrg <xsd:simpleContent> 262986c8b3dSmrg <xsd:extension base="xsd:string"> 263986c8b3dSmrg <xsd:attribute name="type" type="xsd:string" /> 264986c8b3dSmrg </xsd:extension> 265986c8b3dSmrg </xsd:simpleContent> 266986c8b3dSmrg </xsd:complexType> 267986c8b3dSmrg </xsd:element> 268986c8b3dSmrg </xsd:sequence> 269986c8b3dSmrg </xsd:group> 270986c8b3dSmrg 271986c8b3dSmrg <xsd:group name="see-fields"> 272986c8b3dSmrg <xsd:sequence> 273986c8b3dSmrg <xsd:element name="see"> 274986c8b3dSmrg <xsd:complexType> 275986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" /> 276986c8b3dSmrg <xsd:attribute name="type" type="xsd:string" /> 277986c8b3dSmrg </xsd:complexType> 278986c8b3dSmrg </xsd:element> 279986c8b3dSmrg </xsd:sequence> 280986c8b3dSmrg </xsd:group> 281986c8b3dSmrg 282986c8b3dSmrg <xsd:element name="doc"> 283986c8b3dSmrg <xsd:complexType mixed="true"> 284986c8b3dSmrg <xsd:sequence> 285986c8b3dSmrg <xsd:element name="brief" type="xsd:string" minOccurs="0" maxOccurs="1" /> 286986c8b3dSmrg <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" /> 287986c8b3dSmrg <xsd:element name="example" type="xsd:string" minOccurs="0" maxOccurs="1" /> 288986c8b3dSmrg <xsd:group ref="doc-fields" minOccurs="0" maxOccurs="unbounded" /> 289986c8b3dSmrg <xsd:group ref="error-fields" minOccurs="0" maxOccurs="unbounded" /> 290986c8b3dSmrg <xsd:group ref="see-fields" minOccurs="0" maxOccurs="unbounded" /> 291986c8b3dSmrg </xsd:sequence> 292986c8b3dSmrg </xsd:complexType> 293986c8b3dSmrg </xsd:element> 294986c8b3dSmrg 295d4401354Smrg <xsd:group name="macro"> 296d4401354Smrg <xsd:choice> 297d4401354Smrg <xsd:element name="request"> 298d4401354Smrg <xsd:complexType> 299d4401354Smrg <xsd:sequence> 300d4401354Smrg <xsd:choice minOccurs="0" maxOccurs="unbounded"> 301d4401354Smrg <xsd:group ref="fields" /> 302d4401354Smrg <xsd:element ref="exprfield" /> 303d4401354Smrg </xsd:choice> 304986c8b3dSmrg <xsd:choice minOccurs="0" maxOccurs="1"> 305986c8b3dSmrg <xsd:element ref="switch" /> 306986c8b3dSmrg </xsd:choice> 307d4401354Smrg <xsd:element name="reply" minOccurs="0" maxOccurs="1"> 308d4401354Smrg <xsd:complexType> 309986c8b3dSmrg <xsd:sequence> 310986c8b3dSmrg <xsd:choice minOccurs="1" maxOccurs="unbounded"> 311986c8b3dSmrg <xsd:group ref="fields" /> 312986c8b3dSmrg </xsd:choice> 313986c8b3dSmrg <xsd:choice minOccurs="0" maxOccurs="1"> 314986c8b3dSmrg <xsd:element ref="switch" /> 315986c8b3dSmrg </xsd:choice> 316986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 317986c8b3dSmrg </xsd:sequence> 318d4401354Smrg </xsd:complexType> 319d4401354Smrg </xsd:element> 320986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 321d4401354Smrg </xsd:sequence> 322d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 323d4401354Smrg <xsd:attribute name="opcode" type="xsd:integer" use="required" /> 324d4401354Smrg <xsd:attribute name="combine-adjacent" type="xsd:boolean" 325b26960f7Smrg use="optional" default="false" /> 326d4401354Smrg </xsd:complexType> 327d4401354Smrg </xsd:element> 328d4401354Smrg <xsd:element name="event"> 329d4401354Smrg <xsd:complexType> 330d4401354Smrg <xsd:complexContent> 331d4401354Smrg <xsd:extension base="packet-struct"> 332986c8b3dSmrg <xsd:sequence> 333986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 334986c8b3dSmrg </xsd:sequence> 335d4401354Smrg <xsd:attribute name="no-sequence-number" type="xsd:boolean" 336b26960f7Smrg use="optional" default="false" /> 337b26960f7Smrg <xsd:attribute name="xge" type="xsd:boolean" 338b26960f7Smrg use="optional" default="false" /> 339d4401354Smrg </xsd:extension> 340d4401354Smrg </xsd:complexContent> 341d4401354Smrg </xsd:complexType> 342d4401354Smrg </xsd:element> 343d4401354Smrg <xsd:element name="eventcopy" type="packet-struct-copy" /> 344d4401354Smrg <xsd:element name="error" type="packet-struct" /> 345d4401354Smrg <xsd:element name="errorcopy" type="packet-struct-copy" /> 346d4401354Smrg <xsd:element name="struct" type="struct" /> 347d4401354Smrg <xsd:element name="union" type="struct" /> 348d4401354Smrg <xsd:element name="xidtype"> 349d4401354Smrg <xsd:complexType> 350d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 351d4401354Smrg </xsd:complexType> 352d4401354Smrg </xsd:element> 353d4401354Smrg <xsd:element name="xidunion"> 354d4401354Smrg <xsd:complexType> 355d4401354Smrg <xsd:sequence> 356d4401354Smrg <xsd:element name="type" type="xsd:string" 357d4401354Smrg minOccurs="1" maxOccurs="unbounded" /> 358d4401354Smrg </xsd:sequence> 359d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 360d4401354Smrg </xsd:complexType> 361d4401354Smrg </xsd:element> 362d4401354Smrg <xsd:element name="enum"> 363d4401354Smrg <xsd:complexType> 364d4401354Smrg <xsd:sequence minOccurs="1" maxOccurs="unbounded"> 365d4401354Smrg <xsd:element name="item"> 366d4401354Smrg <xsd:complexType> 367f591e195Smrg <xsd:choice minOccurs="1" maxOccurs="1"> 368b26960f7Smrg <xsd:element name="value" type="xsd:unsignedInt" /> 369b26960f7Smrg <xsd:element name="bit" type="bitType" /> 370f591e195Smrg </xsd:choice> 371d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 372d4401354Smrg </xsd:complexType> 373d4401354Smrg </xsd:element> 374986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 375d4401354Smrg </xsd:sequence> 376d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 377d4401354Smrg </xsd:complexType> 378d4401354Smrg </xsd:element> 379d4401354Smrg <xsd:element name="typedef"> 380d4401354Smrg <xsd:complexType> 381d4401354Smrg <xsd:attribute name="oldname" type="xsd:string" use="required" /> 382d4401354Smrg <xsd:attribute name="newname" type="xsd:string" use="required" /> 383d4401354Smrg </xsd:complexType> 384d4401354Smrg </xsd:element> 385d4401354Smrg <!-- The import element allows a protocol description to reference the 386d4401354Smrg declarations of another protocol description. --> 387d4401354Smrg <xsd:element name="import" type="xsd:string" /> 388d4401354Smrg </xsd:choice> 389d4401354Smrg </xsd:group> 390d4401354Smrg</xsd:schema> 391