Creating a book toc

Here should go questions about transforming XML with XSLT and FOP.
burbles
Posts: 37
Joined: Wed Dec 23, 2009 6:13 am

Creating a book toc

Post by burbles » Sat Sep 04, 2010 10:40 am

I need to create a toc for a book, but I don't know where the toc is generated with FO. Am I supposed to create a new XML with a root element 'toc' and is the toc put there somehow when generated? I have been able to create chapter tocs in the right place for each 'chapter' chunk, and the styles I have set do work, but where does a book toc go?

Here's the XSL code I'm using with Oxygen 11.2, RenderX and DocBook 5:
<xsl:param name="generate.toc">
/appendix toc,title
article/appendix nop
/article toc,title
book toc,title,figure,table,example,equation
/chapter toc, title
part toc,title
/preface toc,title
qandadiv toc
qandaset toc
reference toc,title
/sect1 toc
/sect2 toc
/sect3 toc
/sect4 toc
/sect5 toc
/section toc
set toc,title
</xsl:param>
Thanks!

adrian
Posts: 2580
Joined: Tue May 17, 2005 4:01 pm

Re: Creating a book toc

Post by adrian » Tue Sep 07, 2010 12:07 pm

Hi,

Since the TOC is generated automatically for a book with the current generate.toc values what exactly are you trying to accomplish?

How did you create chapter TOCs? Weren't they generated automatically? Or you mean you were able to stylize them?

There are some explanations on how generate.toc is configured here:
http://docbook.sourceforge.net/release/ ... e.toc.html
but I'm guessing you've already gave them a look.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply