If the value of autotoc.label.in.hyperlink is non-zero, labels are
included in hyperlinked titles in the TOC. If it is instead zero,
labels are still displayed prior to the hyperlinked titles, but
are not hyperlinked along with the titles.
Closes patch #
1065868. Thanks to anatoly techtonik for the patch.
<span>
<xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
+
+ <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
+ <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
+ <xsl:if test="$autotoc.label.in.hyperlink = 0">
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ </xsl:if>
+
<a>
<xsl:attribute name="href">
<xsl:call-template name="href.target">
</xsl:call-template>
</xsl:attribute>
+ <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
+ <!-- * as part of the hyperlinked title -->
+ <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
<xsl:variable name="label">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
<xsl:if test="$label != ''">
<xsl:value-of select="$autotoc.label.separator"/>
</xsl:if>
+ </xsl:if>
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
</a>
<!ENTITY appendix.autolabel SYSTEM "../params/appendix.autolabel.xml">
<!ENTITY author.othername.in.middle SYSTEM "../params/author.othername.in.middle.xml">
<!ENTITY autotoc.label.separator SYSTEM "../params/autotoc.label.separator.xml">
+<!ENTITY autotoc.label.in.hyperlink SYSTEM "../params/autotoc.label.in.hyperlink.xml">
<!ENTITY base.dir SYSTEM "../params/base.dir.xml">
<!ENTITY biblioentry.item.separator SYSTEM "../params/biblioentry.item.separator.xml">
<!ENTITY bibliography.collection SYSTEM "../params/bibliography.collection.xml">
<reference id="toc_index"><title>ToC/LoT/Index Generation</title>
&annotate.toc;
&autotoc.label.separator;
+&autotoc.label.in.hyperlink;
&process.source.toc;
&process.empty.source.toc;
&bridgehead.in.toc;
<src:fragref linkend="appendix.autolabel.frag"/>
<src:fragref linkend="author.othername.in.middle.frag"/>
<src:fragref linkend="autotoc.label.separator.frag"/>
+<src:fragref linkend="autotoc.label.in.hyperlink.frag"/>
<src:fragref linkend="base.dir.frag"/>
<src:fragref linkend="biblioentry.item.separator.frag"/>
<src:fragref linkend="bibliography.collection.frag"/>
--- /dev/null
+<refentry id="autotoc.label.in.hyperlink">
+<refmeta>
+<refentrytitle>autotoc.label.in.hyperlink</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>autotoc.label.in.hyperlink</refname>
+<refpurpose>Include lable in hyperlinked titles in TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='autotoc.label.in.hyperlink.frag'><xsl:param name="autotoc.label.in.hyperlink" select="1"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If the value of
+<parameter>autotoc.label.in.hyperlink</parameter> is non-zero, labels
+are included in hyperlinked titles in the TOC. If it is instead zero,
+labels are still displayed prior to the hyperlinked titles, but
+are not hyperlinked along with the titles.</para>
+
+</refsect1>
+</refentry>