]> granicus.if.org Git - docbook-dsssl/commitdiff
make funcsynopsis.decoration=1 have effect for nontabular K&R
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 10 May 2005 11:45:24 +0000 (11:45 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 10 May 2005 11:45:24 +0000 (11:45 +0000)
output (closes bug # 1198960)

::PROBLEM
  If you set the funcsynopsis.decoration param to 1 and generate
  notablular K&R output for a functionsynopsis, the parameters in
  the function argument synopsis are not styled (italicized) as
  they are for K&R tabular output.

::FIX
  Changed K&R nontabular logic to base styling for function
  argument synopsis on value of funcsynopsis.decoration.

xsl/html/synop.xsl

index f85b5320cdc6dfe7885e7338052d82cc2bfc3155..45cb1885561bfbeec5282ede182577d93c802aa4 100644 (file)
@@ -279,10 +279,24 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <xsl:text>;</xsl:text>
 </xsl:template>
 
-<xsl:template match="type|parameter|funcparams" mode="kr-funcsynopsis-mode">
-  <code>
-    <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
-  </code>
+<xsl:template match="paramdef/parameter" mode="kr-funcsynopsis-mode">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <var class="pdparam">
+        <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+      </var>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="kr-funcsynopsis-mode">
+  <code>(</code>
+  <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+  <code>)</code>
+  <xsl:text>;</xsl:text>
 </xsl:template>
 
 <!-- ====================================================================== -->