]> granicus.if.org Git - docbook-dsssl/commitdiff
RFE #1069397 Add new parameter simplesect.in.toc
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 23 Nov 2004 06:55:03 +0000 (06:55 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 23 Nov 2004 06:55:03 +0000 (06:55 +0000)
  - default value of 0 causes simplesect to be omitted from TOCs
  - to cause simplesect to be included in TOCs, you must set the
    value of simplesect.in.toc to 1

note from Norm:

  Simplesect elements aren't supposed to appear in the ToC at
  all. Ugh. The Definitive Guide doesn't really explain that
  very well.

  The use case for simplesect is when, for example, every
  chapter in a book ends with "Exercises" or "For More
  Information" sections and you don't want those to appear in
  the ToC.

xsl/fo/param.ent
xsl/fo/param.xweb
xsl/html/autotoc.xsl
xsl/html/param.ent
xsl/html/param.xweb
xsl/params/simplesect.in.toc.xml [new file with mode: 0644]

index da8f4104650ff9ef1638e778ebb482644dba9db4..6d9a470094d619897cef632aa539e8634ffb1cfa 100644 (file)
 <!ENTITY default.image.width SYSTEM "../params/default.image.width.xml">
 <!ENTITY default.float.class SYSTEM "../params/default.float.class.xml">
 <!ENTITY bridgehead.in.toc SYSTEM "../params/bridgehead.in.toc.xml">
+<!ENTITY simplesect.in.toc SYSTEM "../params/simplesect.in.toc.xml">
 <!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml">
 <!ENTITY table.cell.border.color SYSTEM "../params/table.cell.border.color.xml">
 <!ENTITY table.cell.border.style SYSTEM "../params/table.cell.border.style.xml">
index 92e8e77849a5284aaee399155b692d27a2103068..72f3701c2e805028e908cffc8a4f33aab45dd541 100644 (file)
@@ -97,6 +97,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &toc.indent.width;
 &toc.margin.properties;
 &bridgehead.in.toc;
+&simplesect.in.toc;
 &generate.section.toc.level;
 
 <!--
@@ -715,6 +716,7 @@ around all these parameters.</para>
 <src:fragref linkend="shade.verbatim.style.frag"/>
 <src:fragref linkend="show.comments.frag"/>
 <src:fragref linkend="sidebar.properties.frag"/>
+<src:fragref linkend="simplesect.in.toc.frag"/>
 <src:fragref linkend="subscript.properties.frag"/>
 <src:fragref linkend="superscript.properties.frag"/>
 <src:fragref linkend="symbol.font.family.frag"/>
index 95ffb04b718b51b85c2f69c117f290b15cc571bf..91aaf8ea5077398a2c4ca1564fe897aab15003da 100644 (file)
   <xsl:call-template name="make.toc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
     <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="section|sect1|simplesect|refentry
+    <xsl:with-param name="nodes" select="section|sect1
+                                         |simplesect[$simplesect.in.toc != 0]
+                                         |refentry
                                          |article|bibliography|glossary
                                          |appendix|index
                                          |bridgehead[not(@renderas)
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="section|sect1|simplesect|refentry
+    <xsl:with-param name="nodes" select="section|sect1
+                                         |simplesect[$simplesect.in.toc != 0]
+                                         |refentry
                                          |glossary|bibliography|index
                                          |bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
index e1b89ed37266b282b83c8c57e62f7793f664d341..c42256b02978df5269e2e8ad68d275298f549a1a 100644 (file)
 <!ENTITY eclipse.plugin.provider SYSTEM "../params/eclipse.plugin.provider.xml">
 <!ENTITY insert.xref.page.number SYSTEM "../params/insert.xref.page.number.xml">
 <!ENTITY component.label.includes.part.label SYSTEM "../params/component.label.includes.part.label.xml">
+<!ENTITY simplesect.in.toc SYSTEM "../params/simplesect.in.toc.xml">
index 3dd3880acff16de5ef37a46e300d8dead5ec842f..ecdab3cdfbf79603b384efd20b0b9c47b95701a0 100644 (file)
@@ -94,6 +94,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &process.source.toc;
 &process.empty.source.toc;
 &bridgehead.in.toc;
+&simplesect.in.toc;
 &manual.toc;
 &toc.list.type;
 &toc.section.depth;
@@ -648,6 +649,7 @@ around all these parameters.</para>
 <src:fragref linkend="shade.verbatim.style.frag"/>
 <src:fragref linkend="show.comments.frag"/>
 <src:fragref linkend="show.revisionflag.frag"/>
+<src:fragref linkend="simplesect.in.toc.frag"/>
 <src:fragref linkend="spacing.paras.frag"/>
 <src:fragref linkend="suppress.footer.navigation.frag"/>
 <src:fragref linkend="suppress.header.navigation.frag"/>
diff --git a/xsl/params/simplesect.in.toc.xml b/xsl/params/simplesect.in.toc.xml
new file mode 100644 (file)
index 0000000..8d19e0b
--- /dev/null
@@ -0,0 +1,21 @@
+<refentry id="simplesect.in.toc">
+<refmeta>
+<refentrytitle>simplesect.in.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>simplesect.in.toc</refname>
+<refpurpose>Should <sgmltag>simplesect</sgmltag> elements appear in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='simplesect.in.toc.frag'><xsl:param name="simplesect.in.toc" select="0"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>simplesect</sgmltag>s appear in the TOC.
+</para>
+
+</refsect1>
+</refentry>