source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/sections.xsl@ 15c7d39

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 7.5 7.6 7.7 7.8 7.9 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 15c7d39 was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

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

  • Property mode set to 100644
File size: 22.7 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: sections.xsl 9392 2012-06-02 20:10:58Z bobstayton $
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="section">
19 <xsl:variable name="depth" select="count(ancestor::section)+1"/>
20
21 <xsl:call-template name="id.warning"/>
22
23 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
24 <xsl:call-template name="common.html.attributes">
25 <xsl:with-param name="inherit" select="1"/>
26 </xsl:call-template>
27 <xsl:call-template name="id.attribute">
28 <xsl:with-param name="conditional" select="0"/>
29 </xsl:call-template>
30 <xsl:call-template name="section.titlepage"/>
31
32 <xsl:variable name="toc.params">
33 <xsl:call-template name="find.path.params">
34 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
35 </xsl:call-template>
36 </xsl:variable>
37
38 <xsl:if test="contains($toc.params, 'toc') and $depth &lt;= $generate.section.toc.level">
39 <xsl:call-template name="section.toc">
40 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
41 </xsl:call-template>
42 <xsl:call-template name="section.toc.separator"/>
43 </xsl:if>
44 <xsl:apply-templates/>
45 <xsl:call-template name="process.chunk.footnotes"/>
46 </xsl:element>
47</xsl:template>
48
49<xsl:template name="section.title">
50 <!-- the context node should be the title of a section when called -->
51 <xsl:variable name="section" select="(ancestor::section |ancestor::simplesect |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5)[last()]"/>
52
53 <xsl:variable name="renderas">
54 <xsl:choose>
55 <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when>
56 <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when>
57 <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when>
58 <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when>
59 <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when>
60 <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
61 </xsl:choose>
62 </xsl:variable>
63
64 <xsl:variable name="level">
65 <xsl:choose>
66 <xsl:when test="$renderas != ''">
67 <xsl:value-of select="$renderas"/>
68 </xsl:when>
69 <xsl:otherwise>
70 <xsl:call-template name="section.level">
71 <xsl:with-param name="node" select="$section"/>
72 </xsl:call-template>
73 </xsl:otherwise>
74 </xsl:choose>
75 </xsl:variable>
76
77 <xsl:call-template name="section.heading">
78 <xsl:with-param name="section" select="$section"/>
79 <xsl:with-param name="level" select="$level"/>
80 <xsl:with-param name="title">
81 <xsl:apply-templates select="$section" mode="object.title.markup">
82 <xsl:with-param name="allow-anchors" select="1"/>
83 </xsl:apply-templates>
84 </xsl:with-param>
85 </xsl:call-template>
86</xsl:template>
87
88<xsl:template match="section/title |section/info/title |sectioninfo/title" mode="titlepage.mode" priority="2">
89 <xsl:call-template name="section.title"/>
90</xsl:template>
91
92<xsl:template match="sect1">
93 <xsl:call-template name="id.warning"/>
94
95 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
96 <xsl:call-template name="common.html.attributes">
97 <xsl:with-param name="inherit" select="1"/>
98 </xsl:call-template>
99 <xsl:call-template name="id.attribute">
100 <xsl:with-param name="conditional" select="0"/>
101 </xsl:call-template>
102
103 <xsl:choose>
104 <xsl:when test="@renderas = 'sect2'">
105 <xsl:call-template name="sect2.titlepage"/>
106 </xsl:when>
107 <xsl:when test="@renderas = 'sect3'">
108 <xsl:call-template name="sect3.titlepage"/>
109 </xsl:when>
110 <xsl:when test="@renderas = 'sect4'">
111 <xsl:call-template name="sect4.titlepage"/>
112 </xsl:when>
113 <xsl:when test="@renderas = 'sect5'">
114 <xsl:call-template name="sect5.titlepage"/>
115 </xsl:when>
116 <xsl:otherwise>
117 <xsl:call-template name="sect1.titlepage"/>
118 </xsl:otherwise>
119 </xsl:choose>
120
121 <xsl:variable name="toc.params">
122 <xsl:call-template name="find.path.params">
123 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
124 </xsl:call-template>
125 </xsl:variable>
126
127 <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level &gt;= 1">
128 <xsl:call-template name="section.toc">
129 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
130 </xsl:call-template>
131 <xsl:call-template name="section.toc.separator"/>
132 </xsl:if>
133 <xsl:apply-templates/>
134 <xsl:call-template name="process.chunk.footnotes"/>
135 </xsl:element>
136</xsl:template>
137
138<xsl:template match="sect1/title |sect1/info/title |sect1info/title" mode="titlepage.mode" priority="2">
139 <xsl:call-template name="section.title"/>
140</xsl:template>
141
142<xsl:template match="sect2">
143 <xsl:call-template name="id.warning"/>
144
145 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
146 <xsl:call-template name="common.html.attributes">
147 <xsl:with-param name="inherit" select="1"/>
148 </xsl:call-template>
149 <xsl:call-template name="id.attribute">
150 <xsl:with-param name="conditional" select="0"/>
151 </xsl:call-template>
152
153 <xsl:choose>
154 <xsl:when test="@renderas = 'sect1'">
155 <xsl:call-template name="sect1.titlepage"/>
156 </xsl:when>
157 <xsl:when test="@renderas = 'sect3'">
158 <xsl:call-template name="sect3.titlepage"/>
159 </xsl:when>
160 <xsl:when test="@renderas = 'sect4'">
161 <xsl:call-template name="sect4.titlepage"/>
162 </xsl:when>
163 <xsl:when test="@renderas = 'sect5'">
164 <xsl:call-template name="sect5.titlepage"/>
165 </xsl:when>
166 <xsl:otherwise>
167 <xsl:call-template name="sect2.titlepage"/>
168 </xsl:otherwise>
169 </xsl:choose>
170
171 <xsl:variable name="toc.params">
172 <xsl:call-template name="find.path.params">
173 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
174 </xsl:call-template>
175 </xsl:variable>
176
177 <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level &gt;= 2">
178 <xsl:call-template name="section.toc">
179 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
180 </xsl:call-template>
181 <xsl:call-template name="section.toc.separator"/>
182 </xsl:if>
183 <xsl:apply-templates/>
184 <xsl:call-template name="process.chunk.footnotes"/>
185 </xsl:element>
186</xsl:template>
187
188<xsl:template match="sect2/title |sect2/info/title |sect2info/title" mode="titlepage.mode" priority="2">
189 <xsl:call-template name="section.title"/>
190</xsl:template>
191
192<xsl:template match="sect3">
193 <xsl:call-template name="id.warning"/>
194
195 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
196 <xsl:call-template name="common.html.attributes">
197 <xsl:with-param name="inherit" select="1"/>
198 </xsl:call-template>
199 <xsl:call-template name="id.attribute">
200 <xsl:with-param name="conditional" select="0"/>
201 </xsl:call-template>
202
203 <xsl:choose>
204 <xsl:when test="@renderas = 'sect1'">
205 <xsl:call-template name="sect1.titlepage"/>
206 </xsl:when>
207 <xsl:when test="@renderas = 'sect2'">
208 <xsl:call-template name="sect2.titlepage"/>
209 </xsl:when>
210 <xsl:when test="@renderas = 'sect4'">
211 <xsl:call-template name="sect4.titlepage"/>
212 </xsl:when>
213 <xsl:when test="@renderas = 'sect5'">
214 <xsl:call-template name="sect5.titlepage"/>
215 </xsl:when>
216 <xsl:otherwise>
217 <xsl:call-template name="sect3.titlepage"/>
218 </xsl:otherwise>
219 </xsl:choose>
220
221 <xsl:variable name="toc.params">
222 <xsl:call-template name="find.path.params">
223 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
224 </xsl:call-template>
225 </xsl:variable>
226
227 <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level &gt;= 3">
228 <xsl:call-template name="section.toc">
229 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
230 </xsl:call-template>
231 <xsl:call-template name="section.toc.separator"/>
232 </xsl:if>
233 <xsl:apply-templates/>
234 <xsl:call-template name="process.chunk.footnotes"/>
235 </xsl:element>
236</xsl:template>
237
238<xsl:template match="sect3/title |sect3/info/title |sect3info/title" mode="titlepage.mode" priority="2">
239 <xsl:call-template name="section.title"/>
240</xsl:template>
241
242<xsl:template match="sect4">
243 <xsl:call-template name="id.warning"/>
244
245 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
246 <xsl:call-template name="common.html.attributes">
247 <xsl:with-param name="inherit" select="1"/>
248 </xsl:call-template>
249 <xsl:call-template name="id.attribute">
250 <xsl:with-param name="conditional" select="0"/>
251 </xsl:call-template>
252
253 <xsl:choose>
254 <xsl:when test="@renderas = 'sect1'">
255 <xsl:call-template name="sect1.titlepage"/>
256 </xsl:when>
257 <xsl:when test="@renderas = 'sect2'">
258 <xsl:call-template name="sect2.titlepage"/>
259 </xsl:when>
260 <xsl:when test="@renderas = 'sect3'">
261 <xsl:call-template name="sect3.titlepage"/>
262 </xsl:when>
263 <xsl:when test="@renderas = 'sect5'">
264 <xsl:call-template name="sect5.titlepage"/>
265 </xsl:when>
266 <xsl:otherwise>
267 <xsl:call-template name="sect4.titlepage"/>
268 </xsl:otherwise>
269 </xsl:choose>
270
271 <xsl:variable name="toc.params">
272 <xsl:call-template name="find.path.params">
273 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
274 </xsl:call-template>
275 </xsl:variable>
276
277 <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level &gt;= 4">
278 <xsl:call-template name="section.toc">
279 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
280 </xsl:call-template>
281 <xsl:call-template name="section.toc.separator"/>
282 </xsl:if>
283 <xsl:apply-templates/>
284 <xsl:call-template name="process.chunk.footnotes"/>
285 </xsl:element>
286</xsl:template>
287
288<xsl:template match="sect4/title |sect4/info/title |sect4info/title" mode="titlepage.mode" priority="2">
289 <xsl:call-template name="section.title"/>
290</xsl:template>
291
292<xsl:template match="sect5">
293 <xsl:call-template name="id.warning"/>
294
295 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
296 <xsl:call-template name="common.html.attributes">
297 <xsl:with-param name="inherit" select="1"/>
298 </xsl:call-template>
299 <xsl:call-template name="id.attribute">
300 <xsl:with-param name="conditional" select="0"/>
301 </xsl:call-template>
302
303 <xsl:choose>
304 <xsl:when test="@renderas = 'sect1'">
305 <xsl:call-template name="sect1.titlepage"/>
306 </xsl:when>
307 <xsl:when test="@renderas = 'sect2'">
308 <xsl:call-template name="sect2.titlepage"/>
309 </xsl:when>
310 <xsl:when test="@renderas = 'sect3'">
311 <xsl:call-template name="sect3.titlepage"/>
312 </xsl:when>
313 <xsl:when test="@renderas = 'sect4'">
314 <xsl:call-template name="sect4.titlepage"/>
315 </xsl:when>
316 <xsl:otherwise>
317 <xsl:call-template name="sect5.titlepage"/>
318 </xsl:otherwise>
319 </xsl:choose>
320
321 <xsl:variable name="toc.params">
322 <xsl:call-template name="find.path.params">
323 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
324 </xsl:call-template>
325 </xsl:variable>
326
327 <xsl:if test="contains($toc.params, 'toc') and $generate.section.toc.level &gt;= 5">
328 <xsl:call-template name="section.toc">
329 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
330 </xsl:call-template>
331 <xsl:call-template name="section.toc.separator"/>
332 </xsl:if>
333 <xsl:apply-templates/>
334 <xsl:call-template name="process.chunk.footnotes"/>
335 </xsl:element>
336</xsl:template>
337
338<xsl:template match="sect5/title |sect5/info/title |sect5info/title" mode="titlepage.mode" priority="2">
339 <xsl:call-template name="section.title"/>
340</xsl:template>
341
342<xsl:template match="simplesect">
343 <xsl:call-template name="id.warning"/>
344
345 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
346 <xsl:call-template name="common.html.attributes">
347 <xsl:with-param name="inherit" select="1"/>
348 </xsl:call-template>
349 <xsl:call-template name="id.attribute">
350 <xsl:with-param name="conditional" select="0"/>
351 </xsl:call-template>
352
353 <xsl:call-template name="simplesect.titlepage"/>
354 <xsl:apply-templates/>
355 </xsl:element>
356</xsl:template>
357
358<xsl:template match="simplesect/title|simplesect/info/title" mode="titlepage.mode" priority="2">
359 <xsl:call-template name="section.title"/>
360</xsl:template>
361
362<xsl:template match="section/title"/>
363<xsl:template match="section/titleabbrev"/>
364<xsl:template match="section/subtitle"/>
365<xsl:template match="sectioninfo"/>
366<xsl:template match="section/info"/>
367
368<xsl:template match="sect1/title"/>
369<xsl:template match="sect1/titleabbrev"/>
370<xsl:template match="sect1/subtitle"/>
371<xsl:template match="sect1info"/>
372<xsl:template match="sect1/info"/>
373
374<xsl:template match="sect2/title"/>
375<xsl:template match="sect2/subtitle"/>
376<xsl:template match="sect2/titleabbrev"/>
377<xsl:template match="sect2info"/>
378<xsl:template match="sect2/info"/>
379
380<xsl:template match="sect3/title"/>
381<xsl:template match="sect3/subtitle"/>
382<xsl:template match="sect3/titleabbrev"/>
383<xsl:template match="sect3info"/>
384<xsl:template match="sect3/info"/>
385
386<xsl:template match="sect4/title"/>
387<xsl:template match="sect4/subtitle"/>
388<xsl:template match="sect4/titleabbrev"/>
389<xsl:template match="sect4info"/>
390<xsl:template match="sect4/info"/>
391
392<xsl:template match="sect5/title"/>
393<xsl:template match="sect5/subtitle"/>
394<xsl:template match="sect5/titleabbrev"/>
395<xsl:template match="sect5info"/>
396<xsl:template match="sect5/info"/>
397
398<xsl:template match="simplesect/title"/>
399<xsl:template match="simplesect/subtitle"/>
400<xsl:template match="simplesect/titleabbrev"/>
401<xsl:template match="simplesect/info"/>
402
403<!-- ==================================================================== -->
404
405<xsl:template name="section.heading">
406 <xsl:param name="section" select="."/>
407 <xsl:param name="level" select="1"/>
408 <xsl:param name="allow-anchors" select="1"/>
409 <xsl:param name="title"/>
410 <xsl:param name="class" select="'title'"/>
411
412 <xsl:variable name="id">
413 <xsl:choose>
414 <!-- Make sure the subtitle doesn't get the same id as the title -->
415 <xsl:when test="self::subtitle">
416 <xsl:call-template name="object.id">
417 <xsl:with-param name="object" select="."/>
418 </xsl:call-template>
419 </xsl:when>
420 <!-- if title is in an *info wrapper, get the grandparent -->
421 <xsl:when test="contains(local-name(..), 'info')">
422 <xsl:call-template name="object.id">
423 <xsl:with-param name="object" select="../.."/>
424 </xsl:call-template>
425 </xsl:when>
426 <xsl:otherwise>
427 <xsl:call-template name="object.id">
428 <xsl:with-param name="object" select=".."/>
429 </xsl:call-template>
430 </xsl:otherwise>
431 </xsl:choose>
432 </xsl:variable>
433
434 <!-- HTML H level is one higher than section level -->
435 <xsl:variable name="hlevel">
436 <xsl:choose>
437 <!-- highest valid HTML H level is H6; so anything nested deeper
438 than 5 levels down just becomes H6 -->
439 <xsl:when test="$level &gt; 5">6</xsl:when>
440 <xsl:otherwise>
441 <xsl:value-of select="$level + 1"/>
442 </xsl:otherwise>
443 </xsl:choose>
444 </xsl:variable>
445 <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
446 <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
447 <xsl:if test="$css.decoration != '0'">
448 <xsl:if test="$hlevel&lt;3">
449 <xsl:attribute name="style">clear: both</xsl:attribute>
450 </xsl:if>
451 </xsl:if>
452 <xsl:if test="$allow-anchors != 0">
453 <xsl:call-template name="anchor">
454 <xsl:with-param name="node" select="$section"/>
455 <xsl:with-param name="conditional" select="0"/>
456 </xsl:call-template>
457 </xsl:if>
458 <xsl:copy-of select="$title"/>
459 </xsl:element>
460</xsl:template>
461
462<!-- ==================================================================== -->
463
464<xsl:template match="bridgehead">
465 <xsl:variable name="container" select="(ancestor::appendix |ancestor::article |ancestor::bibliography |ancestor::chapter |ancestor::glossary |ancestor::glossdiv |ancestor::index |ancestor::partintro |ancestor::preface |ancestor::refsect1 |ancestor::refsect2 |ancestor::refsect3 |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 |ancestor::section |ancestor::setindex |ancestor::simplesect)[last()]"/>
466
467 <xsl:variable name="clevel">
468 <xsl:choose>
469 <xsl:when test="local-name($container) = 'appendix' or local-name($container) = 'chapter' or local-name($container) = 'article' or local-name($container) = 'bibliography' or local-name($container) = 'glossary' or local-name($container) = 'index' or local-name($container) = 'partintro' or local-name($container) = 'preface' or local-name($container) = 'setindex'">1</xsl:when>
470 <xsl:when test="local-name($container) = 'glossdiv'">
471 <xsl:value-of select="count(ancestor::glossdiv)+1"/>
472 </xsl:when>
473 <xsl:when test="local-name($container) = 'sect1' or local-name($container) = 'sect2' or local-name($container) = 'sect3' or local-name($container) = 'sect4' or local-name($container) = 'sect5' or local-name($container) = 'refsect1' or local-name($container) = 'refsect2' or local-name($container) = 'refsect3' or local-name($container) = 'section' or local-name($container) = 'simplesect'">
474 <xsl:variable name="slevel">
475 <xsl:call-template name="section.level">
476 <xsl:with-param name="node" select="$container"/>
477 </xsl:call-template>
478 </xsl:variable>
479 <xsl:value-of select="$slevel + 1"/>
480 </xsl:when>
481 <xsl:otherwise>1</xsl:otherwise>
482 </xsl:choose>
483 </xsl:variable>
484
485 <!-- HTML H level is one higher than section level -->
486 <xsl:variable name="hlevel">
487 <xsl:choose>
488 <xsl:when test="@renderas = 'sect1'">2</xsl:when>
489 <xsl:when test="@renderas = 'sect2'">3</xsl:when>
490 <xsl:when test="@renderas = 'sect3'">4</xsl:when>
491 <xsl:when test="@renderas = 'sect4'">5</xsl:when>
492 <xsl:when test="@renderas = 'sect5'">6</xsl:when>
493 <xsl:otherwise>
494 <xsl:value-of select="$clevel + 1"/>
495 </xsl:otherwise>
496 </xsl:choose>
497 </xsl:variable>
498
499 <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
500 <xsl:call-template name="id.attribute">
501 <xsl:with-param name="conditional" select="0"/>
502 </xsl:call-template>
503 <xsl:call-template name="anchor">
504 <xsl:with-param name="conditional" select="0"/>
505 </xsl:call-template>
506 <xsl:apply-templates/>
507 </xsl:element>
508</xsl:template>
509
510<xsl:template match="section/subtitle" mode="titlepage.mode" priority="2">
511 <xsl:call-template name="section.subtitle"/>
512</xsl:template>
513
514<xsl:template match="simplesect/subtitle" mode="titlepage.mode" priority="2">
515 <xsl:call-template name="section.subtitle"/>
516</xsl:template>
517
518<xsl:template match="sect1/subtitle" mode="titlepage.mode" priority="2">
519 <xsl:call-template name="section.subtitle"/>
520</xsl:template>
521
522<xsl:template match="sect2/subtitle" mode="titlepage.mode" priority="2">
523 <xsl:call-template name="section.subtitle"/>
524</xsl:template>
525
526<xsl:template match="sect3/subtitle" mode="titlepage.mode" priority="2">
527 <xsl:call-template name="section.subtitle"/>
528</xsl:template>
529
530<xsl:template match="sect4/subtitle" mode="titlepage.mode" priority="2">
531 <xsl:call-template name="section.subtitle"/>
532</xsl:template>
533
534<xsl:template match="sect5/subtitle" mode="titlepage.mode" priority="2">
535 <xsl:call-template name="section.subtitle"/>
536</xsl:template>
537
538<xsl:template name="section.subtitle">
539 <!-- the context node should be the subtitle of a section when called -->
540 <xsl:variable name="section" select="(ancestor::section |ancestor::simplesect |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5)[last()]"/>
541
542 <xsl:variable name="level">
543 <xsl:call-template name="section.level">
544 <xsl:with-param name="node" select="$section"/>
545 </xsl:call-template>
546 </xsl:variable>
547
548 <xsl:call-template name="section.heading">
549 <xsl:with-param name="section" select=".."/>
550 <xsl:with-param name="allow-anchors" select="0"/>
551 <!-- subtitle heading level one higher than section level -->
552 <xsl:with-param name="level" select="$level + 1"/>
553 <xsl:with-param name="class" select="'subtitle'"/>
554 <xsl:with-param name="title">
555 <xsl:apply-templates select="$section" mode="object.subtitle.markup">
556 <xsl:with-param name="allow-anchors" select="0"/>
557 </xsl:apply-templates>
558 </xsl:with-param>
559 </xsl:call-template>
560</xsl:template>
561
562</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.