source: trunk/Distribution/XSL/params/generate.toc.xml@ 3

Last change on this file since 3 was 2, checked in by jkacer, 18 years ago

Added all DocBook Framework stuff:

  • DocBook DTD
  • Transformation software FOP 0.20.5 and Saxon 6
  • XSL styles
  • Rexx scripts

Also added some WarpIN-related stuff for creation of WarpIN installation packages.
This state corresponds to version 1.0.0 from November 2005, just slightly modified to carry versioning information (Rexx scripts).

File size: 3.3 KB
Line 
1<refentry id="generate.toc">
2<refmeta>
3<refentrytitle>generate.toc</refentrytitle>
4<refmiscinfo role="type">table</refmiscinfo>
5</refmeta>
6<refnamediv>
7<refname>generate.toc</refname>
8<refpurpose>Control generation of ToCs and LoTs</refpurpose>
9</refnamediv>
10
11<refsynopsisdiv>
12<src:fragment id='generate.toc.frag'>
13<xsl:param condition="html" name="generate.toc">
14appendix toc,title
15article/appendix nop
16article toc,title
17book toc,title,figure,table,example,equation
18chapter toc,title
19part toc,title
20preface toc,title
21qandadiv toc
22qandaset toc
23reference toc,title
24sect1 toc
25sect2 toc
26sect3 toc
27sect4 toc
28sect5 toc
29section toc
30set toc,title
31</xsl:param>
32<xsl:param condition="fo" name="generate.toc">
33/appendix toc,title
34article/appendix nop
35/article toc,title
36book toc,title,figure,table,example,equation
37/chapter toc,title
38part toc,title
39/preface toc,title
40qandadiv toc
41qandaset toc
42reference toc,title
43/sect1 toc
44/sect2 toc
45/sect3 toc
46/sect4 toc
47/sect5 toc
48/section toc
49set toc,title
50</xsl:param>
51</src:fragment>
52</refsynopsisdiv>
53
54<refsect1><title>Description</title>
55
56<para>This parameter has a structured value. It is a table of space-delimited
57path/value pairs. Each path identifies some element in the source document
58using a restricted subset of XPath (only the implicit child axis, no wildcards,
59no predicates). Paths can be either relative or absolute.</para>
60
61<para>When processing a particular element, the stylesheets consult this table to
62determine if a ToC (or LoT(s)) should be generated.</para>
63
64<para>For example, consider the entry:</para>
65
66<screen>book toc,figure</screen>
67
68<para>This indicates that whenever a <sgmltag>book</sgmltag> is formatted, a
69Table Of Contents and a List of Figures should be generated. Similarly,</para>
70
71<screen>/chapter toc</screen>
72
73<para>indicates that whenever a document <emphasis>that has a root
74of</emphasis> <sgmltag>chapter</sgmltag> is formatted, a Table of
75Contents should be generated. The entry <literal>chapter</literal> would match
76all chapters, but <literal>/chapter</literal> matches only <sgmltag>chapter</sgmltag>
77document elements.</para>
78
79<para>Generally, the longest match wins. So, for example, if you want to distinguish
80articles in books from articles in parts, you could use these two entries:</para>
81
82<screen>book/article toc,figure
83part/article toc</screen>
84
85<para>Note that an article in a part can never match a <literal>book/article</literal>,
86so if you want nothing to be generated for articles in parts, you can simply leave
87that rule out.</para>
88
89<para>If you want to leave the rule in, to make it explicit that you're turning
90something off, use the value <quote>nop</quote>. For example, the following
91entry disables ToCs and LoTs for articles:</para>
92
93<screen>article nop</screen>
94
95<para>Do not simply leave the word <quote>article</quote> in the file
96without a matching value. That'd be just begging the silly little
97path/value parser to get confused.</para>
98
99<para>Section ToCs are further controlled by the
100<parameter>generate.section.toc.level</parameter> parameter.
101For a given section level to have a ToC, it must have both an entry in
102<parameter>generate.toc</parameter> and be within the range enabled by
103<parameter>generate.section.toc.level</parameter>.</para>
104</refsect1>
105</refentry>
Note: See TracBrowser for help on using the repository browser.