[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Adding a Book level TOC to an appendix
Hi Scott,
Actually, you were pretty close. Just a
couple of changes are needed.
First, your generate.toc parameter needs to keep
the "toc" on book but add the others to appendix:
<xsl:param name="generate.toc">
book toc,title
appendix figure,table
</xsl:param>
That's because the find.path.params finds the
values for the current element, which is appendix. If you use this parameter,
then $toc.params will have the value "figure,table" in your match="appendix"
template.
Then your code in the match="appendix" template
just has to adjust the XPath selections to get above the current
context. You had this:
<xsl:if test="contains($toc.params, 'figure') and
.//figure">
<xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'figure'"/> <xsl:with-param name="nodes" select=".//figure"/> </xsl:call-template> </xsl:if> The XPath .//figure in the first and fourth lines
finds all figures relative to the context node, which in this case is the
appendix. What you want is //figure (no leading dot), which will find all
figures starting at the root node of the document. Be sure to change both
lines. Then it should work.
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]