source: stylesheets/xhtml/blfs-toc.xsl@ ae8a3e4

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 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 v5_1 v5_1-pre1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since ae8a3e4 was ae8a3e4, checked in by Larry Lawrence <larry@…>, 20 years ago

updated stylesheets to match LFS

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

  • Property mode set to 100644
File size: 3.7 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<!-- Version 0.8.0 - Manuel Canales Esparcia <macana@lfs-es.org> -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns="http://www.w3.org/1999/xhtml"
7 version="1.0">
8
9
10<!--TOC stuff-->
11 <xsl:param name="generate.toc">
12 appendix toc
13 book toc,title,figure,table,example,equation
14 chapter nop
15 part toc
16 preface nop
17 qandadiv nop
18 qandaset nop
19 reference nop
20 sect1 nop
21 sect2 nop
22 sect3 nop
23 sect4 nop
24 sect5 nop
25 section nop
26 set nop
27 </xsl:param>
28
29 <xsl:param name="toc.section.depth">1</xsl:param>
30
31 <xsl:param name="toc.max.depth">3</xsl:param>
32
33 <!-- Type of list-->
34 <xsl:param name="toc.list.type">ul</xsl:param>
35
36 <!--Adding the h* tags and dropping redundats links-->
37 <xsl:template name="toc.line">
38 <xsl:param name="toc-context" select="."/>
39 <xsl:param name="depth" select="1"/>
40 <xsl:param name="depth.from.context" select="8"/>
41 <xsl:choose>
42 <xsl:when test="local-name(.) = 'sect1'">
43 <span>
44 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
45 <a>
46 <xsl:attribute name="href">
47 <xsl:call-template name="href.target">
48 <xsl:with-param name="context" select="$toc-context"/>
49 </xsl:call-template>
50 </xsl:attribute>
51 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
52 </a>
53 </span>
54 </xsl:when>
55 <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
56 <h4>
57 <span>
58 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
59 <xsl:variable name="label">
60 <xsl:apply-templates select="." mode="label.markup"/>
61 </xsl:variable>
62 <xsl:copy-of select="$label"/>
63 <xsl:if test="$label != ''">
64 <xsl:value-of select="$autotoc.label.separator"/>
65 </xsl:if>
66 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
67 </span>
68 </h4>
69 </xsl:when>
70 <xsl:when test="local-name(.) = 'part'">
71 <h3>
72 <span>
73 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
74 <xsl:variable name="label">
75 <xsl:apply-templates select="." mode="label.markup"/>
76 </xsl:variable>
77 <xsl:copy-of select="$label"/>
78 <xsl:if test="$label != ''">
79 <xsl:value-of select="$autotoc.label.separator"/>
80 </xsl:if>
81 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
82 </span>
83 </h3>
84 </xsl:when>
85 <xsl:otherwise>
86 <h3>
87 <span>
88 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
89 <a>
90 <xsl:attribute name="href">
91 <xsl:call-template name="href.target">
92 <xsl:with-param name="context" select="$toc-context"/>
93 </xsl:call-template>
94 </xsl:attribute>
95 <xsl:variable name="label">
96 <xsl:apply-templates select="." mode="label.markup"/>
97 </xsl:variable>
98 <xsl:copy-of select="$label"/>
99 <xsl:if test="$label != ''">
100 <xsl:value-of select="$autotoc.label.separator"/>
101 </xsl:if>
102 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
103 </a>
104 </span>
105 </h3>
106 </xsl:otherwise>
107 </xsl:choose>
108 </xsl:template>
109
110</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.