This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Question about HTMLHelp book node: can I makeit display content instead of TOC?
- From: Jirka Kosek <jirka at kosek dot cz>
- To: Taro Ikai <tikai at ABINITIO dot COM>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 26 Aug 2003 23:17:56 +0200
- Subject: Re: [docbook-apps] Question about HTMLHelp book node: can I makeit display content instead of TOC?
- References: <OF96E2565E.55B3DDC6-ON85256D8E.00568F3D-85256D8E.0057B648@abinitio.com>
Taro Ikai wrote:
But now my book nodes display nothing but the name of the book.
I want to fill pages associated with book nodes with content, like those
from <preface>.
I have multiple <book>s in a <set>, so $html.default.topic is not very
useful.
Aha.
Whether the content associated with each <book> node comes from
<preface> or something else is not important. What I want is to devise
a way to put some content in the pages associated with the <book>s.
If you have an idea as to where I might implement this change,
I'd appreciate suggestions.
Try to add following template into your customization layer. It's
completely untested but it should link from book in ToC to the first
object like chapter, preface, ...
<xsl:template match="book" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
<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:call-template name="escape-attr">
<xsl:with-param name="value">
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
<xsl:text disable-output-escaping="yes"><LI> <OBJECT
type="text/sitemap">
<param name="Name" value="</xsl:text>
<xsl:value-of select="normalize-space($title)"/>
<xsl:text disable-output-escaping="yes">">
<param name="Local" value="</xsl:text>
<xsl:call-template name="href.target.with.base.dir">
<xsl:with-param name="object"
select="(part|reference|preface|chapter|bibliography|appendix|article|colophon|glossary)[1]"/>
</xsl:call-template>
<xsl:text disable-output-escaping="yes">">
</OBJECT></xsl:text>
</xsl:if>
<xsl:if
test="part|reference|preface|chapter|appendix|bibliography|article|colophon|glossary">
<xsl:variable name="toc.params">
<xsl:call-template name="find.path.params">
<xsl:with-param name="table"
select="normalize-space($generate.toc)"/>
</xsl:call-template>
</xsl:variable>
<xsl:text disable-output-escaping="yes"><UL></xsl:text>
<xsl:if test="contains($toc.params, 'toc') and
$htmlhelp.hhc.show.root = 0 and not(parent::*)">
<xsl:text disable-output-escaping="yes"><LI> <OBJECT
type="text/sitemap">
<param name="Name" value="</xsl:text>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'TableofContents'"/>
</xsl:call-template>
<xsl:text disable-output-escaping="yes">">
<param name="Local" value="</xsl:text>
<xsl:call-template name="href.target.with.base.dir"/>
<xsl:text disable-output-escaping="yes">">
</OBJECT></xsl:text>
</xsl:if>
<xsl:apply-templates
select="part|reference|preface|chapter|bibliography|appendix|article|colophon|glossary"
mode="hhc"/>
<xsl:text disable-output-escaping="yes"></UL></xsl:text>
</xsl:if>
</xsl:template>
--
-----------------------------------------------------------------
Jirka Kosek
e-mail: jirka@kosek.cz
http://www.kosek.cz
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature