← Prev in month ← Prev in thread

DOCBOOK-APPS: Customization Problem - Chapter TOCs

From
Nicholas Atkinson <>
Date
2002-12-03T14:39:48+00:00
ID
007801c29ad9$126a6ae0$0300000a@natkinwkstn
Thread
DOCBOOK-APPS: Customization Problem - Chapter TOCs
I have a number of customizations which I use when 
generating HTML Help from my docbook documents.

 

However there is one customization which causes 
problems when I add it to the customization layer, which works fine (in the v 
1.56.1 transforms) when I modify html\component.xsl directly.  I would like 
to resolve this if possible as modifying the transforms themselves is, well, 
messy!

 

Basically I want the chapter toc to appear after 
the text of the chapter (before any subsections of course) rather than 
before it.  I already have a customization which gets rid of the 
"Table of Contents" text.  The desired end result is that links to child 
sections appear at the bottom of the page rather than the top.

 

If I change this template in 
html\component.xsl:

 

<xsl:template match="chapter">
  
<div class="{name(.)}">
    <xsl:if 
test="$generate.id.attributes != 0">
      
<xsl:attribute name="id">
        
<xsl:call-template name="object.id"/>
      
</xsl:attribute>
    </xsl:if>

 

    <xsl:call-template 
name="component.separator"/>
    <xsl:call-template 
name="chapter.titlepage"/>

 

    <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:if test="contains($toc.params, 
'toc')">
      <xsl:call-template 
name="component.toc">
        
<xsl:with-param name="toc.title.p" select="contains($toc.params, 
'title')"/>
      
</xsl:call-template>
    
</xsl:if>
    
<xsl:apply-templates/>
    <xsl:call-template 
name="process.footnotes"/>
  
</div>
</xsl:template>

 

to this:

 

<xsl:template match="chapter">
  
<div class="{name(.)}">
    <xsl:if 
test="$generate.id.attributes != 0">
      
<xsl:attribute name="id">
        
<xsl:call-template name="object.id"/>
      
</xsl:attribute>
    </xsl:if>

 

    <xsl:call-template 
name="component.separator"/>
    <xsl:call-template 
name="chapter.titlepage"/>

 

    
<xsl:apply-templates/>
    <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:if test="contains($toc.params, 
'toc')">
      <xsl:call-template 
name="component.toc">
        
<xsl:with-param name="toc.title.p" select="contains($toc.params, 
'title')"/>
      
</xsl:call-template>
    
</xsl:if>
    <xsl:call-template 
name="process.footnotes"/>
  
</div>
</xsl:template>

then I get what I want.   (All I have 
done is move the <xsl:apply-templates/> up).

 

However if I put this template, or the original of 
the template, in my customization layer and use the original html\component.xsl, 
then the chunking goes all wrong.

 

Does anyone know why this is the case, or what the 
preferred way of achieving such behaviour might be?

 

nik
← Prev in month ← Prev in thread