<xsl:template match="set" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="book" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="section" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="sect1" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="sect2" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="sect3" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="sect4" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:template match="sect5|refentry|colophon|bibliodiv" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
- <xsl:apply-templates select="." mode="label.markup"/>
- <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:variable name="label.markup">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($label.markup)">
+ <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
+ </xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>