source: stylesheets/lfs-xsl/xhtml/lfs-sections.xsl@ 25332b5

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 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 25332b5 was 25332b5, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Add comments to the kernel section to change the unwinder option.
Update to linux-4.14.10.
Update to coreutils-8.29.
Remove old footer from non-chunks book.
Make spacing between "Chapter" and digit non breaking.

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

  • Property mode set to 100644
File size: 5.9 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<!--
4$LastChangedBy$
5$Date$
6-->
7
8<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns="http://www.w3.org/1999/xhtml"
10 version="1.0">
11
12 <!-- This stylesheet controls how preface, chapter, and sections are handled -->
13
14 <!-- Chunk the first top-level section? 1 = yes, 0 = no
15 If preface and chapters TOC are generated, this must be 1. -->
16 <xsl:param name="chunk.first.sections" select="1"/>
17
18 <!-- preface:
19 Output non sect1 child elements before the TOC -->
20 <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
21 <xsl:template match="preface">
22 <xsl:call-template name="id.warning"/>
23 <div>
24 <xsl:apply-templates select="." mode="class.attribute"/>
25 <xsl:call-template name="dir">
26 <xsl:with-param name="inherit" select="1"/>
27 </xsl:call-template>
28 <xsl:call-template name="language.attribute"/>
29 <xsl:if test="$generate.id.attributes != 0">
30 <xsl:attribute name="id">
31 <xsl:call-template name="object.id"/>
32 </xsl:attribute>
33 </xsl:if>
34 <xsl:call-template name="component.separator"/>
35 <xsl:call-template name="preface.titlepage"/>
36 <xsl:apply-templates/>
37 <xsl:variable name="toc.params">
38 <xsl:call-template name="find.path.params">
39 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
40 </xsl:call-template>
41 </xsl:variable>
42 <xsl:if test="contains($toc.params, 'toc')">
43 <xsl:call-template name="component.toc">
44 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
45 </xsl:call-template>
46 <xsl:call-template name="component.toc.separator"/>
47 </xsl:if>
48 <xsl:call-template name="process.footnotes"/>
49 </div>
50 </xsl:template>
51
52 <!-- chapter:
53 Output non sect1 child elements before the TOC -->
54 <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
55 <xsl:template match="chapter">
56 <xsl:call-template name="id.warning"/>
57 <div>
58 <xsl:apply-templates select="." mode="class.attribute"/>
59 <xsl:call-template name="dir">
60 <xsl:with-param name="inherit" select="1"/>
61 </xsl:call-template>
62 <xsl:call-template name="language.attribute"/>
63 <xsl:if test="$generate.id.attributes != 0">
64 <xsl:attribute name="id">
65 <xsl:call-template name="object.id"/>
66 </xsl:attribute>
67 </xsl:if>
68 <xsl:call-template name="component.separator"/>
69 <xsl:call-template name="chapter.titlepage"/>
70 <xsl:apply-templates/>
71 <xsl:variable name="toc.params">
72 <xsl:call-template name="find.path.params">
73 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
74 </xsl:call-template>
75 </xsl:variable>
76 <xsl:if test="contains($toc.params, 'toc')">
77 <xsl:call-template name="component.toc">
78 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
79 </xsl:call-template>
80 <xsl:call-template name="component.toc.separator"/>
81 </xsl:if>
82 <xsl:call-template name="process.footnotes"/>
83 </div>
84 </xsl:template>
85
86 <!-- sect1:
87 When there is a role attibute, use it as the class value.
88 Process the SVN keywords found in sect1info as a footnote.
89 Removed unused code. -->
90 <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
91 <xsl:template match="sect1">
92 <div>
93 <xsl:choose>
94 <xsl:when test="@role">
95 <xsl:attribute name="class">
96 <xsl:value-of select="@role"/>
97 </xsl:attribute>
98 </xsl:when>
99 <xsl:otherwise>
100 <xsl:apply-templates select="." mode="class.attribute"/>
101 </xsl:otherwise>
102 </xsl:choose>
103 <xsl:call-template name="language.attribute"/>
104 <xsl:call-template name="sect1.titlepage"/>
105 <xsl:apply-templates/>
106 <xsl:apply-templates select="sect1info" mode="svn-keys"/>
107 </div>
108 </xsl:template>
109
110 <!-- sect2:
111 When there is a role attibute, use it as the class value.
112 Removed unused code. -->
113 <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
114 <xsl:template match="sect2">
115 <div>
116 <xsl:choose>
117 <xsl:when test="@role">
118 <xsl:attribute name="class">
119 <xsl:value-of select="@role"/>
120 </xsl:attribute>
121 </xsl:when>
122 <xsl:otherwise>
123 <xsl:attribute name="class">
124 <xsl:value-of select="name(.)"/>
125 </xsl:attribute>
126 </xsl:otherwise>
127 </xsl:choose>
128 <xsl:call-template name="language.attribute"/>
129 <xsl:call-template name="sect2.titlepage"/>
130 <xsl:apply-templates/>
131 </div>
132 </xsl:template>
133
134 <!-- sect1info mode svn-keys:
135 Self-made template to process SVN keywords found in sect1info. -->
136 <xsl:template match="sect1info" mode="svn-keys">
137 <!-- <p class="updated">Last updated --><!-- by
138 <xsl:apply-templates select="othername" mode="svn-keys"/> -->
139 <!-- on
140 <xsl:apply-templates select="date" mode="svn-keys"/>
141 </p>
142comment out entire template for now. We do not use this. bdubbs 2017/12/30 -->
143 </xsl:template>
144
145 <!-- othername mode svn-keys:
146 Self-made template to process the $LastChangedBy SVN keyword. -->
147 <xsl:template match="othername" mode="svn-keys">
148 <xsl:variable name="author">
149 <xsl:value-of select="."/>
150 </xsl:variable>
151 <xsl:variable name="nameonly">
152 <xsl:value-of select="substring($author,16)"/>
153 </xsl:variable>
154 <xsl:value-of select="substring-before($nameonly,'$')"/>
155 </xsl:template>
156
157 <!-- date mode svn-keys:
158 Self-made template to process the $Date SVN keyword. -->
159 <xsl:template match="date" mode="svn-keys">
160 <xsl:variable name="date">
161 <xsl:value-of select="."/>
162 </xsl:variable>
163 <xsl:value-of select="substring($date,7,26)"/>
164 </xsl:template>
165
166</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.