xcb-schema: add listelement-ref
[free-sw/xcb/proto] / src / xcb.xsd
index 85e3dde..2f11f64 100644 (file)
@@ -54,6 +54,7 @@ authorization from the authors.
     <xsd:attribute name="enum" type="xsd:string" use="optional" />
     <xsd:attribute name="altenum" type="xsd:string" use="optional" />
     <xsd:attribute name="mask" type="xsd:string" use="optional" />
+    <xsd:attribute name="altmask" type="xsd:string" use="optional" />
   </xsd:complexType>
 
   <!-- case expression -->
@@ -77,7 +78,9 @@ authorization from the authors.
       <xsd:group ref="expression" minOccurs="1" maxOccurs="1" />
       <xsd:choice>
         <!-- bitcase expression - bit test -->
-        <xsd:element name="bitcase" type="caseexpr" minOccurs="1" maxOccurs="unbounded" />
+        <xsd:element name="bitcase" type="caseexpr" minOccurs="0" maxOccurs="unbounded" />
+        <!-- case expression - value test -->
+        <xsd:element name="case" type="caseexpr" minOccurs="0" maxOccurs="unbounded" />
       </xsd:choice>
       <!-- default: -->
       <xsd:group ref="fields" minOccurs="0" maxOccurs="1" />
@@ -91,7 +94,11 @@ authorization from the authors.
   <xsd:element name="field" type="var" />
 
   <!-- fd passing parameter -->
-  <xsd:element name="fd" />
+  <xsd:element name="fd">
+    <xsd:complexType>
+      <xsd:attribute name="name" type="xsd:string" use="required" />
+    </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
@@ -155,11 +162,15 @@ authorization from the authors.
       </xsd:element>
       <xsd:element name="sumof">
         <xsd:complexType>
+          <xsd:sequence>
+            <xsd:group ref="expression" minOccurs="0" maxOccurs="1"/>
+          </xsd:sequence>
           <xsd:attribute name="ref" use="required" type="xsd:string" />
         </xsd:complexType>
       </xsd:element>
-      <xsd:element name="value" type="dec-or-hex-integer" />
-      <xsd:element name="bit" type="xsd:integer" />
+      <xsd:element name="listelement-ref" />
+      <xsd:element name="value" type="xsd:integer" />
+      <xsd:element name="bit" type="bitType" />
     </xsd:choice>
   </xsd:group>
   
@@ -220,18 +231,14 @@ authorization from the authors.
     <xsd:attribute name="ref" type="xsd:string" use="required" />
   </xsd:complexType>
 
-  <!-- Type for hex integers -->
-  <xsd:simpleType name="hex-integer">
-    <xsd:restriction base="xsd:string">
-      <xsd:pattern value="0x[0-9a-fA-F]+" />
+  <!-- Type for bit values -->
+  <xsd:simpleType name="bitType">
+    <xsd:restriction base="xsd:integer">
+      <xsd:minInclusive value="0" />
+      <xsd:maxExclusive value="32" />
     </xsd:restriction>
   </xsd:simpleType>
 
-  <!-- Type for integers in either decimal or hex -->
-  <xsd:simpleType name="dec-or-hex-integer">
-    <xsd:union memberTypes="xsd:integer hex-integer" />
-  </xsd:simpleType>
-
   <!-- Type for documentation -->
   <xsd:group name="doc-fields">
     <xsd:sequence>
@@ -360,8 +367,8 @@ authorization from the authors.
             <xsd:element name="item">
               <xsd:complexType>
                 <xsd:choice minOccurs="1" maxOccurs="1">
-                  <xsd:element name="value" type="dec-or-hex-integer" />
-                  <xsd:element name="bit" type="xsd:integer" />
+                  <xsd:element name="value" type="xsd:unsignedInt" />
+                  <xsd:element name="bit" type="bitType" />
                 </xsd:choice>
                 <xsd:attribute name="name" type="xsd:string" use="required" />
               </xsd:complexType>