source: stylesheets/xhtml/lfs-toc.xsl@ c8ba565

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since c8ba565 was 0c43171, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • Adding the forgotten stylesheets

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3436 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • 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.