source: BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/division.xsl@ c9f6a00

clfs-3.0.0-systemd systemd
Last change on this file since c9f6a00 was f8c4e94, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS XSL Stylesheets.

  • Property mode set to 100644
File size: 7.2 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="http://www.w3.org/1999/xhtml" version="1.0">
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:template match="set">
19 <xsl:call-template name="id.warning"/>
20
21 <div>
22 <xsl:apply-templates select="." mode="class.attribute"/>
23 <xsl:call-template name="dir">
24 <xsl:with-param name="inherit" select="1"/>
25 </xsl:call-template>
26 <xsl:call-template name="language.attribute"/>
27 <xsl:if test="$generate.id.attributes != 0">
28 <xsl:attribute name="id">
29 <xsl:call-template name="object.id"/>
30 </xsl:attribute>
31 </xsl:if>
32
33 <xsl:call-template name="set.titlepage"/>
34
35 <xsl:variable name="toc.params">
36 <xsl:call-template name="find.path.params">
37 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
38 </xsl:call-template>
39 </xsl:variable>
40
41 <xsl:call-template name="make.lots">
42 <xsl:with-param name="toc.params" select="$toc.params"/>
43 <xsl:with-param name="toc">
44 <xsl:call-template name="set.toc">
45 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
46 </xsl:call-template>
47 </xsl:with-param>
48 </xsl:call-template>
49
50 <xsl:apply-templates/>
51 </div>
52</xsl:template>
53
54<xsl:template match="set/setinfo"/>
55<xsl:template match="set/title"/>
56<xsl:template match="set/titleabbrev"/>
57<xsl:template match="set/subtitle"/>
58
59<!-- ==================================================================== -->
60
61<xsl:template match="book">
62 <xsl:call-template name="id.warning"/>
63
64 <div>
65 <xsl:apply-templates select="." mode="class.attribute"/>
66 <xsl:call-template name="dir">
67 <xsl:with-param name="inherit" select="1"/>
68 </xsl:call-template>
69 <xsl:call-template name="language.attribute"/>
70 <xsl:if test="$generate.id.attributes != 0">
71 <xsl:attribute name="id">
72 <xsl:call-template name="object.id"/>
73 </xsl:attribute>
74 </xsl:if>
75
76 <xsl:call-template name="book.titlepage"/>
77
78 <xsl:apply-templates select="dedication" mode="dedication"/>
79
80 <xsl:variable name="toc.params">
81 <xsl:call-template name="find.path.params">
82 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
83 </xsl:call-template>
84 </xsl:variable>
85
86 <xsl:call-template name="make.lots">
87 <xsl:with-param name="toc.params" select="$toc.params"/>
88 <xsl:with-param name="toc">
89 <xsl:call-template name="division.toc">
90 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
91 </xsl:call-template>
92 </xsl:with-param>
93 </xsl:call-template>
94
95 <xsl:apply-templates/>
96 </div>
97</xsl:template>
98
99<xsl:template match="book/bookinfo"/>
100<xsl:template match="book/info"/>
101<xsl:template match="book/title"/>
102<xsl:template match="book/titleabbrev"/>
103<xsl:template match="book/subtitle"/>
104
105<!-- ==================================================================== -->
106
107<xsl:template match="part">
108 <xsl:call-template name="id.warning"/>
109
110 <div>
111 <xsl:apply-templates select="." mode="class.attribute"/>
112 <xsl:call-template name="dir">
113 <xsl:with-param name="inherit" select="1"/>
114 </xsl:call-template>
115 <xsl:call-template name="language.attribute"/>
116 <xsl:if test="$generate.id.attributes != 0">
117 <xsl:attribute name="id">
118 <xsl:call-template name="object.id"/>
119 </xsl:attribute>
120 </xsl:if>
121
122 <xsl:call-template name="part.titlepage"/>
123
124 <xsl:variable name="toc.params">
125 <xsl:call-template name="find.path.params">
126 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
127 </xsl:call-template>
128 </xsl:variable>
129 <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
130 <xsl:call-template name="division.toc"/>
131 </xsl:if>
132 <xsl:apply-templates/>
133 </div>
134</xsl:template>
135
136<xsl:template match="part" mode="make.part.toc">
137 <xsl:call-template name="division.toc"/>
138</xsl:template>
139
140<xsl:template match="reference" mode="make.part.toc">
141 <xsl:call-template name="division.toc"/>
142</xsl:template>
143
144<xsl:template match="part/docinfo"/>
145<xsl:template match="part/partinfo"/>
146<xsl:template match="part/info"/>
147<xsl:template match="part/title"/>
148<xsl:template match="part/titleabbrev"/>
149<xsl:template match="part/subtitle"/>
150
151<xsl:template match="partintro">
152 <xsl:call-template name="id.warning"/>
153
154 <div>
155 <xsl:apply-templates select="." mode="class.attribute"/>
156 <xsl:call-template name="dir">
157 <xsl:with-param name="inherit" select="1"/>
158 </xsl:call-template>
159 <xsl:call-template name="language.attribute"/>
160 <xsl:if test="$generate.id.attributes != 0">
161 <xsl:attribute name="id">
162 <xsl:call-template name="object.id"/>
163 </xsl:attribute>
164 </xsl:if>
165
166 <xsl:call-template name="partintro.titlepage"/>
167 <xsl:apply-templates/>
168
169 <xsl:variable name="toc.params">
170 <xsl:call-template name="find.path.params">
171 <xsl:with-param name="node" select="parent::*"/>
172 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
173 </xsl:call-template>
174 </xsl:variable>
175 <xsl:if test="contains($toc.params, 'toc')">
176 <!-- not ancestor::part because partintro appears in reference -->
177 <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
178 </xsl:if>
179 <xsl:call-template name="process.footnotes"/>
180 </div>
181</xsl:template>
182
183<xsl:template match="partintro/title"/>
184<xsl:template match="partintro/titleabbrev"/>
185<xsl:template match="partintro/subtitle"/>
186
187<xsl:template match="partintro/title" mode="partintro.title.mode">
188 <h2>
189 <xsl:apply-templates/>
190 </h2>
191</xsl:template>
192
193<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
194 <h3>
195 <i><xsl:apply-templates/></i>
196 </h3>
197</xsl:template>
198
199<!-- ==================================================================== -->
200
201<xsl:template match="book" mode="division.number">
202 <xsl:number from="set" count="book" format="1."/>
203</xsl:template>
204
205<xsl:template match="part" mode="division.number">
206 <xsl:number from="book" count="part" format="I."/>
207</xsl:template>
208
209<!-- ==================================================================== -->
210
211<xsl:template name="division.title">
212 <xsl:param name="node" select="."/>
213
214 <h1>
215 <xsl:attribute name="class">title</xsl:attribute>
216 <xsl:if test="$generate.id.attributes = 0">
217 <xsl:call-template name="anchor">
218 <xsl:with-param name="node" select="$node"/>
219 <xsl:with-param name="conditional" select="0"/>
220 </xsl:call-template>
221 </xsl:if>
222 <xsl:apply-templates select="$node" mode="object.title.markup">
223 <xsl:with-param name="allow-anchors" select="1"/>
224 </xsl:apply-templates>
225 </h1>
226</xsl:template>
227
228</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.