[Xcb] [proto 5/6] schema: Remove dec-or-hex-integer and hex-integer type

Daniel Martin consume.noise at gmail.com
Fri Nov 22 14:26:53 PST 2013


Reflect in the schema that hexadecimal values aren't supported in enum
items (and expressions) by removing the 'dec-or-hex-integer' and
'hex-integer' type.

Hexadecimal values are not supported "as some languages have a different
notation for hex-values" and therefor such hexadecimal values have been
explicitly replaced with decimal values in other commits, see:

    183ecff Replaced hex-values with decimal ones
    8b3c120 did remaining replacements of hex constants with decimal

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
 src/xcb.xsd | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/xcb.xsd b/src/xcb.xsd
index e566dbd..fd22701 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -161,7 +161,7 @@ authorization from the authors.
           <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="value" type="xsd:integer" />
       <xsd:element name="bit" type="xsd:integer" />
     </xsd:choice>
   </xsd:group>
@@ -223,18 +223,6 @@ 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]+" />
-    </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>
@@ -363,7 +351,7 @@ 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="value" type="xsd:integer" />
                   <xsd:element name="bit" type="xsd:integer" />
                 </xsd:choice>
                 <xsd:attribute name="name" type="xsd:string" use="required" />
-- 
1.8.4.2



More information about the Xcb mailing list