<xsd:element name="xcb">
<xsd:complexType>
<xsd:group ref="macro" minOccurs="0" maxOccurs="unbounded" />
- <xsd:attribute name="header" type="xsd:string" />
+ <xsd:attribute name="header" type="xsd:string" use="required" />
<xsd:attribute name="extension-xname" type="xsd:string" use="optional" />
<xsd:attribute name="extension-name" type="xsd:string" use="optional" />
+ <xsd:attribute name="extension-multiword" type="xsd:boolean" use="optional" default="false" />
+ <xsd:attribute name="major-version" type="xsd:integer" use="optional" />
+ <xsd:attribute name="minor-version" type="xsd:integer" use="optional" />
</xsd:complexType>
</xsd:element>
<!-- Padding -->
<xsd:element name="pad">
<xsd:complexType>
- <xsd:attribute name="bytes" type="xsd:integer" />
+ <xsd:attribute name="bytes" type="xsd:integer" use="required" />
</xsd:complexType>
</xsd:element>
<!-- Type for fields or parameters with attributes "name" and "type" -->
<xsd:complexType name="var">
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="type" type="xsd:string" use="required" />
</xsd:complexType>
<!-- field replaces FIELD, PARAM, and REPLY. -->
- <xsd:element name="field" type="var" />
+ <xsd:element name="field">
+ <xsd:complexType>
+ <xsd:extension base="var">
+ <!-- Used for fields which are bitmasks. Refers to the type which
+ describes the mask. -->
+ <xsd:attribute name="mask" type="xsd:string" use="optional" />
+
+ <!-- Used for fields which are enums. Refers to the type which
+ describes the enumeration. -->
+ <xsd:attribute name="enum" type="xsd:string" use="optional" />
+ </xsd:extension>
+ </xsd:complexType>
+ </xsd:element>
<!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY. The name and type
are specified as attributes. The content is an expression giving the
</xsd:complexType>
</xsd:element>
- <!-- Parameters in requests that are not sent with the request. -->
- <xsd:element name="localfield" type="var" />
-
<!-- Expressions -->
<xsd:group name="expression">
<xsd:choice>
<xsd:group ref="expression" />
<xsd:group ref="expression" />
</xsd:sequence>
- <xsd:attribute name="op">
+ <xsd:attribute name="op" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\+|-|\*|/|&|<<" />
</xsd:element>
<xsd:element name="fieldref" type="xsd:string" />
<xsd:element name="value" type="dec-or-hex-integer" />
+ <xsd:element name="bit" type="xsd:integer" />
</xsd:choice>
</xsd:group>
<!-- BITMASK/LISTofVALUE parameter pairs. -->
<xsd:element name="valueparam">
<xsd:complexType>
- <xsd:attribute name="value-mask-type" type="xsd:string" />
- <xsd:attribute name="value-mask-name" type="xsd:string" />
- <xsd:attribute name="value-list-name" type="xsd:string" />
+ <xsd:attribute name="value-mask-type" type="xsd:string" use="required" />
+ <xsd:attribute name="value-mask-name" type="xsd:string" use="required" />
+ <!-- This pad is currently needed only by ConfigureWindow. Sigh. -->
+ <xsd:attribute name="value-mask-pad" type="xsd:integer" use="optional" />
+ <xsd:attribute name="value-list-name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
<!-- Type for a structure -->
<xsd:complexType name="struct">
<xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
- <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
<!-- Type for a packet structure -->
<xsd:complexType name="packet-struct">
<xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" />
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="number" type="xsd:integer" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="number" type="xsd:integer" use="required" />
</xsd:complexType>
<!-- Type for a packet structure copy -->
<xsd:complexType name="packet-struct-copy">
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="number" type="xsd:integer" />
- <xsd:attribute name="ref" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="number" type="xsd:integer" use="required" />
+ <xsd:attribute name="ref" type="xsd:string" use="required" />
</xsd:complexType>
<!-- Type for hex integers -->
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:group ref="fields" />
- <xsd:element ref="localfield" />
<xsd:element ref="exprfield" />
<xsd:element ref="valueparam" />
</xsd:choice>
<xsd:element name="reply" minOccurs="0" maxOccurs="1">
<xsd:complexType>
- <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:group ref="fields" />
+ <xsd:element ref="valueparam" />
+ </xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="opcode" type="xsd:integer" />
- <xsd:attribute name="combine-adjacent" type="xsd:boolean" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="opcode" type="xsd:integer" use="required" />
+ <xsd:attribute name="combine-adjacent" type="xsd:boolean"
+ use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="event">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="packet-struct">
- <xsd:attribute name="no-sequence-number" type="xsd:boolean" />
+ <xsd:attribute name="no-sequence-number" type="xsd:boolean"
+ use="optional" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="union" type="struct" />
<xsd:element name="xidtype">
<xsd:complexType>
- <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="xidunion">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="type" type="xsd:string"
+ minOccurs="1" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element name="enum">
<xsd:element name="item">
<xsd:complexType>
<xsd:group ref="expression" minOccurs="0" maxOccurs="1" />
- <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element name="typedef">
<xsd:complexType>
- <xsd:attribute name="oldname" type="xsd:string" />
- <xsd:attribute name="newname" type="xsd:string" />
+ <xsd:attribute name="oldname" type="xsd:string" use="required" />
+ <xsd:attribute name="newname" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
<!-- The import element allows a protocol description to reference the