← Prev in month ← Prev in thread

Re: [docbook] TOC with parents

From
Aristedes Maniatis <>
Date
2015-11-18T22:57:20+00:00
ID
Thread
Re: [docbook] TOC with parents
Thanks for your help, but the webhelp output was just way too different. So I've struggled to try and modify the TOC output from docbook. But nothing I try seems to be able to customise it. Even when I try:

<xsl:import href="@rootDir@/build/xslt/docbook/html/chunk.xsl"/>

    <xsl:template name="section.toc" mode="toc">
        <xsl:text>******************</xsl:text>
    </xsl:template>

    <xsl:template match="section/toc" mode="toc">
    <xsl:text>******************</xsl:text>
    </xsl:template>

with or without the mode (I don't really understand how the mode is used in XSLT).

I'm a bit confused by the presence of both toc.xsl and autotoc.xsl. But nothing I try seems to allow me to modify them.

I have no problem modifying other things like <xsl:template name="user.head.content">


I feel like I'm missing something really obvious.

Ari



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 <> 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
← Prev in month ← Prev in thread