]> granicus.if.org Git - docbook-dsssl/commitdiff
Partially support having multiple parameters in one paramdef.
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 10 May 2005 12:02:04 +0000 (12:02 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 10 May 2005 12:02:04 +0000 (12:02 +0000)
DocBook says it is valid, but it's not clear why anybody would
ever want to do it. Prior to this fix, each parameter would get
rendered twice. There is still a problem with whitespace between
parameters getting dropped, but it's not worth fixing unless
somebody can actually show a use case for having multiple
parameters in one paramdef.

xsl/html/synop.xsl

index 45cb1885561bfbeec5282ede182577d93c802aa4..e7a84dc233afcda7f100205687b8f84aa4b10db9 100644 (file)
@@ -413,14 +413,14 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
       </xsl:when>
       <xsl:otherwise>
         <td>
-          <xsl:apply-templates select="parameter/preceding-sibling::node()"
+          <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
                                mode="kr-tabular-funcsynopsis-mode"/>
           <xsl:text>&#160;</xsl:text>
         </td>
         <td>
           <xsl:apply-templates select="parameter"
                                mode="kr-tabular"/>
-          <xsl:apply-templates select="parameter/following-sibling::node()"
+          <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]"
                                mode="kr-tabular-funcsynopsis-mode"/>
           <xsl:text>;</xsl:text>
         </td>
@@ -591,14 +591,14 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
     </xsl:when>
     <xsl:otherwise>
       <td>
-        <xsl:apply-templates select="parameter/preceding-sibling::node()"
+        <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
                              mode="ansi-tabular"/>
         <xsl:text>&#160;</xsl:text>
       </td>
       <td>
         <xsl:apply-templates select="parameter"
                              mode="ansi-tabular"/>
-        <xsl:apply-templates select="parameter/following-sibling::node()"
+        <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]"
                              mode="ansi-tabular"/>
         <xsl:choose>
           <xsl:when test="following-sibling::*">