1 <?xml version="1.0" encoding="ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
6 <!-- ********************************************************************
7 $Id: maketoc.xsl 6910 2007-06-28 23:23:30Z xmldoc $
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://docbook.sf.net/release/xsl/current/ for
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:import href="docbook.xsl"/>
19 <xsl:import href="chunk.xsl"/>
21 <xsl:output method="xml" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
23 <xsl:param name="toc.list.type" select="'tocentry'"/>
25 <!-- refentry in autotoc.xsl does not use subtoc, so must
26 handle it explicitly here. -->
27 <xsl:template match="refentry" mode="toc">
28 <xsl:param name="toc-context" select="."/>
30 <xsl:call-template name="subtoc">
31 <xsl:with-param name="toc-context" select="$toc-context"/>
36 <xsl:template name="subtoc">
37 <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
38 <xsl:variable name="filename">
39 <xsl:apply-templates select="." mode="chunk-filename"/>
42 <xsl:variable name="chunk">
43 <xsl:call-template name="chunk"/>
46 <xsl:if test="$chunk != 0">
47 <xsl:call-template name="indent-spaces"/>
48 <xsl:variable name="id">
49 <xsl:call-template name="object.id"/>
51 <tocentry linkend="{$id}">
52 <xsl:processing-instruction name="dbhtml">
53 <xsl:text>filename="</xsl:text>
54 <xsl:value-of select="$filename"/>
55 <xsl:text>"</xsl:text>
56 </xsl:processing-instruction>
59 <xsl:apply-templates mode="toc" select="$nodes"/>
60 <xsl:call-template name="indent-spaces"/>
67 <xsl:template name="indent-spaces">
68 <xsl:param name="node" select="."/>
69 <xsl:text> </xsl:text>
70 <xsl:if test="$node/parent::*">
71 <xsl:call-template name="indent-spaces">
72 <xsl:with-param name="node" select="$node/parent::*"/>
77 <!-- ==================================================================== -->
79 <xsl:template match="/" priority="-1">
82 <toc role="chunk-toc">
85 <xsl:apply-templates select="/" mode="toc"/>