<xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
<xsl:variable name="refnamediv" select="$node//refnamediv"/>
<xsl:variable name="refname" select="$refnamediv//refname"/>
+ <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
<xsl:variable name="title">
<xsl:choose>
<xsl:when test="$refentrytitle">
<xsl:apply-templates select="$refentrytitle[1]" mode="title"/>
</xsl:when>
+ <xsl:when test="$refdesc">
+ <xsl:apply-templates select="$refdesc[1]" mode="title"/>
+ </xsl:when>
<xsl:when test="$refname">
<xsl:apply-templates select="$refname[1]" mode="title"/>
</xsl:when>
<xsl:template match="refentry/docinfo|refentry/refentryinfo"></xsl:template>
-<xsl:template match="refentrytitle|refname" mode="title">
+<xsl:template match="refentrytitle|refname|refdescriptor" mode="title">
<xsl:apply-templates/>
</xsl:template>
</xsl:template>
<xsl:template match="refname">
- <xsl:apply-templates/>
- <xsl:if test="following-sibling::refname">
- <xsl:text>, </xsl:text>
+ <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>
<xsl:template match="refdescriptor">
- <!-- todo: finish this -->
+ <xsl:apply-templates/>
</xsl:template>
<xsl:template match="refclass">
<xsl:template match="refsection/title">
<!-- the ID is output in the block.object call for refsect1 -->
<xsl:variable name="level" select="count(ancestor-or-self::refsection)"/>
+ <xsl:variable name="refsynopsisdiv">
+ <xsl:text>0</xsl:text>
+ <xsl:if test="ancestor::refsynopsisdiv">1</xsl:if>
+ </xsl:variable>
<xsl:variable name="hlevel">
<xsl:choose>
- <xsl:when test="$level > 5">6</xsl:when>
+ <xsl:when test="$level+$refsynopsisdiv > 5">6</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$level+1"/>
+ <xsl:value-of select="$level+1+$refsynopsisdiv"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>