source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/fo/component.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: 33.8 KB
Line 
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
4 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
5 version='1.0'>
6
7<!-- ********************************************************************
8 $Id: component.xsl 9647 2012-10-26 17:42:03Z bobstayton $
9 ********************************************************************
10
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://docbook.sf.net/release/xsl/current/ for
13 copyright and other information.
14
15 ******************************************************************** -->
16
17<!-- ==================================================================== -->
18
19
20<xsl:template name="component.title">
21 <xsl:param name="node" select="."/>
22 <xsl:param name="pagewide" select="0"/>
23
24 <xsl:variable name="id">
25 <xsl:call-template name="object.id">
26 <xsl:with-param name="object" select="$node"/>
27 </xsl:call-template>
28 </xsl:variable>
29
30 <xsl:variable name="title">
31 <xsl:apply-templates select="$node" mode="object.title.markup">
32 <xsl:with-param name="allow-anchors" select="1"/>
33 </xsl:apply-templates>
34 </xsl:variable>
35
36 <xsl:variable name="titleabbrev">
37 <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
38 </xsl:variable>
39
40 <xsl:variable name="level">
41 <xsl:choose>
42 <xsl:when test="ancestor::section">
43 <xsl:value-of select="count(ancestor::section)+1"/>
44 </xsl:when>
45 <xsl:when test="ancestor::sect5">6</xsl:when>
46 <xsl:when test="ancestor::sect4">5</xsl:when>
47 <xsl:when test="ancestor::sect3">4</xsl:when>
48 <xsl:when test="ancestor::sect2">3</xsl:when>
49 <xsl:when test="ancestor::sect1">2</xsl:when>
50 <xsl:otherwise>1</xsl:otherwise>
51 </xsl:choose>
52 </xsl:variable>
53
54 <fo:block xsl:use-attribute-sets="component.title.properties">
55 <xsl:if test="$pagewide != 0">
56 <!-- Doesn't work to use 'all' here since not a child of fo:flow -->
57 <xsl:attribute name="span">inherit</xsl:attribute>
58 </xsl:if>
59 <xsl:attribute name="hyphenation-character">
60 <xsl:call-template name="gentext">
61 <xsl:with-param name="key" select="'hyphenation-character'"/>
62 </xsl:call-template>
63 </xsl:attribute>
64 <xsl:attribute name="hyphenation-push-character-count">
65 <xsl:call-template name="gentext">
66 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
67 </xsl:call-template>
68 </xsl:attribute>
69 <xsl:attribute name="hyphenation-remain-character-count">
70 <xsl:call-template name="gentext">
71 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
72 </xsl:call-template>
73 </xsl:attribute>
74 <xsl:if test="$axf.extensions != 0">
75 <xsl:attribute name="axf:outline-level">
76 <xsl:value-of select="count($node/ancestor::*)"/>
77 </xsl:attribute>
78 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
79 <xsl:attribute name="axf:outline-title">
80 <xsl:value-of select="normalize-space($title)"/>
81 </xsl:attribute>
82 </xsl:if>
83
84 <!-- Let's handle the case where a component (bibliography, for example)
85 occurs inside a section; will we need parameters for this?
86 Danger Will Robinson: using section.title.level*.properties here
87 runs the risk that someone will set something other than
88 font-size there... -->
89 <xsl:choose>
90 <xsl:when test="$level=2">
91 <fo:block xsl:use-attribute-sets="section.title.level2.properties">
92 <xsl:copy-of select="$title"/>
93 </fo:block>
94 </xsl:when>
95 <xsl:when test="$level=3">
96 <fo:block xsl:use-attribute-sets="section.title.level3.properties">
97 <xsl:copy-of select="$title"/>
98 </fo:block>
99 </xsl:when>
100 <xsl:when test="$level=4">
101 <fo:block xsl:use-attribute-sets="section.title.level4.properties">
102 <xsl:copy-of select="$title"/>
103 </fo:block>
104 </xsl:when>
105 <xsl:when test="$level=5">
106 <fo:block xsl:use-attribute-sets="section.title.level5.properties">
107 <xsl:copy-of select="$title"/>
108 </fo:block>
109 </xsl:when>
110 <xsl:when test="$level=6">
111 <fo:block xsl:use-attribute-sets="section.title.level6.properties">
112 <xsl:copy-of select="$title"/>
113 </fo:block>
114 </xsl:when>
115 <xsl:otherwise>
116 <!-- not in a section: do nothing special -->
117 <xsl:copy-of select="$title"/>
118 </xsl:otherwise>
119 </xsl:choose>
120 </fo:block>
121</xsl:template>
122
123<!-- ==================================================================== -->
124
125<xsl:template match="dedication" mode="dedication">
126 <xsl:variable name="id">
127 <xsl:call-template name="object.id"/>
128 </xsl:variable>
129
130 <xsl:variable name="master-reference">
131 <xsl:call-template name="select.pagemaster"/>
132 </xsl:variable>
133
134 <fo:page-sequence hyphenate="{$hyphenate}"
135 master-reference="{$master-reference}">
136 <xsl:attribute name="language">
137 <xsl:call-template name="l10n.language"/>
138 </xsl:attribute>
139 <xsl:attribute name="format">
140 <xsl:call-template name="page.number.format">
141 <xsl:with-param name="master-reference" select="$master-reference"/>
142 </xsl:call-template>
143 </xsl:attribute>
144
145 <xsl:attribute name="initial-page-number">
146 <xsl:call-template name="initial.page.number">
147 <xsl:with-param name="master-reference" select="$master-reference"/>
148 </xsl:call-template>
149 </xsl:attribute>
150
151 <xsl:attribute name="force-page-count">
152 <xsl:call-template name="force.page.count">
153 <xsl:with-param name="master-reference" select="$master-reference"/>
154 </xsl:call-template>
155 </xsl:attribute>
156
157 <xsl:attribute name="hyphenation-character">
158 <xsl:call-template name="gentext">
159 <xsl:with-param name="key" select="'hyphenation-character'"/>
160 </xsl:call-template>
161 </xsl:attribute>
162 <xsl:attribute name="hyphenation-push-character-count">
163 <xsl:call-template name="gentext">
164 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
165 </xsl:call-template>
166 </xsl:attribute>
167 <xsl:attribute name="hyphenation-remain-character-count">
168 <xsl:call-template name="gentext">
169 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
170 </xsl:call-template>
171 </xsl:attribute>
172
173 <xsl:apply-templates select="." mode="running.head.mode">
174 <xsl:with-param name="master-reference" select="$master-reference"/>
175 </xsl:apply-templates>
176
177 <xsl:apply-templates select="." mode="running.foot.mode">
178 <xsl:with-param name="master-reference" select="$master-reference"/>
179 </xsl:apply-templates>
180
181 <fo:flow flow-name="xsl-region-body">
182 <xsl:call-template name="set.flow.properties">
183 <xsl:with-param name="element" select="local-name(.)"/>
184 <xsl:with-param name="master-reference" select="$master-reference"/>
185 </xsl:call-template>
186
187 <fo:block id="{$id}"
188 xsl:use-attribute-sets="component.titlepage.properties">
189 <xsl:call-template name="dedication.titlepage"/>
190 </fo:block>
191 <xsl:apply-templates/>
192 </fo:flow>
193 </fo:page-sequence>
194</xsl:template>
195
196<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
197<xsl:template match="dedication/docinfo"></xsl:template>
198<xsl:template match="dedication/title"></xsl:template>
199<xsl:template match="dedication/subtitle"></xsl:template>
200<xsl:template match="dedication/titleabbrev"></xsl:template>
201
202<!-- ==================================================================== -->
203
204<xsl:template match="acknowledgements" mode="acknowledgements">
205 <xsl:variable name="id">
206 <xsl:call-template name="object.id"/>
207 </xsl:variable>
208
209 <xsl:variable name="master-reference">
210 <xsl:call-template name="select.pagemaster"/>
211 </xsl:variable>
212
213 <fo:page-sequence hyphenate="{$hyphenate}"
214 master-reference="{$master-reference}">
215 <xsl:attribute name="language">
216 <xsl:call-template name="l10n.language"/>
217 </xsl:attribute>
218 <xsl:attribute name="format">
219 <xsl:call-template name="page.number.format">
220 <xsl:with-param name="master-reference" select="$master-reference"/>
221 </xsl:call-template>
222 </xsl:attribute>
223 <xsl:attribute name="initial-page-number">
224 <xsl:call-template name="initial.page.number">
225 <xsl:with-param name="master-reference" select="$master-reference"/>
226 </xsl:call-template>
227 </xsl:attribute>
228 <xsl:attribute name="force-page-count">
229 <xsl:call-template name="force.page.count">
230 <xsl:with-param name="master-reference" select="$master-reference"/>
231 </xsl:call-template>
232 </xsl:attribute>
233 <xsl:attribute name="hyphenation-character">
234 <xsl:call-template name="gentext">
235 <xsl:with-param name="key" select="'hyphenation-character'"/>
236 </xsl:call-template>
237 </xsl:attribute>
238 <xsl:attribute name="hyphenation-push-character-count">
239 <xsl:call-template name="gentext">
240 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
241 </xsl:call-template>
242 </xsl:attribute>
243 <xsl:attribute name="hyphenation-remain-character-count">
244 <xsl:call-template name="gentext">
245 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
246 </xsl:call-template>
247 </xsl:attribute>
248
249 <xsl:apply-templates select="." mode="running.head.mode">
250 <xsl:with-param name="master-reference" select="$master-reference"/>
251 </xsl:apply-templates>
252
253 <xsl:apply-templates select="." mode="running.foot.mode">
254 <xsl:with-param name="master-reference" select="$master-reference"/>
255 </xsl:apply-templates>
256
257 <fo:flow flow-name="xsl-region-body">
258 <xsl:call-template name="set.flow.properties">
259 <xsl:with-param name="element" select="local-name(.)"/>
260 <xsl:with-param name="master-reference" select="$master-reference"/>
261 </xsl:call-template>
262
263 <fo:block id="{$id}"
264 xsl:use-attribute-sets="component.titlepage.properties">
265 <xsl:call-template name="acknowledgements.titlepage"/>
266 </fo:block>
267 <xsl:apply-templates/>
268 </fo:flow>
269 </fo:page-sequence>
270</xsl:template>
271
272<xsl:template match="acknowledgements"></xsl:template>
273<xsl:template match="acknowledgements/info"></xsl:template>
274<xsl:template match="acknowledgements/title"></xsl:template>
275<xsl:template match="acknowledgements/titleabbrev"></xsl:template>
276<xsl:template match="acknowledgements/subtitle"></xsl:template>
277
278<!-- ==================================================================== -->
279
280<xsl:template match="colophon">
281 <xsl:variable name="id">
282 <xsl:call-template name="object.id"/>
283 </xsl:variable>
284
285 <xsl:variable name="master-reference">
286 <xsl:call-template name="select.pagemaster"/>
287 </xsl:variable>
288
289 <fo:page-sequence hyphenate="{$hyphenate}"
290 master-reference="{$master-reference}">
291 <xsl:attribute name="language">
292 <xsl:call-template name="l10n.language"/>
293 </xsl:attribute>
294 <xsl:attribute name="format">
295 <xsl:call-template name="page.number.format">
296 <xsl:with-param name="master-reference" select="$master-reference"/>
297 </xsl:call-template>
298 </xsl:attribute>
299 <xsl:attribute name="initial-page-number">
300 <xsl:call-template name="initial.page.number">
301 <xsl:with-param name="master-reference" select="$master-reference"/>
302 </xsl:call-template>
303 </xsl:attribute>
304 <xsl:attribute name="force-page-count">
305 <xsl:call-template name="force.page.count">
306 <xsl:with-param name="master-reference" select="$master-reference"/>
307 </xsl:call-template>
308 </xsl:attribute>
309 <xsl:attribute name="hyphenation-character">
310 <xsl:call-template name="gentext">
311 <xsl:with-param name="key" select="'hyphenation-character'"/>
312 </xsl:call-template>
313 </xsl:attribute>
314 <xsl:attribute name="hyphenation-push-character-count">
315 <xsl:call-template name="gentext">
316 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
317 </xsl:call-template>
318 </xsl:attribute>
319 <xsl:attribute name="hyphenation-remain-character-count">
320 <xsl:call-template name="gentext">
321 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
322 </xsl:call-template>
323 </xsl:attribute>
324
325 <xsl:apply-templates select="." mode="running.head.mode">
326 <xsl:with-param name="master-reference" select="$master-reference"/>
327 </xsl:apply-templates>
328
329 <xsl:apply-templates select="." mode="running.foot.mode">
330 <xsl:with-param name="master-reference" select="$master-reference"/>
331 </xsl:apply-templates>
332
333 <fo:flow flow-name="xsl-region-body">
334 <xsl:call-template name="set.flow.properties">
335 <xsl:with-param name="element" select="local-name(.)"/>
336 <xsl:with-param name="master-reference" select="$master-reference"/>
337 </xsl:call-template>
338
339 <fo:block id="{$id}"
340 xsl:use-attribute-sets="component.titlepage.properties">
341 <xsl:call-template name="colophon.titlepage"/>
342 </fo:block>
343 <xsl:apply-templates/>
344 </fo:flow>
345 </fo:page-sequence>
346</xsl:template>
347
348<xsl:template match="colophon/title"></xsl:template>
349<xsl:template match="colophon/subtitle"></xsl:template>
350<xsl:template match="colophon/titleabbrev"></xsl:template>
351
352<!-- article/colophon has no page sequence -->
353<xsl:template match="article/colophon">
354 <xsl:variable name="id">
355 <xsl:call-template name="object.id"/>
356 </xsl:variable>
357
358 <fo:block id="{$id}">
359 <fo:block xsl:use-attribute-sets="component.titlepage.properties">
360 <xsl:call-template name="colophon.titlepage"/>
361 </fo:block>
362 <xsl:apply-templates/>
363 </fo:block>
364</xsl:template>
365
366<!-- ==================================================================== -->
367
368<xsl:template match="preface">
369 <xsl:variable name="id">
370 <xsl:call-template name="object.id"/>
371 </xsl:variable>
372
373 <xsl:variable name="master-reference">
374 <xsl:call-template name="select.pagemaster"/>
375 </xsl:variable>
376
377 <fo:page-sequence hyphenate="{$hyphenate}"
378 master-reference="{$master-reference}">
379 <xsl:attribute name="language">
380 <xsl:call-template name="l10n.language"/>
381 </xsl:attribute>
382 <xsl:attribute name="format">
383 <xsl:call-template name="page.number.format">
384 <xsl:with-param name="master-reference" select="$master-reference"/>
385 </xsl:call-template>
386 </xsl:attribute>
387
388 <xsl:attribute name="initial-page-number">
389 <xsl:call-template name="initial.page.number">
390 <xsl:with-param name="master-reference" select="$master-reference"/>
391 </xsl:call-template>
392 </xsl:attribute>
393
394 <xsl:attribute name="force-page-count">
395 <xsl:call-template name="force.page.count">
396 <xsl:with-param name="master-reference" select="$master-reference"/>
397 </xsl:call-template>
398 </xsl:attribute>
399
400 <xsl:attribute name="hyphenation-character">
401 <xsl:call-template name="gentext">
402 <xsl:with-param name="key" select="'hyphenation-character'"/>
403 </xsl:call-template>
404 </xsl:attribute>
405 <xsl:attribute name="hyphenation-push-character-count">
406 <xsl:call-template name="gentext">
407 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
408 </xsl:call-template>
409 </xsl:attribute>
410 <xsl:attribute name="hyphenation-remain-character-count">
411 <xsl:call-template name="gentext">
412 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
413 </xsl:call-template>
414 </xsl:attribute>
415
416 <xsl:apply-templates select="." mode="running.head.mode">
417 <xsl:with-param name="master-reference" select="$master-reference"/>
418 </xsl:apply-templates>
419
420 <xsl:apply-templates select="." mode="running.foot.mode">
421 <xsl:with-param name="master-reference" select="$master-reference"/>
422 </xsl:apply-templates>
423
424 <fo:flow flow-name="xsl-region-body">
425 <xsl:call-template name="set.flow.properties">
426 <xsl:with-param name="element" select="local-name(.)"/>
427 <xsl:with-param name="master-reference" select="$master-reference"/>
428 </xsl:call-template>
429
430 <fo:block id="{$id}"
431 xsl:use-attribute-sets="component.titlepage.properties">
432 <xsl:call-template name="preface.titlepage"/>
433 </fo:block>
434
435 <xsl:call-template name="make.component.tocs"/>
436
437 <xsl:apply-templates/>
438 </fo:flow>
439 </fo:page-sequence>
440</xsl:template>
441
442<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
443<xsl:template match="preface/info"></xsl:template>
444<xsl:template match="preface/title"></xsl:template>
445<xsl:template match="preface/titleabbrev"></xsl:template>
446<xsl:template match="preface/subtitle"></xsl:template>
447
448<!-- ==================================================================== -->
449
450<xsl:template match="chapter">
451 <xsl:variable name="id">
452 <xsl:call-template name="object.id"/>
453 </xsl:variable>
454
455 <xsl:variable name="master-reference">
456 <xsl:call-template name="select.pagemaster"/>
457 </xsl:variable>
458
459 <fo:page-sequence hyphenate="{$hyphenate}"
460 master-reference="{$master-reference}">
461 <xsl:attribute name="language">
462 <xsl:call-template name="l10n.language"/>
463 </xsl:attribute>
464 <xsl:attribute name="format">
465 <xsl:call-template name="page.number.format">
466 <xsl:with-param name="master-reference" select="$master-reference"/>
467 </xsl:call-template>
468 </xsl:attribute>
469 <xsl:attribute name="initial-page-number">
470 <xsl:call-template name="initial.page.number">
471 <xsl:with-param name="master-reference" select="$master-reference"/>
472 </xsl:call-template>
473 </xsl:attribute>
474
475 <xsl:attribute name="force-page-count">
476 <xsl:call-template name="force.page.count">
477 <xsl:with-param name="master-reference" select="$master-reference"/>
478 </xsl:call-template>
479 </xsl:attribute>
480
481 <xsl:attribute name="hyphenation-character">
482 <xsl:call-template name="gentext">
483 <xsl:with-param name="key" select="'hyphenation-character'"/>
484 </xsl:call-template>
485 </xsl:attribute>
486 <xsl:attribute name="hyphenation-push-character-count">
487 <xsl:call-template name="gentext">
488 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
489 </xsl:call-template>
490 </xsl:attribute>
491 <xsl:attribute name="hyphenation-remain-character-count">
492 <xsl:call-template name="gentext">
493 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
494 </xsl:call-template>
495 </xsl:attribute>
496
497 <xsl:apply-templates select="." mode="running.head.mode">
498 <xsl:with-param name="master-reference" select="$master-reference"/>
499 </xsl:apply-templates>
500
501 <xsl:apply-templates select="." mode="running.foot.mode">
502 <xsl:with-param name="master-reference" select="$master-reference"/>
503 </xsl:apply-templates>
504
505 <fo:flow flow-name="xsl-region-body">
506 <xsl:call-template name="set.flow.properties">
507 <xsl:with-param name="element" select="local-name(.)"/>
508 <xsl:with-param name="master-reference" select="$master-reference"/>
509 </xsl:call-template>
510
511 <fo:block id="{$id}"
512 xsl:use-attribute-sets="component.titlepage.properties">
513 <xsl:call-template name="chapter.titlepage"/>
514 </fo:block>
515
516 <xsl:call-template name="make.component.tocs"/>
517
518 <xsl:apply-templates/>
519 </fo:flow>
520 </fo:page-sequence>
521</xsl:template>
522
523<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
524<xsl:template match="chapter/info"></xsl:template>
525<xsl:template match="chapter/title"></xsl:template>
526<xsl:template match="chapter/titleabbrev"></xsl:template>
527<xsl:template match="chapter/subtitle"></xsl:template>
528
529<!-- ==================================================================== -->
530
531<xsl:template match="appendix">
532 <xsl:variable name="id">
533 <xsl:call-template name="object.id"/>
534 </xsl:variable>
535
536 <xsl:variable name="master-reference">
537 <xsl:call-template name="select.pagemaster"/>
538 </xsl:variable>
539
540 <fo:page-sequence hyphenate="{$hyphenate}"
541 master-reference="{$master-reference}">
542 <xsl:attribute name="language">
543 <xsl:call-template name="l10n.language"/>
544 </xsl:attribute>
545 <xsl:attribute name="format">
546 <xsl:call-template name="page.number.format">
547 <xsl:with-param name="master-reference" select="$master-reference"/>
548 </xsl:call-template>
549 </xsl:attribute>
550 <xsl:attribute name="initial-page-number">
551 <xsl:call-template name="initial.page.number">
552 <xsl:with-param name="master-reference" select="$master-reference"/>
553 </xsl:call-template>
554 </xsl:attribute>
555
556 <xsl:attribute name="force-page-count">
557 <xsl:call-template name="force.page.count">
558 <xsl:with-param name="master-reference" select="$master-reference"/>
559 </xsl:call-template>
560 </xsl:attribute>
561
562 <xsl:attribute name="hyphenation-character">
563 <xsl:call-template name="gentext">
564 <xsl:with-param name="key" select="'hyphenation-character'"/>
565 </xsl:call-template>
566 </xsl:attribute>
567 <xsl:attribute name="hyphenation-push-character-count">
568 <xsl:call-template name="gentext">
569 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
570 </xsl:call-template>
571 </xsl:attribute>
572 <xsl:attribute name="hyphenation-remain-character-count">
573 <xsl:call-template name="gentext">
574 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
575 </xsl:call-template>
576 </xsl:attribute>
577
578 <xsl:apply-templates select="." mode="running.head.mode">
579 <xsl:with-param name="master-reference" select="$master-reference"/>
580 </xsl:apply-templates>
581
582 <xsl:apply-templates select="." mode="running.foot.mode">
583 <xsl:with-param name="master-reference" select="$master-reference"/>
584 </xsl:apply-templates>
585
586 <fo:flow flow-name="xsl-region-body">
587 <xsl:call-template name="set.flow.properties">
588 <xsl:with-param name="element" select="local-name(.)"/>
589 <xsl:with-param name="master-reference" select="$master-reference"/>
590 </xsl:call-template>
591
592 <fo:block id="{$id}"
593 xsl:use-attribute-sets="component.titlepage.properties">
594 <xsl:call-template name="appendix.titlepage"/>
595 </fo:block>
596
597 <xsl:call-template name="make.component.tocs"/>
598
599 <xsl:apply-templates/>
600 </fo:flow>
601 </fo:page-sequence>
602</xsl:template>
603
604<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
605<xsl:template match="appendix/info"></xsl:template>
606<xsl:template match="appendix/title"></xsl:template>
607<xsl:template match="appendix/titleabbrev"></xsl:template>
608<xsl:template match="appendix/subtitle"></xsl:template>
609
610<!-- ==================================================================== -->
611
612<xsl:template match="article">
613 <xsl:variable name="id">
614 <xsl:call-template name="object.id"/>
615 </xsl:variable>
616
617 <xsl:variable name="master-reference">
618 <xsl:call-template name="select.pagemaster"/>
619 </xsl:variable>
620
621 <fo:page-sequence hyphenate="{$hyphenate}"
622 master-reference="{$master-reference}">
623 <xsl:attribute name="language">
624 <xsl:call-template name="l10n.language"/>
625 </xsl:attribute>
626 <xsl:attribute name="format">
627 <xsl:call-template name="page.number.format">
628 <xsl:with-param name="master-reference" select="$master-reference"/>
629 </xsl:call-template>
630 </xsl:attribute>
631 <xsl:attribute name="initial-page-number">
632 <xsl:call-template name="initial.page.number">
633 <xsl:with-param name="master-reference" select="$master-reference"/>
634 </xsl:call-template>
635 </xsl:attribute>
636
637 <xsl:attribute name="force-page-count">
638 <xsl:call-template name="force.page.count">
639 <xsl:with-param name="master-reference" select="$master-reference"/>
640 </xsl:call-template>
641 </xsl:attribute>
642
643 <xsl:attribute name="hyphenation-character">
644 <xsl:call-template name="gentext">
645 <xsl:with-param name="key" select="'hyphenation-character'"/>
646 </xsl:call-template>
647 </xsl:attribute>
648 <xsl:attribute name="hyphenation-push-character-count">
649 <xsl:call-template name="gentext">
650 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
651 </xsl:call-template>
652 </xsl:attribute>
653 <xsl:attribute name="hyphenation-remain-character-count">
654 <xsl:call-template name="gentext">
655 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
656 </xsl:call-template>
657 </xsl:attribute>
658
659 <xsl:apply-templates select="." mode="running.head.mode">
660 <xsl:with-param name="master-reference" select="$master-reference"/>
661 </xsl:apply-templates>
662
663 <xsl:apply-templates select="." mode="running.foot.mode">
664 <xsl:with-param name="master-reference" select="$master-reference"/>
665 </xsl:apply-templates>
666
667 <fo:flow flow-name="xsl-region-body">
668 <xsl:call-template name="set.flow.properties">
669 <xsl:with-param name="element" select="local-name(.)"/>
670 <xsl:with-param name="master-reference" select="$master-reference"/>
671 </xsl:call-template>
672
673 <fo:block id="{$id}"
674 xsl:use-attribute-sets="component.titlepage.properties">
675 <xsl:call-template name="article.titlepage"/>
676 </fo:block>
677
678 <xsl:call-template name="make.component.tocs"/>
679
680 <xsl:apply-templates/>
681 </fo:flow>
682 </fo:page-sequence>
683</xsl:template>
684
685<xsl:template match="article/artheader"></xsl:template>
686<xsl:template match="article/articleinfo"></xsl:template>
687<xsl:template match="article/info"></xsl:template>
688<xsl:template match="article/title"></xsl:template>
689<xsl:template match="article/subtitle"></xsl:template>
690<xsl:template match="article/titleabbrev"></xsl:template>
691
692<xsl:template match="article/appendix">
693 <xsl:variable name="id">
694 <xsl:call-template name="object.id"/>
695 </xsl:variable>
696
697 <xsl:variable name="title">
698 <xsl:apply-templates select="." mode="object.title.markup"/>
699 </xsl:variable>
700
701 <xsl:variable name="titleabbrev">
702 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
703 </xsl:variable>
704
705 <fo:block id='{$id}'>
706 <xsl:if test="$axf.extensions != 0">
707 <xsl:attribute name="axf:outline-level">
708 <xsl:value-of select="count(ancestor::*)+2"/>
709 </xsl:attribute>
710 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
711 <xsl:attribute name="axf:outline-title">
712 <xsl:value-of select="normalize-space($titleabbrev)"/>
713 </xsl:attribute>
714 </xsl:if>
715
716 <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
717 <fo:marker marker-class-name="section.head.marker">
718 <xsl:choose>
719 <xsl:when test="$titleabbrev = ''">
720 <xsl:value-of select="$title"/>
721 </xsl:when>
722 <xsl:otherwise>
723 <xsl:value-of select="$titleabbrev"/>
724 </xsl:otherwise>
725 </xsl:choose>
726 </fo:marker>
727 <xsl:copy-of select="$title"/>
728 </fo:block>
729
730 <xsl:call-template name="make.component.tocs"/>
731
732 <xsl:apply-templates/>
733 </fo:block>
734</xsl:template>
735
736<!-- ==================================================================== -->
737
738<!-- Utility template to create a page sequence for an element -->
739<xsl:template match="*" mode="page.sequence" name="page.sequence">
740 <xsl:param name="content">
741 <xsl:apply-templates/>
742 </xsl:param>
743 <xsl:param name="master-reference">
744 <xsl:call-template name="select.pagemaster"/>
745 </xsl:param>
746 <xsl:param name="element" select="local-name(.)"/>
747 <xsl:param name="gentext-key" select="local-name(.)"/>
748 <xsl:param name="language">
749 <xsl:call-template name="l10n.language"/>
750 </xsl:param>
751
752 <xsl:param name="format">
753 <xsl:call-template name="page.number.format">
754 <xsl:with-param name="master-reference" select="$master-reference"/>
755 <xsl:with-param name="element" select="$element"/>
756 </xsl:call-template>
757 </xsl:param>
758
759 <xsl:param name="initial-page-number">
760 <xsl:call-template name="initial.page.number">
761 <xsl:with-param name="master-reference" select="$master-reference"/>
762 <xsl:with-param name="element" select="$element"/>
763 </xsl:call-template>
764 </xsl:param>
765
766 <xsl:param name="force-page-count">
767 <xsl:call-template name="force.page.count">
768 <xsl:with-param name="master-reference" select="$master-reference"/>
769 <xsl:with-param name="element" select="$element"/>
770 </xsl:call-template>
771 </xsl:param>
772
773 <fo:page-sequence hyphenate="{$hyphenate}"
774 master-reference="{$master-reference}">
775 <xsl:attribute name="language">
776 <xsl:value-of select="$language"/>
777 </xsl:attribute>
778 <xsl:attribute name="format">
779 <xsl:value-of select="$format"/>
780 </xsl:attribute>
781
782 <xsl:attribute name="initial-page-number">
783 <xsl:value-of select="$initial-page-number"/>
784 </xsl:attribute>
785
786 <xsl:attribute name="force-page-count">
787 <xsl:value-of select="$force-page-count"/>
788 </xsl:attribute>
789
790 <xsl:attribute name="hyphenation-character">
791 <xsl:call-template name="gentext">
792 <xsl:with-param name="key" select="'hyphenation-character'"/>
793 </xsl:call-template>
794 </xsl:attribute>
795 <xsl:attribute name="hyphenation-push-character-count">
796 <xsl:call-template name="gentext">
797 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
798 </xsl:call-template>
799 </xsl:attribute>
800 <xsl:attribute name="hyphenation-remain-character-count">
801 <xsl:call-template name="gentext">
802 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
803 </xsl:call-template>
804 </xsl:attribute>
805
806 <xsl:apply-templates select="." mode="running.head.mode">
807 <xsl:with-param name="master-reference" select="$master-reference"/>
808 <xsl:with-param name="gentext-key" select="$gentext-key"/>
809 </xsl:apply-templates>
810
811 <xsl:apply-templates select="." mode="running.foot.mode">
812 <xsl:with-param name="master-reference" select="$master-reference"/>
813 <xsl:with-param name="gentext-key" select="$gentext-key"/>
814 </xsl:apply-templates>
815
816 <fo:flow flow-name="xsl-region-body">
817 <xsl:call-template name="set.flow.properties">
818 <xsl:with-param name="element" select="local-name(.)"/>
819 <xsl:with-param name="master-reference" select="$master-reference"/>
820 </xsl:call-template>
821
822 <xsl:copy-of select="$content"/>
823
824 </fo:flow>
825 </fo:page-sequence>
826</xsl:template>
827
828<xsl:template name="make.component.tocs">
829
830 <xsl:variable name="toc.params">
831 <xsl:call-template name="find.path.params">
832 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
833 </xsl:call-template>
834 </xsl:variable>
835
836 <xsl:if test="contains($toc.params, 'toc')">
837 <xsl:call-template name="component.toc">
838 <xsl:with-param name="toc.title.p"
839 select="contains($toc.params, 'title')"/>
840 </xsl:call-template>
841 </xsl:if>
842
843 <xsl:if test="contains($toc.params,'figure') and .//figure">
844 <xsl:call-template name="component.list.of.titles">
845 <xsl:with-param name="titles" select="'figure'"/>
846 <xsl:with-param name="nodes" select=".//figure"/>
847 </xsl:call-template>
848 </xsl:if>
849
850 <xsl:if test="contains($toc.params,'table') and .//table">
851 <xsl:call-template name="component.list.of.titles">
852 <xsl:with-param name="titles" select="'table'"/>
853 <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
854 </xsl:call-template>
855 </xsl:if>
856
857 <xsl:if test="contains($toc.params,'example') and .//example">
858 <xsl:call-template name="component.list.of.titles">
859 <xsl:with-param name="titles" select="'example'"/>
860 <xsl:with-param name="nodes" select=".//example"/>
861 </xsl:call-template>
862 </xsl:if>
863
864 <xsl:if test="contains($toc.params,'equation') and
865 .//equation[title or info/title]">
866 <xsl:call-template name="component.list.of.titles">
867 <xsl:with-param name="titles" select="'equation'"/>
868 <xsl:with-param name="nodes"
869 select=".//equation[title or info/title]"/>
870 </xsl:call-template>
871 </xsl:if>
872
873 <xsl:if test="contains($toc.params,'procedure') and
874 .//procedure[title or info/title]">
875 <xsl:call-template name="component.list.of.titles">
876 <xsl:with-param name="titles" select="'procedure'"/>
877 <xsl:with-param name="nodes"
878 select=".//procedure[title or info/title]"/>
879 </xsl:call-template>
880 </xsl:if>
881
882 <xsl:choose>
883 <xsl:when test="$toc.params = ''">
884 </xsl:when>
885 <xsl:when test="$toc.params = 'nop'">
886 </xsl:when>
887 <xsl:otherwise>
888 <xsl:call-template name="component.toc.separator"/>
889 </xsl:otherwise>
890 </xsl:choose>
891
892</xsl:template>
893
894<xsl:template match="topic">
895 <xsl:variable name="id">
896 <xsl:call-template name="object.id"/>
897 </xsl:variable>
898
899 <xsl:element name="fo:{$section.container.element}">
900 <xsl:attribute name="id"><xsl:value-of
901 select="$id"/></xsl:attribute>
902 <xsl:call-template name="topic.titlepage"/>
903
904 <xsl:apply-templates/>
905
906 </xsl:element>
907</xsl:template>
908
909<xsl:template match="/topic | book/topic" name="topic.page.sequence">
910 <xsl:variable name="master-reference">
911 <xsl:call-template name="select.pagemaster"/>
912 </xsl:variable>
913 <xsl:variable name="id">
914 <xsl:call-template name="object.id"/>
915 </xsl:variable>
916
917 <xsl:apply-templates select="." mode="page.sequence">
918 <xsl:with-param name="master-reference" select="$master-reference"/>
919 <xsl:with-param name="content">
920 <xsl:element name="fo:{$section.container.element}">
921 <xsl:attribute name="id"><xsl:value-of
922 select="$id"/></xsl:attribute>
923 <xsl:call-template name="topic.titlepage"/>
924
925 <xsl:apply-templates/>
926
927 </xsl:element>
928 </xsl:with-param>
929 </xsl:apply-templates>
930</xsl:template>
931
932<xsl:template match="topic/info"></xsl:template>
933<xsl:template match="topic/title"></xsl:template>
934<xsl:template match="topic/subtitle"></xsl:template>
935<xsl:template match="topic/titleabbrev"></xsl:template>
936
937</xsl:stylesheet>
938
Note: See TracBrowser for help on using the repository browser.