summaryrefslogtreecommitdiff
path: root/src/c-client.xsl
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-03-29 12:28:07 -0700
committerBart Massey <bart@cs.pdx.edu>2007-03-29 12:28:07 -0700
commit91be36f845352dea7838853d0f98ae144fe571a4 (patch)
tree7c870536c199c19ea2ea14f0ebda8628426367f6 /src/c-client.xsl
parent4a60950b7433eb41e08cb0c74dc8ced8f92fd78a (diff)
Replaces special-casing in c-client stylesheet with support
for new attribute. Tested with diff and found no difference with previous stylesheet header-file output.
Diffstat (limited to 'src/c-client.xsl')
-rw-r--r--src/c-client.xsl38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/c-client.xsl b/src/c-client.xsl
index d7a0eb9..24ffe6c 100644
--- a/src/c-client.xsl
+++ b/src/c-client.xsl
@@ -97,31 +97,19 @@ authorization from the authors.
<xsl:param name="name" />
<func:result>
<xsl:text>xcb</xsl:text>
- <xsl:choose>
- <xsl:when test="/xcb/@extension-name = 'RandR'">
- <xsl:text>_randr</xsl:text>
- </xsl:when>
- <xsl:when test="/xcb/@extension-name = 'ScreenSaver'">
- <xsl:text>_screensaver</xsl:text>
- </xsl:when>
- <xsl:when test="/xcb/@extension-name = 'XF86Dri'">
- <xsl:text>_xf86dri</xsl:text>
- </xsl:when>
- <xsl:when test="/xcb/@extension-name = 'XFixes'">
- <xsl:text>_xfixes</xsl:text>
- </xsl:when>
- <xsl:when test="/xcb/@extension-name = 'XvMC'">
- <xsl:text>_xvmc</xsl:text>
- </xsl:when>
- <xsl:when test="/xcb/@extension-name">
- <xsl:text>_</xsl:text>
- <xsl:call-template name="camelcase-to-underscore">
- <xsl:with-param name="camelcase" select="/xcb/@extension-name" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:if test="/xcb/@extension-name">
+ <xsl:text>_</xsl:text>
+ <xsl:choose>
+ <xsl:when test="/xcb/@extension-oneword = 'true' or /xcb/@extension-oneword = '1'">
+ <xsl:value-of select="translate(/xcb/@extension-name, $ucase, $lcase)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="camelcase-to-underscore">
+ <xsl:with-param name="camelcase" select="/xcb/@extension-name" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
<xsl:if test="$name">
<xsl:text>_</xsl:text>
<xsl:call-template name="camelcase-to-underscore">