</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$sepchar"/>
+ </xsl:if>
<xsl:choose>
<xsl:when test="$choice='plain'">
<xsl:value-of select="$arg.choice.plain.open.str"/>
<xsl:template match="group/arg">
<xsl:variable name="choice" select="@choice"/>
<xsl:variable name="rep" select="@rep"/>
- <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$arg.or.sep"/>
+ </xsl:if>
<xsl:call-template name="group-or-arg"/>
</xsl:template>
linefeed-treatment="preserve"
xsl:use-attribute-sets="monospace.verbatim.properties">
<xsl:apply-templates select="ooclass[1]" mode="java"/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text> extends</xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="java"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
<xsl:if test="oointerface|ooexception">
<xsl:text>&RE; </xsl:text>
</xsl:if>
<xsl:template match="ooclass|oointerface|ooexception" mode="java">
<xsl:choose>
- <xsl:when test="position() > 1">
+ <xsl:when test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:template match="methodparam" mode="java">
<xsl:param name="indent">0</xsl:param>
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>,&RE;</xsl:text>
<xsl:if test="$indent > 0">
<xsl:call-template name="copy-string">
linefeed-treatment="preserve"
xsl:use-attribute-sets="monospace.verbatim.properties">
<xsl:apply-templates select="ooclass[1]" mode="cpp"/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text>: </xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="cpp"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
<xsl:if test="oointerface|ooexception">
<xsl:text>&RE; </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="cpp"/>
</xsl:template>
<xsl:template match="methodparam" mode="cpp">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="cpp"/>
xsl:use-attribute-sets="monospace.verbatim.properties">
<xsl:text>interface </xsl:text>
<xsl:apply-templates select="ooclass[1]" mode="idl"/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text>: </xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="idl"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
<xsl:if test="oointerface|ooexception">
<xsl:text>&RE; </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="idl"/>
</xsl:template>
<xsl:template match="methodparam" mode="idl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="idl"/>
<xsl:apply-templates select="ooclass[1]" mode="perl"/>
<xsl:text>;&RE;</xsl:text>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text>@ISA = (</xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="perl"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
<xsl:text>);&RE;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="perl"/>
</xsl:template>
<xsl:template match="methodparam" mode="perl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates mode="perl"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
+
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$sepchar"/>
+ </xsl:if>
<xsl:choose>
<xsl:when test="$choice='plain'">
<xsl:value-of select="$arg.choice.plain.open.str"/>
<xsl:template match="group/arg">
<xsl:variable name="choice" select="@choice"/>
<xsl:variable name="rep" select="@rep"/>
- <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
+ <xsl:if test="preceding-sibling::*">
+ <xsl:value-of select="$arg.or.sep"/>
+ </xsl:if>
<xsl:call-template name="group-or-arg"/>
</xsl:template>
</td>
<xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
</tr>
- <xsl:for-each select="(void|varargs|paramdef)[position() > 1]">
+ <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*]">
<tr>
<td> </td>
<xsl:apply-templates select="." mode="kr-tabular"/>
</td>
<td>
<code>
- <xsl:apply-templates select="type/following-sibling::node()"
+ <xsl:apply-templates select="type/following-sibling::*"
mode="kr-tabular-funcsynopsis-mode"/>
</code>
</td>
<xsl:otherwise>
<td>
<code>
- <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
+ <xsl:apply-templates select="parameter/preceding-sibling::*[not(self::parameter)]"
mode="kr-tabular-funcsynopsis-mode"/>
</code>
<xsl:text> </xsl:text>
<code>
<xsl:apply-templates select="parameter"
mode="kr-tabular"/>
- <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]"
+ <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]"
mode="kr-tabular-funcsynopsis-mode"/>
<xsl:text>;</xsl:text>
</code>
</td>
<xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
</tr>
- <xsl:for-each select="(void|varargs|paramdef)[position() > 1]">
+ <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*]">
<tr>
<td> </td>
<xsl:apply-templates select="." mode="ansi-tabular"/>
<xsl:text> </xsl:text>
</td>
<td>
- <xsl:apply-templates select="type/following-sibling::node()"
+ <xsl:apply-templates select="type/following-sibling::*"
mode="ansi-tabular"/>
<xsl:choose>
<xsl:when test="following-sibling::*">
</xsl:when>
<xsl:otherwise>
<td>
- <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
+ <xsl:apply-templates select="parameter/preceding-sibling::*[not(self::parameter)]"
mode="ansi-tabular"/>
<xsl:text> </xsl:text>
</td>
<td>
<xsl:apply-templates select="parameter"
mode="ansi-tabular"/>
- <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]"
+ <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]"
mode="ansi-tabular"/>
<xsl:choose>
<xsl:when test="following-sibling::*">
<xsl:template match="classsynopsis" mode="java">
<pre class="{name(.)}">
<xsl:apply-templates select="ooclass[1]" mode="java"/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text> extends</xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="java"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
<xsl:if test="oointerface|ooexception">
<br/>
<xsl:text> </xsl:text>
<xsl:template match="ooclass|oointerface|ooexception" mode="java">
<xsl:choose>
- <xsl:when test="position() > 1">
+ <xsl:when test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:template match="methodparam" mode="java">
<xsl:param name="indent">0</xsl:param>
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>,</xsl:text>
<br/>
<xsl:if test="$indent > 0">
<xsl:template match="classsynopsis" mode="cpp">
<pre class="{name(.)}">
<xsl:apply-templates select="ooclass[1]" mode="cpp"/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text>: </xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="cpp"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
<xsl:if test="oointerface|ooexception">
<br/>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<span class="{name(.)}">
</xsl:template>
<xsl:template match="methodparam" mode="cpp">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<span class="{name(.)}">
<pre class="{name(.)}">
<xsl:text>interface </xsl:text>
<xsl:apply-templates select="ooclass[1]" mode="idl"/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text>: </xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="idl"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
<xsl:if test="oointerface|ooexception">
<br/>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<span class="{name(.)}">
</xsl:template>
<xsl:template match="methodparam" mode="idl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<span class="{name(.)}">
<xsl:text>;</xsl:text>
<br/>
- <xsl:if test="ooclass[position() > 1]">
+ <xsl:if test="ooclass[preceding-sibling::*]">
<xsl:text>@ISA = (</xsl:text>
- <xsl:apply-templates select="ooclass[position() > 1]" mode="perl"/>
+ <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
<xsl:text>);</xsl:text>
<br/>
</xsl:if>
</xsl:template>
<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<span class="{name(.)}">
</xsl:template>
<xsl:template match="methodparam" mode="perl">
- <xsl:if test="position() > 1">
+ <xsl:if test="preceding-sibling::*">
<xsl:text>, </xsl:text>
</xsl:if>
<span class="{name(.)}">