</xsl:choose>
</xsl:variable>
+<!--
<xsl:variable name="tabular-p"
select="$funcsynopsis.tabular.threshold > 0
and string-length(.) > $funcsynopsis.tabular.threshold"/>
+-->
+
+ <xsl:variable name="tabular-p" select="true()"/>
<xsl:choose>
<xsl:when test="$style = 'kr' and $tabular-p">
</td>
<xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
</tr>
- <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*]">
+ <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
<tr>
<td> </td>
<xsl:apply-templates select="." mode="kr-tabular"/>
</xsl:template>
<xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="type">
+ <xsl:apply-templates select="type"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ </xsl:when>
+ <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
+ <xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
<tr>
<xsl:choose>
- <xsl:when test="type and funcparams">
+ <xsl:when test="$type != '' and funcparams">
<td>
<code>
- <xsl:apply-templates select="type"
- mode="kr-tabular-funcsynopsis-mode"/>
+ <xsl:copy-of select="$type"/>
</code>
<xsl:text> </xsl:text>
</td>
<td>
<code>
- <xsl:apply-templates select="type/following-sibling::*"
- mode="kr-tabular-funcsynopsis-mode"/>
+ <xsl:choose>
+ <xsl:when test="type">
+ <xsl:apply-templates select="type/following-sibling::*"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="*"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ </xsl:otherwise>
+ </xsl:choose>
</code>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<code>
- <xsl:apply-templates select="parameter/preceding-sibling::*[not(self::parameter)]"
+ <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
mode="kr-tabular-funcsynopsis-mode"/>
</code>
<xsl:text> </xsl:text>
</td>
<xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
</tr>
- <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*]">
+ <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
<tr>
<td> </td>
<xsl:apply-templates select="." mode="ansi-tabular"/>
</xsl:template>
<xsl:template match="paramdef" mode="ansi-tabular">
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="type">
+ <xsl:apply-templates select="type"
+ mode="ansi-tabular"/>
+ </xsl:when>
+ <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
+ <xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:choose>
- <xsl:when test="type and funcparams">
+ <xsl:when test="$type != '' and funcparams">
<td>
- <xsl:apply-templates select="type" mode="ansi-tabular"/>
+ <xsl:copy-of select="$type"/>
<xsl:text> </xsl:text>
</td>
<td>
- <xsl:apply-templates select="type/following-sibling::*"
- mode="ansi-tabular"/>
+ <xsl:choose>
+ <xsl:when test="type">
+ <xsl:apply-templates select="type/following-sibling::*"
+ mode="ansi-tabular"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="*"
+ mode="ansi-tabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:choose>
<xsl:when test="following-sibling::*">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<td>
- <xsl:apply-templates select="parameter/preceding-sibling::*[not(self::parameter)]"
+ <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
mode="ansi-tabular"/>
<xsl:text> </xsl:text>
</td>