xcb.xsd revision b26960f7
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" /> 57d4401354Smrg </xsd:complexType> 58d4401354Smrg 59986c8b3dSmrg <!-- case expression --> 60986c8b3dSmrg <xsd:complexType name="caseexpr"> 61986c8b3dSmrg <xsd:sequence> 62986c8b3dSmrg <!-- case expression: --> 63f591e195Smrg <xsd:group ref="expression" minOccurs="1" maxOccurs="unbounded" /> 64986c8b3dSmrg <!-- match --> 65986c8b3dSmrg <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" /> 66986c8b3dSmrg <xsd:choice> 67986c8b3dSmrg <xsd:element ref="switch" minOccurs="0" maxOccurs="unbounded" /> 68986c8b3dSmrg </xsd:choice> 69986c8b3dSmrg </xsd:sequence> 70986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" use="optional" /> 71986c8b3dSmrg </xsd:complexType> 72986c8b3dSmrg 73986c8b3dSmrg <!-- switch expression --> 74986c8b3dSmrg <xsd:complexType name="switchexpr"> 75986c8b3dSmrg <xsd:sequence> 76986c8b3dSmrg <!-- switch(expression) --> 77986c8b3dSmrg <xsd:group ref="expression" minOccurs="1" maxOccurs="1" /> 78986c8b3dSmrg <xsd:choice> 79986c8b3dSmrg <!-- bitcase expression - bit test --> 80986c8b3dSmrg <xsd:element name="bitcase" type="caseexpr" minOccurs="1" maxOccurs="unbounded" /> 81986c8b3dSmrg </xsd:choice> 82986c8b3dSmrg <!-- default: --> 83986c8b3dSmrg <xsd:group ref="fields" minOccurs="0" maxOccurs="1" /> 84986c8b3dSmrg </xsd:sequence> 85986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" use="required" /> 86986c8b3dSmrg </xsd:complexType> 87986c8b3dSmrg 88986c8b3dSmrg <xsd:element name="switch" type="switchexpr" /> 89986c8b3dSmrg 90d4401354Smrg <!-- field replaces FIELD, PARAM, and REPLY. --> 91d4401354Smrg <xsd:element name="field" type="var" /> 92d4401354Smrg 93f591e195Smrg <!-- fd passing parameter --> 94b26960f7Smrg <xsd:element name="fd"> 95b26960f7Smrg <xsd:complexType> 96b26960f7Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 97b26960f7Smrg </xsd:complexType> 98b26960f7Smrg </xsd:element> 99f591e195Smrg 100d4401354Smrg <!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY. The name and type 101d4401354Smrg are specified as attributes. The content is an expression giving the 102d4401354Smrg length. --> 103d4401354Smrg <xsd:element name="list"> 104d4401354Smrg <xsd:complexType> 105d4401354Smrg <xsd:complexContent> 106d4401354Smrg <xsd:extension base="var"> 107d4401354Smrg <xsd:group ref="expression" minOccurs="0" maxOccurs="1" /> 108d4401354Smrg </xsd:extension> 109d4401354Smrg </xsd:complexContent> 110d4401354Smrg </xsd:complexType> 111d4401354Smrg </xsd:element> 112d4401354Smrg 113d4401354Smrg <!-- Expressions --> 114d4401354Smrg <xsd:group name="expression"> 115d4401354Smrg <xsd:choice> 116d4401354Smrg <xsd:element name="op"> 117d4401354Smrg <xsd:complexType> 118d4401354Smrg <xsd:sequence> 119d4401354Smrg <xsd:group ref="expression" /> 120d4401354Smrg <xsd:group ref="expression" /> 121d4401354Smrg </xsd:sequence> 122d4401354Smrg <xsd:attribute name="op" use="required"> 123d4401354Smrg <xsd:simpleType> 124d4401354Smrg <xsd:restriction base="xsd:string"> 125d4401354Smrg <xsd:pattern value="\+|-|\*|/|&|<<" /> 126d4401354Smrg </xsd:restriction> 127d4401354Smrg </xsd:simpleType> 128d4401354Smrg </xsd:attribute> 129d4401354Smrg </xsd:complexType> 130d4401354Smrg </xsd:element> 131986c8b3dSmrg <xsd:element name="unop"> 132986c8b3dSmrg <xsd:complexType> 133986c8b3dSmrg <xsd:sequence> 134986c8b3dSmrg <xsd:group ref="expression" /> 135986c8b3dSmrg </xsd:sequence> 136986c8b3dSmrg <xsd:attribute name="op" use="required"> 137986c8b3dSmrg <xsd:simpleType> 138986c8b3dSmrg <xsd:restriction base="xsd:string"> 139986c8b3dSmrg <xsd:pattern value="~" /> 140986c8b3dSmrg </xsd:restriction> 141986c8b3dSmrg </xsd:simpleType> 142986c8b3dSmrg </xsd:attribute> 143986c8b3dSmrg </xsd:complexType> 144986c8b3dSmrg </xsd:element> 145d4401354Smrg <xsd:element name="fieldref" type="xsd:string" /> 146986c8b3dSmrg <xsd:element name="enumref"> 147986c8b3dSmrg <xsd:complexType> 148986c8b3dSmrg <xsd:simpleContent> 149986c8b3dSmrg <xsd:extension base="xsd:string"> 150986c8b3dSmrg <xsd:attribute name="ref" use="required" type="xsd:string" /> 151986c8b3dSmrg </xsd:extension> 152986c8b3dSmrg </xsd:simpleContent> 153986c8b3dSmrg </xsd:complexType> 154986c8b3dSmrg </xsd:element> 155986c8b3dSmrg <xsd:element name="popcount"> 156986c8b3dSmrg <xsd:complexType> 157986c8b3dSmrg <xsd:group ref="expression" /> 158986c8b3dSmrg </xsd:complexType> 159986c8b3dSmrg </xsd:element> 160986c8b3dSmrg <xsd:element name="sumof"> 161986c8b3dSmrg <xsd:complexType> 162986c8b3dSmrg <xsd:attribute name="ref" use="required" type="xsd:string" /> 163986c8b3dSmrg </xsd:complexType> 164986c8b3dSmrg </xsd:element> 165b26960f7Smrg <xsd:element name="value" type="xsd:integer" /> 166b26960f7Smrg <xsd:element name="bit" type="bitType" /> 167d4401354Smrg </xsd:choice> 168d4401354Smrg </xsd:group> 169d4401354Smrg 170d4401354Smrg <!-- Fields in requests that are calculated from other information, not 171d4401354Smrg supplied by the caller. --> 172d4401354Smrg <xsd:element name="exprfield" > 173d4401354Smrg <xsd:complexType> 174d4401354Smrg <xsd:complexContent> 175d4401354Smrg <xsd:extension base="var"> 176d4401354Smrg <xsd:group ref="expression" /> 177d4401354Smrg </xsd:extension> 178d4401354Smrg </xsd:complexContent> 179d4401354Smrg </xsd:complexType> 180d4401354Smrg </xsd:element> 181d4401354Smrg 182d4401354Smrg <!-- BITMASK/LISTofVALUE parameter pairs. --> 183d4401354Smrg <xsd:element name="valueparam"> 184d4401354Smrg <xsd:complexType> 185d4401354Smrg <xsd:attribute name="value-mask-type" type="xsd:string" use="required" /> 186d4401354Smrg <xsd:attribute name="value-mask-name" type="xsd:string" use="required" /> 187d4401354Smrg <xsd:attribute name="value-list-name" type="xsd:string" use="required" /> 188d4401354Smrg </xsd:complexType> 189d4401354Smrg </xsd:element> 190d4401354Smrg 191d4401354Smrg <xsd:group name="fields"> 192d4401354Smrg <xsd:choice> 193d4401354Smrg <xsd:element ref="pad" /> 194d4401354Smrg <xsd:element ref="field" /> 195d4401354Smrg <xsd:element ref="list" /> 196f591e195Smrg <xsd:element ref="fd" /> 197d4401354Smrg </xsd:choice> 198d4401354Smrg </xsd:group> 199d4401354Smrg 200d4401354Smrg <!-- Type for a structure --> 201d4401354Smrg <xsd:complexType name="struct"> 202986c8b3dSmrg <xsd:sequence> 203986c8b3dSmrg <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" /> 204986c8b3dSmrg <xsd:choice minOccurs="0" maxOccurs="1"> 205986c8b3dSmrg <xsd:element ref="switch" /> 206986c8b3dSmrg </xsd:choice> 207986c8b3dSmrg </xsd:sequence> 208d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 209d4401354Smrg </xsd:complexType> 210d4401354Smrg 211d4401354Smrg <!-- Type for a packet structure --> 212d4401354Smrg <xsd:complexType name="packet-struct"> 213986c8b3dSmrg <xsd:sequence> 214986c8b3dSmrg <xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" /> 215986c8b3dSmrg </xsd:sequence> 216d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 217d4401354Smrg <xsd:attribute name="number" type="xsd:integer" use="required" /> 218d4401354Smrg </xsd:complexType> 219d4401354Smrg 220d4401354Smrg <!-- Type for a packet structure copy --> 221d4401354Smrg <xsd:complexType name="packet-struct-copy"> 222d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 223d4401354Smrg <xsd:attribute name="number" type="xsd:integer" use="required" /> 224d4401354Smrg <xsd:attribute name="ref" type="xsd:string" use="required" /> 225d4401354Smrg </xsd:complexType> 226d4401354Smrg 227b26960f7Smrg <!-- Type for bit values --> 228b26960f7Smrg <xsd:simpleType name="bitType"> 229b26960f7Smrg <xsd:restriction base="xsd:integer"> 230b26960f7Smrg <xsd:minInclusive value="0" /> 231b26960f7Smrg <xsd:maxExclusive value="32" /> 232d4401354Smrg </xsd:restriction> 233d4401354Smrg </xsd:simpleType> 234d4401354Smrg 235986c8b3dSmrg <!-- Type for documentation --> 236986c8b3dSmrg <xsd:group name="doc-fields"> 237986c8b3dSmrg <xsd:sequence> 238986c8b3dSmrg <xsd:element name="field"> 239986c8b3dSmrg <xsd:complexType> 240986c8b3dSmrg <xsd:simpleContent> 241986c8b3dSmrg <xsd:extension base="xsd:string"> 242986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" /> 243986c8b3dSmrg </xsd:extension> 244986c8b3dSmrg </xsd:simpleContent> 245986c8b3dSmrg </xsd:complexType> 246986c8b3dSmrg </xsd:element> 247986c8b3dSmrg </xsd:sequence> 248986c8b3dSmrg </xsd:group> 249986c8b3dSmrg 250986c8b3dSmrg <xsd:group name="error-fields"> 251986c8b3dSmrg <xsd:sequence> 252986c8b3dSmrg <xsd:element name="error"> 253986c8b3dSmrg <xsd:complexType> 254986c8b3dSmrg <xsd:simpleContent> 255986c8b3dSmrg <xsd:extension base="xsd:string"> 256986c8b3dSmrg <xsd:attribute name="type" type="xsd:string" /> 257986c8b3dSmrg </xsd:extension> 258986c8b3dSmrg </xsd:simpleContent> 259986c8b3dSmrg </xsd:complexType> 260986c8b3dSmrg </xsd:element> 261986c8b3dSmrg </xsd:sequence> 262986c8b3dSmrg </xsd:group> 263986c8b3dSmrg 264986c8b3dSmrg <xsd:group name="see-fields"> 265986c8b3dSmrg <xsd:sequence> 266986c8b3dSmrg <xsd:element name="see"> 267986c8b3dSmrg <xsd:complexType> 268986c8b3dSmrg <xsd:attribute name="name" type="xsd:string" /> 269986c8b3dSmrg <xsd:attribute name="type" type="xsd:string" /> 270986c8b3dSmrg </xsd:complexType> 271986c8b3dSmrg </xsd:element> 272986c8b3dSmrg </xsd:sequence> 273986c8b3dSmrg </xsd:group> 274986c8b3dSmrg 275986c8b3dSmrg <xsd:element name="doc"> 276986c8b3dSmrg <xsd:complexType mixed="true"> 277986c8b3dSmrg <xsd:sequence> 278986c8b3dSmrg <xsd:element name="brief" type="xsd:string" minOccurs="0" maxOccurs="1" /> 279986c8b3dSmrg <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" /> 280986c8b3dSmrg <xsd:element name="example" type="xsd:string" minOccurs="0" maxOccurs="1" /> 281986c8b3dSmrg <xsd:group ref="doc-fields" minOccurs="0" maxOccurs="unbounded" /> 282986c8b3dSmrg <xsd:group ref="error-fields" minOccurs="0" maxOccurs="unbounded" /> 283986c8b3dSmrg <xsd:group ref="see-fields" minOccurs="0" maxOccurs="unbounded" /> 284986c8b3dSmrg </xsd:sequence> 285986c8b3dSmrg </xsd:complexType> 286986c8b3dSmrg </xsd:element> 287986c8b3dSmrg 288d4401354Smrg <xsd:group name="macro"> 289d4401354Smrg <xsd:choice> 290d4401354Smrg <xsd:element name="request"> 291d4401354Smrg <xsd:complexType> 292d4401354Smrg <xsd:sequence> 293d4401354Smrg <xsd:choice minOccurs="0" maxOccurs="unbounded"> 294d4401354Smrg <xsd:group ref="fields" /> 295d4401354Smrg <xsd:element ref="exprfield" /> 296d4401354Smrg <xsd:element ref="valueparam" /> 297d4401354Smrg </xsd:choice> 298986c8b3dSmrg <xsd:choice minOccurs="0" maxOccurs="1"> 299986c8b3dSmrg <xsd:element ref="switch" /> 300986c8b3dSmrg </xsd:choice> 301d4401354Smrg <xsd:element name="reply" minOccurs="0" maxOccurs="1"> 302d4401354Smrg <xsd:complexType> 303986c8b3dSmrg <xsd:sequence> 304986c8b3dSmrg <xsd:choice minOccurs="1" maxOccurs="unbounded"> 305986c8b3dSmrg <xsd:group ref="fields" /> 306986c8b3dSmrg <xsd:element ref="valueparam" /> 307986c8b3dSmrg </xsd:choice> 308986c8b3dSmrg <xsd:choice minOccurs="0" maxOccurs="1"> 309986c8b3dSmrg <xsd:element ref="switch" /> 310986c8b3dSmrg </xsd:choice> 311986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 312986c8b3dSmrg </xsd:sequence> 313d4401354Smrg </xsd:complexType> 314d4401354Smrg </xsd:element> 315986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 316d4401354Smrg </xsd:sequence> 317d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 318d4401354Smrg <xsd:attribute name="opcode" type="xsd:integer" use="required" /> 319d4401354Smrg <xsd:attribute name="combine-adjacent" type="xsd:boolean" 320b26960f7Smrg use="optional" default="false" /> 321d4401354Smrg </xsd:complexType> 322d4401354Smrg </xsd:element> 323d4401354Smrg <xsd:element name="event"> 324d4401354Smrg <xsd:complexType> 325d4401354Smrg <xsd:complexContent> 326d4401354Smrg <xsd:extension base="packet-struct"> 327986c8b3dSmrg <xsd:sequence> 328986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 329986c8b3dSmrg </xsd:sequence> 330d4401354Smrg <xsd:attribute name="no-sequence-number" type="xsd:boolean" 331b26960f7Smrg use="optional" default="false" /> 332b26960f7Smrg <xsd:attribute name="xge" type="xsd:boolean" 333b26960f7Smrg use="optional" default="false" /> 334d4401354Smrg </xsd:extension> 335d4401354Smrg </xsd:complexContent> 336d4401354Smrg </xsd:complexType> 337d4401354Smrg </xsd:element> 338d4401354Smrg <xsd:element name="eventcopy" type="packet-struct-copy" /> 339d4401354Smrg <xsd:element name="error" type="packet-struct" /> 340d4401354Smrg <xsd:element name="errorcopy" type="packet-struct-copy" /> 341d4401354Smrg <xsd:element name="struct" type="struct" /> 342d4401354Smrg <xsd:element name="union" type="struct" /> 343d4401354Smrg <xsd:element name="xidtype"> 344d4401354Smrg <xsd:complexType> 345d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 346d4401354Smrg </xsd:complexType> 347d4401354Smrg </xsd:element> 348d4401354Smrg <xsd:element name="xidunion"> 349d4401354Smrg <xsd:complexType> 350d4401354Smrg <xsd:sequence> 351d4401354Smrg <xsd:element name="type" type="xsd:string" 352d4401354Smrg minOccurs="1" maxOccurs="unbounded" /> 353d4401354Smrg </xsd:sequence> 354d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 355d4401354Smrg </xsd:complexType> 356d4401354Smrg </xsd:element> 357d4401354Smrg <xsd:element name="enum"> 358d4401354Smrg <xsd:complexType> 359d4401354Smrg <xsd:sequence minOccurs="1" maxOccurs="unbounded"> 360d4401354Smrg <xsd:element name="item"> 361d4401354Smrg <xsd:complexType> 362f591e195Smrg <xsd:choice minOccurs="1" maxOccurs="1"> 363b26960f7Smrg <xsd:element name="value" type="xsd:unsignedInt" /> 364b26960f7Smrg <xsd:element name="bit" type="bitType" /> 365f591e195Smrg </xsd:choice> 366d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 367d4401354Smrg </xsd:complexType> 368d4401354Smrg </xsd:element> 369986c8b3dSmrg <xsd:element ref="doc" minOccurs="0" maxOccurs="1" /> 370d4401354Smrg </xsd:sequence> 371d4401354Smrg <xsd:attribute name="name" type="xsd:string" use="required" /> 372d4401354Smrg </xsd:complexType> 373d4401354Smrg </xsd:element> 374d4401354Smrg <xsd:element name="typedef"> 375d4401354Smrg <xsd:complexType> 376d4401354Smrg <xsd:attribute name="oldname" type="xsd:string" use="required" /> 377d4401354Smrg <xsd:attribute name="newname" type="xsd:string" use="required" /> 378d4401354Smrg </xsd:complexType> 379d4401354Smrg </xsd:element> 380d4401354Smrg <!-- The import element allows a protocol description to reference the 381d4401354Smrg declarations of another protocol description. --> 382d4401354Smrg <xsd:element name="import" type="xsd:string" /> 383d4401354Smrg </xsd:choice> 384d4401354Smrg </xsd:group> 385d4401354Smrg</xsd:schema> 386