[Xcb] xsl question

Thomas Hunger hto at arcor.de
Thu Sep 14 13:15:21 PDT 2006

On Thursday 14 September 2006 10:31, Vincent Torri wrote:
> I have some difficulties to transform automatically the CARD8 into
> uint8_t (for example)
> the definition of the types are located lines 110-123 of
> c-client.xsl the xsl stylesheet use them line 152
> What I've done is modifying lines 110-123 to :
>      <type name="BOOL" newname="bool8_t" />
> ...
>      <type name="XID" newname="xid_t" />

The names in 110-123 are used in line 151 (as you said)

<xsl:when test="$is-unqualified and $core-types/type[@name=$type]">
  <xsl:value-of select="$type" />

to mark them as simple types. But the actual value inserted is a 
variable $type which is a parameter to canonical-type-name. The 
parameter seems to be filled in from xproto.xml. So the way to go is 
to replace the values directly in lines 110-123 like this:

+ <type name="bool_t" />
- <type name="BOOL" />

and replace all BOOL occurrences in xproto.xml. But then I do not know 
if the BOOL and CARDx names must stay in the xml-description because 
they are used in the protocol definition.

So if the CARDs have stay, it could be done like this (line 151):
<xsl:when test="$is-unqualified and $core-types/type[@name=$type]">
  <xsl:value-of select="$core-types/type[@name=$type]/@newname" />


> Then, I would like to use in line 152 that newname, but I did not
> succeed.
> Can someone help me ?
> thank you
> Vincent
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb

More information about the Xcb mailing list