]> granicus.if.org Git - docbook-dsssl/commitdiff
Added paramater toc.max.depth which controls maximal depth of ToC as requested by...
authorJirka Kosek <jirka@kosek.cz>
Fri, 7 Feb 2003 10:11:30 +0000 (10:11 +0000)
committerJirka Kosek <jirka@kosek.cz>
Fri, 7 Feb 2003 10:11:30 +0000 (10:11 +0000)
xsl/html/Makefile.param
xsl/html/autotoc.xsl
xsl/html/param.ent
xsl/html/param.xweb
xsl/params/toc.max.depth.xml [new file with mode: 0644]

index 9b5a5ed6348fabf4e853f103ece10abe2b3fe274..8fa48e860b651947441f23fa7d27d2cfe9cccef7 100644 (file)
@@ -194,6 +194,7 @@ PARAMS=../params/admon.graphics.xml \
        ../params/textinsert.extension.xml \
        ../params/toc.list.type.xml \
        ../params/toc.section.depth.xml \
+       ../params/toc.max.depth.xml \
        ../params/ulink.target.xml \
        ../params/use.embed.for.svg.xml \
        ../params/use.extensions.xml \
@@ -222,4 +223,12 @@ PARAMS=../params/admon.graphics.xml \
        ../params/table.cell.border.thickness.xml \
        ../params/table.frame.border.color.xml \
        ../params/table.frame.border.style.xml \
-       ../params/table.frame.border.thickness.xml
+       ../params/table.frame.border.thickness.xml \
+       ../params/ignore.image.scaling.xml \
+       ../params/footnote.number.format.xml \
+       ../params/table.footnote.number.format.xml \
+       ../params/footnote.number.symbols.xml \
+       ../params/table.footnote.number.symbols.xml \
+       ../params/entry.propagates.style.xml \
+       ../params/glossentry.show.acronym.xml \
+       ../params/xref.with.number.and.title.xml
index 820e7e61b0dde33fe64602f8bc074561c7ff41c7..3fd1a4da5bd01f653c78c1b1cb885e9b71a3ec35 100644 (file)
     </xsl:choose>
   </xsl:variable>
 
+  <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
   <xsl:variable name="subtoc.list">
     <xsl:choose>
       <xsl:when test="$toc.dd.type = ''">
       <xsl:apply-templates select="." mode="title.markup"/>
     </a>
     <xsl:if test="$toc.listitem.type = 'li'
-                  and $toc.section.depth > $depth and count($nodes)&gt;0">
+                  and $toc.section.depth > $depth and count($nodes)&gt;0
+                  and $toc.max.depth > $depth.from.context">
       <xsl:copy-of select="$subtoc.list"/>
     </xsl:if>
   </xsl:element>
   <xsl:if test="$toc.listitem.type != 'li'
-                and $toc.section.depth > $depth and count($nodes)&gt;0">
+                and $toc.section.depth > $depth and count($nodes)&gt;0
+                and $toc.max.depth > $depth.from.context">
     <xsl:copy-of select="$subtoc.list"/>
   </xsl:if>
 </xsl:template>
index a2bed3a4c0423cba8d54a6adaa0fb89280cddb98..d5df1edd974aa00bcd3919a27922241f59c03508 100644 (file)
 <!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml">
 <!ENTITY toc.list.type SYSTEM "../params/toc.list.type.xml">
 <!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml">
+<!ENTITY toc.max.depth SYSTEM "../params/toc.max.depth.xml">
 <!ENTITY ulink.target SYSTEM "../params/ulink.target.xml">
 <!ENTITY use.embed.for.svg SYSTEM "../params/use.embed.for.svg.xml">
 <!ENTITY use.extensions SYSTEM "../params/use.extensions.xml">
index 40016402b3acd378515d2dedd22081e870aed264..bd89ec7fe206aef444a689f753a7db94863307ea 100644 (file)
@@ -94,6 +94,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &manual.toc;
 &toc.list.type;
 &toc.section.depth;
+&toc.max.depth;
 &generate.toc;
 &generate.section.toc.level;
 &generate.index;
@@ -603,6 +604,7 @@ around all these parameters.</para>
 <src:fragref linkend="textinsert.extension.frag"/>
 <src:fragref linkend="toc.list.type.frag"/>
 <src:fragref linkend="toc.section.depth.frag"/>
+<src:fragref linkend="toc.max.depth.frag"/>
 <src:fragref linkend="ulink.target.frag"/>
 <src:fragref linkend="use.embed.for.svg.frag"/>
 <src:fragref linkend="use.extensions.frag"/>
diff --git a/xsl/params/toc.max.depth.xml b/xsl/params/toc.max.depth.xml
new file mode 100644 (file)
index 0000000..d96d026
--- /dev/null
@@ -0,0 +1,20 @@
+<refentry id="toc.max.depth">
+<refmeta>
+<refentrytitle>toc.max.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.max.depth</refname>
+<refpurpose>How maximaly deep should be each TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.max.depth.frag'><xsl:param name="toc.max.depth">8</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the maximal depth of TOC on all levels.</para>
+
+</refsect1>
+</refentry>