[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Removing header navigation from TOC only
Trying to remove the navigational header by reprocessing the TOC chunk is an interesting approach to the problem, but I'm afraid using the root.id parameter won't work for that purpose. The TOC page is actually the root element of the chunking process. When the stylesheet processes the root element of the document, it generates the TOC and then processes the children of the root element into the various chunks. So setting the root.id parameter to the id of the document root will generate all the chunks again. I don't know of a way to remove that first nav header using parameters alone. However, the included customization of the template named 'chunk-element-content' will do it. If you don't know how to create a stylesheet customization, see this reference: http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer Here is the customization: <xsl:param name="navig.header.on.first.page">0</xsl:param> <xsl:template name="chunk-element-content"> <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="nav.context"/> <xsl:param name="content"> <xsl:apply-imports/> </xsl:param> <html> <xsl:call-template name="html.head"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> </xsl:call-template> <body> <xsl:call-template name="body.attributes"/> <xsl:call-template name="user.header.navigation"/> <xsl:if test="$prev or $navig.header.on.first.page != 0"> <xsl:call-template name="header.navigation"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> </xsl:if> <xsl:call-template name="user.header.content"/> <xsl:copy-of select="$content"/> <xsl:call-template name="user.footer.content"/> <xsl:call-template name="footer.navigation"> <xsl:with-param name="prev" select="$prev"/> <xsl:with-param name="next" select="$next"/> <xsl:with-param name="nav.context" select="$nav.context"/> </xsl:call-template> <xsl:call-template name="user.footer.navigation"/> </body> </html> </xsl:template> Now you can turn the first page nav header on and off using the parameter 'navig.header.on.first.page'. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "David Cannings" <lists@edeca.net> To: <docbook-apps@lists.oasis-open.org> Sent: Friday, May 07, 2004 12:53 AM Subject: [docbook-apps] Removing header navigation from TOC only I have an XML book that I'm converting using xsltproc into HTML. I'd like to remove the header navigation but only for the table of contents page, not the rest of the document. I've seen suppress.header.navigation and header.rule, recommended by another user here, but they remove it from every page. I see that I could also provide "rootid" to --stringparam in order to only output part of the page. I could also use it in a customization layer, I just haven't got that far yet. However, I don't know what the ID for the TOC is. If I solved it this way, I could process the whole document then only process the TOC with suppress.header.navigation set. Is there a better way than this? If not, is it possible to find or set the ID for the TOC page? David To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]