Q and A list of questions

Each qandaset can have its own local table of contents (TOC) that lists the questions in the set. You can globally turn the lists on or off, and then locally turn an individual list on or off.

The generate.toc parameter is used to globally turn on or off TOC lists for all qandaset elements in the document. To turn them all on, the stylesheet parameter generate.toc must include the line:

qandaset  toc

This line is included by default in the stylesheets. To turn them all off, the line should be omitted or replaced with this line:

qandaset  nop

See the section “Which components have a TOC” for more on the generate.toc parameter.

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 globally:

<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.