variablelist is the final term. Was using "position() = last()",
but that caused a fatal XPath error in xsltproc (though not in
Saxon); changed to "not(following-sibling::term)", which is
probably a better way of doing it anyway.
<xsl:template match="varlistentry/term">
<fo:inline><xsl:apply-templates/></fo:inline>
<xsl:choose>
- <xsl:when test="position() = last()"/> <!-- do nothing -->
+ <xsl:when test="not(following-sibling::term)"/> <!-- do nothing -->
<xsl:otherwise>
<!-- * if we have multiple terms in the same varlistentry, generate -->
<!-- * a separator (", " by default) and/or an additional line -->