[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] TOC with parents
I think reverse engineering might work well. The template that writes the full TOC is here (I think): https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/webhelp/xsl/webhelp-common.xsl#L651 The "docbook" list is for discussing DocBook XML semantics and structure. The "docbook-apps" list is for discussing publishing and tools. Peter On Wed, Oct 21, 2015 at 9:51 PM, Aristedes Maniatis <ari@ish.com.au> wrote: > Thanks for that hint. I didn't know that, and perhaps I should try to reverse engineer how webhelp works in this regard. But I'd rather not start from scratch since I have extensive styling already around the existing html output and I don't want to change anything other than generating the TOC in a different way. > > Ari > > > BTW: what is the difference between docbook and docbook-apps mailing lists? Are they meant to represent docbook-dev and docbook-users? > > > On 22/10/2015 12:46pm, Peter Desjardins wrote: >> [moving to docbook-apps] >> >> What you are describing sounds like the webhelp output. Did you >> consider using that? >> >> Webhelp produces HTML pages with the full TOC on each page. I have >> customized the HTML and CSS significantly to match different web sites >> and branding. >> >> Peter >> >> On Wed, Oct 21, 2015 at 9:39 PM, Aristedes Maniatis <ari@ish.com.au> wrote: >>> I have chunked html output from docbook 5, and want to output the entire TOC on every page, including all parents of the chapter currently being rendered. >>> >>> I found one approach here: http://markmail.org/message/xpmrfboyu3tr5ehn >>> >>> But it is 11 years old, and not quite right, so I modified it a little... >>> >>> <!-- show all sections in TOC, including parents of the current section --> >>> <xsl:template match="chapter" mode="toc"> >>> <xsl:param name="toc-context" select="."/> >>> >>> <xsl:for-each select="ancestor::book"> >>> <xsl:apply-templates select="book" mode="toc"> >>> <xsl:with-param name="toc-context" select="."/> >>> </xsl:apply-templates> >>> </xsl:for-each> >>> </xsl:template> >>> >>> but it doesn't work. I'm a bit out of my depth with this level of XSLT hackery. Any help would be welcome... >>> >>> >>> >>> Ari >>> >>> >>> >>> -- >>> --------------------------> >>> Aristedes Maniatis >>> ish >>> http://www.ish.com.au >>> Level 1, 30 Wilson Street Newtown 2042 Australia >>> phone +61 2 9550 5001 fax +61 2 9550 4001 >>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A >>> > > -- > --------------------------> > Aristedes Maniatis > ish > http://www.ish.com.au > Level 1, 30 Wilson Street Newtown 2042 Australia > phone +61 2 9550 5001 fax +61 2 9550 4001 > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]