Problem:
Contents of Refpurpose/Inlinemediaobject do not show up ToC in
HTML output. DocBook 5 says that Refpurpose/Inlinemediaobject
is valid, so we need to handle it correctly.
Cause:
HTML stylesheets were doing an xsl:value-of on Refpurpose when
generating the ToC.
Fix:
Changed to xsl:apply-templates call instead. Also, removed
generation of hyphen character in ToC between Refname contents
and Refpurpose. The Refpurpose template generates an em dash
already, so now that apply-templates is run, that em dash gets
rendered in the TOC, just as it is in the main text flow.
Affects:
This change only affects HTML output. I did not touch the FO
stylesheets because they are not currently rendering a TOC for
Refentry in the page contents anyway. And as far as the PDF
bookmarks, they appear to be generated with value-select for all
elements, regardless. I imagine that the reason might be that
images are not allowed in PDF bookmark labels.
As far as other effects, not the explanation above about the
change from generating a hypen in the TOC to generating an em
dash.
Closes bug #
1459977. Thanks to Davor Ocelic (docelic) for the bug
report.
</span>
<span class='refpurpose'>
<xsl:if test="$annotate.toc != 0">
- <xsl:text> - </xsl:text>
- <xsl:value-of select="refnamediv/refpurpose"/>
+ <!-- * DocBook 5 says inlinemediaobject (among other things) -->
+ <!-- * is allowed in refpurpose; so we need to run -->
+ <!-- * apply-templates on refpurpose here, instead of value-of -->
+ <xsl:apply-templates select="refnamediv/refpurpose"/>
</xsl:if>
</span>
</xsl:element>