<xsl:if test="not(following-sibling::refnamediv)">
<xsl:attribute name="space-after">1em</xsl:attribute>
</xsl:if>
- <xsl:choose>
- <xsl:when test="../refmeta/refentrytitle">
- <xsl:apply-templates select="../refmeta/refentrytitle"/>
- </xsl:when>
- <xsl:when test="refdescriptor">
- <xsl:apply-templates select="refdescriptor[1]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="refname[1]"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="refpurpose"/>
- </fo:block>
-
- <!-- what was this for?
- <fo:block>
- <xsl:choose>
- <xsl:when test="refdescriptor">
- <xsl:apply-templates select="refdescriptor"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="refname">
- <xsl:apply-templates select="."/>
- <xsl:if test="following-sibling::refname">
- <xsl:text>, </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:apply-templates/>
</fo:block>
- -->
</fo:block>
</xsl:template>
<xsl:template match="refname">
- <xsl:apply-templates/>
+ <xsl:if test="not(preceding-sibling::refdescriptor)">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::refname">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:if>
</xsl:template>
<xsl:template match="refpurpose">