[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Question about HTMLHelp book node: can I makeit display content instead of TOC?
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
S/MIME Cryptographic Signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]