generate.toc parameter is used to globally control all TOCs, including all
qandaset elements in the
document. To turn them on, the stylesheet parameter
generate.toc must include the line:
This line is included by default in the stylesheets. To turn them all off, the line should be omitted or replaced with this line:
See the section “Which components have a TOC” for more on the
Once you have established the global pattern with
generate.toc, you can use a processing instruction to turn the list
on or off for an individual
qandaset. The example below shows the use
of the processing instruction that turns on the TOC for a single
qandaset when they are turned off
<qandaset><?dbhtml toc="1" ?> <qandaentry> ...
Likewise, the following PI can be used to turn off the TOC for a single
qandaset when they are turned on globally:
<qandaset><?dbhtml toc="0" ?> ...
The combination of the two mechanisms gives you complete control over the question lists.
There is one other stylesheet parameter that affects the list of questions. The DocBook DTD permits an
answer element to include nested
qandaentry elements. By default, the nested elements are not included in the list of questions. If you want them included, then set the stylesheet parameter
qanda.nested.in.toc to 1.
You may have a requirement to customize the template that generates the list of questions. For print output, customize the template named
qandaset.toc found in the stylesheet module
fo/autotoc.xsl. For HTML output, customize the template named
process.qanda.toc in the stylesheet module
|DocBook XSL: The Complete Guide - 4th Edition||PDF version available|
Copyright © 2002-2007 Sagehill Enterprises