source: stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/maketoc.xsl@ 3c6bf83

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3c6bf83 was 65b2904, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS-XSL Stylesheets files.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6840 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.9 KB
Line 
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">
5
6<!-- ********************************************************************
7 $Id$
8 ********************************************************************
9
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.
13
14 ******************************************************************** -->
15
16<!-- ==================================================================== -->
17
18<xsl:import href="docbook.xsl"/>
19<xsl:import href="chunk.xsl"/>
20
21<xsl:output method="xml" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
22
23<xsl:param name="toc.list.type" select="'tocentry'"/>
24
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="."/>
29
30 <xsl:call-template name="subtoc">
31 <xsl:with-param name="toc-context" select="$toc-context"/>
32 </xsl:call-template>
33</xsl:template>
34
35
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"/>
40 </xsl:variable>
41
42 <xsl:variable name="chunk">
43 <xsl:call-template name="chunk"/>
44 </xsl:variable>
45
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"/>
50 </xsl:variable>
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>
57 <xsl:text>
58</xsl:text>
59 <xsl:apply-templates mode="toc" select="$nodes"/>
60 <xsl:call-template name="indent-spaces"/>
61 </tocentry>
62 <xsl:text>
63</xsl:text>
64 </xsl:if>
65</xsl:template>
66
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::*"/>
73 </xsl:call-template>
74 </xsl:if>
75</xsl:template>
76
77<!-- ==================================================================== -->
78
79<xsl:template match="/" priority="-1">
80 <xsl:text>
81</xsl:text>
82 <toc role="chunk-toc">
83 <xsl:text>
84</xsl:text>
85 <xsl:apply-templates select="/" mode="toc"/>
86 </toc>
87 <xsl:text>
88</xsl:text>
89</xsl:template>
90
91</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.