Re: [docbook-apps] Simplesects in the TOC

From
Bob Stayton <>
Date
2009-03-03T17:20:46+00:00
ID
007901c99c24$4d5d84e0$6400a8c0@pazu
Thread
Re: [docbook-apps] Simplesects in the TOC
Title: RE: [docbook-apps] Simplesects in the TOC

Indeed, it was a bug introduced to HTML, adding 
support for simplesect but without the $simplesect.in.toc parameter being 
checked.  Add this to your customization until the next 
release:

 

<xsl:template match="section" 
mode="toc">
  <xsl:param name="toc-context" 
select="."/>

 

  <xsl:call-template 
name="subtoc">
    <xsl:with-param name="toc-context" 
select="$toc-context"/>
    <xsl:with-param name="nodes" 
select="section|refentry
                                         
|simplesect[$simplesect.in.toc != 
0]
                                         
|bridgehead[$bridgehead.in.toc != 0]"/>
  
</xsl:call-template>
</xsl:template>

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Eric 
  Johnson 

  
To: Bob Stayton ;  
  

  
Sent: Tuesday, March 03, 2009 5:26 
  AM

  
Subject: RE: [docbook-apps] Simplesects 
  in the TOC

  

  
There is a customization layer, but the behavior changed when 
  I upgraded the stylesheets with no change to the customization layer.

I 
  noticed the change in chunked XHTML generation. It only seems to happen in 
  sections that are broken into simplesect blocks. Chapters don't have the 
  problem.

Here is the modifications I made to control the chunking and 
  TOCs:

  <xsl:param name="chunk.section.depth" select="2" 
  />
  <xsl:param name="chunk.first.sections" select="1" 
  />
  <xsl:param name="generate.section.toc.level" select="2" 
  />

  <xsl:param name="generate.toc">
  
  article   toc,title
  chapter   toc
  
  book      toc,title,figure,table,example
  
  part      toc
  section   
  toc
  appendix  toc
   reference toc
   
  preface 
  toc
 </xsl:param>

TIA,
Eric

-----Original 
  Message-----
From: Bob Stayton [mailto:]
Sent: Mon 
  3/2/2009 8:00 PM
To: Eric Johnson; 
  
Subject: Re: [docbook-apps] Simplesects 
  in the TOC

Simplesects in the TOCHi Eric,
I cannot duplicate this 
  problem.  Are you testing with your customization layer, or with the 
  stock stylesheets?

FO or HTML?

Bob Stayton
Sagehill 
  Enterprises


  ----- Original Message 
  -----
  From: Eric Johnson
  To: 
  
  Sent: Monday, March 02, 2009 4:38 
  PM
  Subject: [docbook-apps] Simplesects in the TOC

  
  I just updated to the latest version on the stylesheets and now all of my 
  simplesects are showing up in my TOCs. Is this a bug? Is there a work 
  around?

  I tried adding setting simplesect.in.toc=0 to 
  explicitly turn it off, but nothing 
happened.