source: clfs-embedded/BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/component.xsl@ efb31cd

Last change on this file since efb31cd was 00b1e11, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Merged r8226 from new-xsl branch.

  • Property mode set to 100644
File size: 29.3 KB
RevLine 
[9882b55]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$
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 <xsl:if test="$passivetex.extensions != 0">
55 <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
56 fotex-bookmark-level="2"
57 fotex-bookmark-label="{$id}">
58 <xsl:value-of select="$titleabbrev"/>
59 </fotex:bookmark>
60 </xsl:if>
61
62 <fo:block xsl:use-attribute-sets="component.title.properties">
63 <xsl:if test="$pagewide != 0">
64 <!-- Doesn't work to use 'all' here since not a child of fo:flow -->
65 <xsl:attribute name="span">inherit</xsl:attribute>
66 </xsl:if>
67 <xsl:attribute name="hyphenation-character">
68 <xsl:call-template name="gentext">
69 <xsl:with-param name="key" select="'hyphenation-character'"/>
70 </xsl:call-template>
71 </xsl:attribute>
72 <xsl:attribute name="hyphenation-push-character-count">
73 <xsl:call-template name="gentext">
74 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
75 </xsl:call-template>
76 </xsl:attribute>
77 <xsl:attribute name="hyphenation-remain-character-count">
78 <xsl:call-template name="gentext">
79 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
80 </xsl:call-template>
81 </xsl:attribute>
82 <xsl:if test="$axf.extensions != 0">
83 <xsl:attribute name="axf:outline-level">
84 <xsl:value-of select="count($node/ancestor::*)"/>
85 </xsl:attribute>
86 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
87 <xsl:attribute name="axf:outline-title">
88 <xsl:value-of select="normalize-space($title)"/>
89 </xsl:attribute>
90 </xsl:if>
91
92 <!-- Let's handle the case where a component (bibliography, for example)
93 occurs inside a section; will we need parameters for this?
94 Danger Will Robinson: using section.title.level*.properties here
95 runs the risk that someone will set something other than
96 font-size there... -->
97 <xsl:choose>
98 <xsl:when test="$level=2">
99 <fo:block xsl:use-attribute-sets="section.title.level2.properties">
100 <xsl:copy-of select="$title"/>
101 </fo:block>
102 </xsl:when>
103 <xsl:when test="$level=3">
104 <fo:block xsl:use-attribute-sets="section.title.level3.properties">
105 <xsl:copy-of select="$title"/>
106 </fo:block>
107 </xsl:when>
108 <xsl:when test="$level=4">
109 <fo:block xsl:use-attribute-sets="section.title.level4.properties">
110 <xsl:copy-of select="$title"/>
111 </fo:block>
112 </xsl:when>
113 <xsl:when test="$level=5">
114 <fo:block xsl:use-attribute-sets="section.title.level5.properties">
115 <xsl:copy-of select="$title"/>
116 </fo:block>
117 </xsl:when>
118 <xsl:when test="$level=6">
119 <fo:block xsl:use-attribute-sets="section.title.level6.properties">
120 <xsl:copy-of select="$title"/>
121 </fo:block>
122 </xsl:when>
123 <xsl:otherwise>
124 <!-- not in a section: do nothing special -->
125 <xsl:copy-of select="$title"/>
126 </xsl:otherwise>
127 </xsl:choose>
128 </fo:block>
129</xsl:template>
130
131<!-- ==================================================================== -->
132
133<xsl:template match="dedication" mode="dedication">
134 <xsl:variable name="id">
135 <xsl:call-template name="object.id"/>
136 </xsl:variable>
137
138 <xsl:variable name="master-reference">
139 <xsl:call-template name="select.pagemaster"/>
140 </xsl:variable>
141
142 <fo:page-sequence hyphenate="{$hyphenate}"
143 master-reference="{$master-reference}">
144 <xsl:attribute name="language">
145 <xsl:call-template name="l10n.language"/>
146 </xsl:attribute>
147 <xsl:attribute name="format">
148 <xsl:call-template name="page.number.format">
149 <xsl:with-param name="master-reference" select="$master-reference"/>
150 </xsl:call-template>
151 </xsl:attribute>
152
153 <xsl:attribute name="initial-page-number">
154 <xsl:call-template name="initial.page.number">
155 <xsl:with-param name="master-reference" select="$master-reference"/>
156 </xsl:call-template>
157 </xsl:attribute>
158
159 <xsl:attribute name="force-page-count">
160 <xsl:call-template name="force.page.count">
161 <xsl:with-param name="master-reference" select="$master-reference"/>
162 </xsl:call-template>
163 </xsl:attribute>
164
165 <xsl:attribute name="hyphenation-character">
166 <xsl:call-template name="gentext">
167 <xsl:with-param name="key" select="'hyphenation-character'"/>
168 </xsl:call-template>
169 </xsl:attribute>
170 <xsl:attribute name="hyphenation-push-character-count">
171 <xsl:call-template name="gentext">
172 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
173 </xsl:call-template>
174 </xsl:attribute>
175 <xsl:attribute name="hyphenation-remain-character-count">
176 <xsl:call-template name="gentext">
177 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
178 </xsl:call-template>
179 </xsl:attribute>
180
181 <xsl:apply-templates select="." mode="running.head.mode">
182 <xsl:with-param name="master-reference" select="$master-reference"/>
183 </xsl:apply-templates>
184
185 <xsl:apply-templates select="." mode="running.foot.mode">
186 <xsl:with-param name="master-reference" select="$master-reference"/>
187 </xsl:apply-templates>
188
189 <fo:flow flow-name="xsl-region-body">
190 <xsl:call-template name="set.flow.properties">
191 <xsl:with-param name="element" select="local-name(.)"/>
192 <xsl:with-param name="master-reference" select="$master-reference"/>
193 </xsl:call-template>
194
195 <fo:block id="{$id}"
196 xsl:use-attribute-sets="component.titlepage.properties">
197 <xsl:call-template name="dedication.titlepage"/>
198 </fo:block>
199 <xsl:apply-templates/>
200 </fo:flow>
201 </fo:page-sequence>
202</xsl:template>
203
204<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
205<xsl:template match="dedication/docinfo"></xsl:template>
206<xsl:template match="dedication/title"></xsl:template>
207<xsl:template match="dedication/subtitle"></xsl:template>
208<xsl:template match="dedication/titleabbrev"></xsl:template>
209
210<!-- ==================================================================== -->
211
212<xsl:template match="colophon">
213 <xsl:variable name="id">
214 <xsl:call-template name="object.id"/>
215 </xsl:variable>
216
217 <xsl:variable name="master-reference">
218 <xsl:call-template name="select.pagemaster"/>
219 </xsl:variable>
220
221 <fo:page-sequence hyphenate="{$hyphenate}"
222 master-reference="{$master-reference}">
223 <xsl:attribute name="language">
224 <xsl:call-template name="l10n.language"/>
225 </xsl:attribute>
226 <xsl:attribute name="format">
227 <xsl:call-template name="page.number.format">
228 <xsl:with-param name="master-reference" select="$master-reference"/>
229 </xsl:call-template>
230 </xsl:attribute>
231 <xsl:attribute name="initial-page-number">
232 <xsl:call-template name="initial.page.number">
233 <xsl:with-param name="master-reference" select="$master-reference"/>
234 </xsl:call-template>
235 </xsl:attribute>
236 <xsl:attribute name="force-page-count">
237 <xsl:call-template name="force.page.count">
238 <xsl:with-param name="master-reference" select="$master-reference"/>
239 </xsl:call-template>
240 </xsl:attribute>
241 <xsl:attribute name="hyphenation-character">
242 <xsl:call-template name="gentext">
243 <xsl:with-param name="key" select="'hyphenation-character'"/>
244 </xsl:call-template>
245 </xsl:attribute>
246 <xsl:attribute name="hyphenation-push-character-count">
247 <xsl:call-template name="gentext">
248 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
249 </xsl:call-template>
250 </xsl:attribute>
251 <xsl:attribute name="hyphenation-remain-character-count">
252 <xsl:call-template name="gentext">
253 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
254 </xsl:call-template>
255 </xsl:attribute>
256
257 <xsl:apply-templates select="." mode="running.head.mode">
258 <xsl:with-param name="master-reference" select="$master-reference"/>
259 </xsl:apply-templates>
260
261 <xsl:apply-templates select="." mode="running.foot.mode">
262 <xsl:with-param name="master-reference" select="$master-reference"/>
263 </xsl:apply-templates>
264
265 <fo:flow flow-name="xsl-region-body">
266 <xsl:call-template name="set.flow.properties">
267 <xsl:with-param name="element" select="local-name(.)"/>
268 <xsl:with-param name="master-reference" select="$master-reference"/>
269 </xsl:call-template>
270
271 <fo:block id="{$id}"
272 xsl:use-attribute-sets="component.titlepage.properties">
273 <xsl:call-template name="colophon.titlepage"/>
274 </fo:block>
275 <xsl:apply-templates/>
276 </fo:flow>
277 </fo:page-sequence>
278</xsl:template>
279
280<xsl:template match="colophon/title"></xsl:template>
281<xsl:template match="colophon/subtitle"></xsl:template>
282<xsl:template match="colophon/titleabbrev"></xsl:template>
283
284<!-- ==================================================================== -->
285
286<xsl:template match="preface">
287 <xsl:variable name="id">
288 <xsl:call-template name="object.id"/>
289 </xsl:variable>
290
291 <xsl:variable name="master-reference">
292 <xsl:call-template name="select.pagemaster"/>
293 </xsl:variable>
294
295 <fo:page-sequence hyphenate="{$hyphenate}"
296 master-reference="{$master-reference}">
297 <xsl:attribute name="language">
298 <xsl:call-template name="l10n.language"/>
299 </xsl:attribute>
300 <xsl:attribute name="format">
301 <xsl:call-template name="page.number.format">
302 <xsl:with-param name="master-reference" select="$master-reference"/>
303 </xsl:call-template>
304 </xsl:attribute>
305
306 <xsl:attribute name="initial-page-number">
307 <xsl:call-template name="initial.page.number">
308 <xsl:with-param name="master-reference" select="$master-reference"/>
309 </xsl:call-template>
310 </xsl:attribute>
311
312 <xsl:attribute name="force-page-count">
313 <xsl:call-template name="force.page.count">
314 <xsl:with-param name="master-reference" select="$master-reference"/>
315 </xsl:call-template>
316 </xsl:attribute>
317
318 <xsl:attribute name="hyphenation-character">
319 <xsl:call-template name="gentext">
320 <xsl:with-param name="key" select="'hyphenation-character'"/>
321 </xsl:call-template>
322 </xsl:attribute>
323 <xsl:attribute name="hyphenation-push-character-count">
324 <xsl:call-template name="gentext">
325 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
326 </xsl:call-template>
327 </xsl:attribute>
328 <xsl:attribute name="hyphenation-remain-character-count">
329 <xsl:call-template name="gentext">
330 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
331 </xsl:call-template>
332 </xsl:attribute>
333
334 <xsl:apply-templates select="." mode="running.head.mode">
335 <xsl:with-param name="master-reference" select="$master-reference"/>
336 </xsl:apply-templates>
337
338 <xsl:apply-templates select="." mode="running.foot.mode">
339 <xsl:with-param name="master-reference" select="$master-reference"/>
340 </xsl:apply-templates>
341
342 <fo:flow flow-name="xsl-region-body">
343 <xsl:call-template name="set.flow.properties">
344 <xsl:with-param name="element" select="local-name(.)"/>
345 <xsl:with-param name="master-reference" select="$master-reference"/>
346 </xsl:call-template>
347
348 <fo:block id="{$id}"
349 xsl:use-attribute-sets="component.titlepage.properties">
350 <xsl:call-template name="preface.titlepage"/>
351 </fo:block>
352
353 <xsl:variable name="toc.params">
354 <xsl:call-template name="find.path.params">
355 <xsl:with-param name="table"
356 select="normalize-space($generate.toc)"/>
357 </xsl:call-template>
358 </xsl:variable>
359 <xsl:if test="contains($toc.params, 'toc')">
360 <xsl:call-template name="component.toc">
361 <xsl:with-param name="toc.title.p"
362 select="contains($toc.params, 'title')"/>
363 </xsl:call-template>
364 <xsl:call-template name="component.toc.separator"/>
365 </xsl:if>
366
367 <xsl:apply-templates/>
368 </fo:flow>
369 </fo:page-sequence>
370</xsl:template>
371
372<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
373<xsl:template match="preface/info"></xsl:template>
374<xsl:template match="preface/title"></xsl:template>
375<xsl:template match="preface/titleabbrev"></xsl:template>
376<xsl:template match="preface/subtitle"></xsl:template>
377
378<!-- ==================================================================== -->
379
380<xsl:template match="chapter">
381 <xsl:variable name="id">
382 <xsl:call-template name="object.id"/>
383 </xsl:variable>
384
385 <xsl:variable name="master-reference">
386 <xsl:call-template name="select.pagemaster"/>
387 </xsl:variable>
388
389 <fo:page-sequence hyphenate="{$hyphenate}"
390 master-reference="{$master-reference}">
391 <xsl:attribute name="language">
392 <xsl:call-template name="l10n.language"/>
393 </xsl:attribute>
394 <xsl:attribute name="format">
395 <xsl:call-template name="page.number.format">
396 <xsl:with-param name="master-reference" select="$master-reference"/>
397 </xsl:call-template>
398 </xsl:attribute>
399 <xsl:attribute name="initial-page-number">
400 <xsl:call-template name="initial.page.number">
401 <xsl:with-param name="master-reference" select="$master-reference"/>
402 </xsl:call-template>
403 </xsl:attribute>
404
405 <xsl:attribute name="force-page-count">
406 <xsl:call-template name="force.page.count">
407 <xsl:with-param name="master-reference" select="$master-reference"/>
408 </xsl:call-template>
409 </xsl:attribute>
410
411 <xsl:attribute name="hyphenation-character">
412 <xsl:call-template name="gentext">
413 <xsl:with-param name="key" select="'hyphenation-character'"/>
414 </xsl:call-template>
415 </xsl:attribute>
416 <xsl:attribute name="hyphenation-push-character-count">
417 <xsl:call-template name="gentext">
418 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
419 </xsl:call-template>
420 </xsl:attribute>
421 <xsl:attribute name="hyphenation-remain-character-count">
422 <xsl:call-template name="gentext">
423 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
424 </xsl:call-template>
425 </xsl:attribute>
426
427 <xsl:apply-templates select="." mode="running.head.mode">
428 <xsl:with-param name="master-reference" select="$master-reference"/>
429 </xsl:apply-templates>
430
431 <xsl:apply-templates select="." mode="running.foot.mode">
432 <xsl:with-param name="master-reference" select="$master-reference"/>
433 </xsl:apply-templates>
434
435 <fo:flow flow-name="xsl-region-body">
436 <xsl:call-template name="set.flow.properties">
437 <xsl:with-param name="element" select="local-name(.)"/>
438 <xsl:with-param name="master-reference" select="$master-reference"/>
439 </xsl:call-template>
440
441 <fo:block id="{$id}"
442 xsl:use-attribute-sets="component.titlepage.properties">
443 <xsl:call-template name="chapter.titlepage"/>
444 </fo:block>
445
446 <xsl:variable name="toc.params">
447 <xsl:call-template name="find.path.params">
448 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
449 </xsl:call-template>
450 </xsl:variable>
451 <xsl:if test="contains($toc.params, 'toc')">
452 <xsl:call-template name="component.toc">
453 <xsl:with-param name="toc.title.p"
454 select="contains($toc.params, 'title')"/>
455 </xsl:call-template>
456 <xsl:call-template name="component.toc.separator"/>
457 </xsl:if>
458 <xsl:apply-templates/>
459 </fo:flow>
460 </fo:page-sequence>
461</xsl:template>
462
463<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
464<xsl:template match="chapter/info"></xsl:template>
465<xsl:template match="chapter/title"></xsl:template>
466<xsl:template match="chapter/titleabbrev"></xsl:template>
467<xsl:template match="chapter/subtitle"></xsl:template>
468
469<!-- ==================================================================== -->
470
471<xsl:template match="appendix">
472 <xsl:variable name="id">
473 <xsl:call-template name="object.id"/>
474 </xsl:variable>
475
476 <xsl:variable name="master-reference">
477 <xsl:call-template name="select.pagemaster"/>
478 </xsl:variable>
479
480 <fo:page-sequence hyphenate="{$hyphenate}"
481 master-reference="{$master-reference}">
482 <xsl:attribute name="language">
483 <xsl:call-template name="l10n.language"/>
484 </xsl:attribute>
485 <xsl:attribute name="format">
486 <xsl:call-template name="page.number.format">
487 <xsl:with-param name="master-reference" select="$master-reference"/>
488 </xsl:call-template>
489 </xsl:attribute>
490 <xsl:attribute name="initial-page-number">
491 <xsl:call-template name="initial.page.number">
492 <xsl:with-param name="master-reference" select="$master-reference"/>
493 </xsl:call-template>
494 </xsl:attribute>
495
496 <xsl:attribute name="force-page-count">
497 <xsl:call-template name="force.page.count">
498 <xsl:with-param name="master-reference" select="$master-reference"/>
499 </xsl:call-template>
500 </xsl:attribute>
501
502 <xsl:attribute name="hyphenation-character">
503 <xsl:call-template name="gentext">
504 <xsl:with-param name="key" select="'hyphenation-character'"/>
505 </xsl:call-template>
506 </xsl:attribute>
507 <xsl:attribute name="hyphenation-push-character-count">
508 <xsl:call-template name="gentext">
509 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
510 </xsl:call-template>
511 </xsl:attribute>
512 <xsl:attribute name="hyphenation-remain-character-count">
513 <xsl:call-template name="gentext">
514 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
515 </xsl:call-template>
516 </xsl:attribute>
517
518 <xsl:apply-templates select="." mode="running.head.mode">
519 <xsl:with-param name="master-reference" select="$master-reference"/>
520 </xsl:apply-templates>
521
522 <xsl:apply-templates select="." mode="running.foot.mode">
523 <xsl:with-param name="master-reference" select="$master-reference"/>
524 </xsl:apply-templates>
525
526 <fo:flow flow-name="xsl-region-body">
527 <xsl:call-template name="set.flow.properties">
528 <xsl:with-param name="element" select="local-name(.)"/>
529 <xsl:with-param name="master-reference" select="$master-reference"/>
530 </xsl:call-template>
531
532 <fo:block id="{$id}"
533 xsl:use-attribute-sets="component.titlepage.properties">
534 <xsl:call-template name="appendix.titlepage"/>
535 </fo:block>
536
537 <xsl:variable name="toc.params">
538 <xsl:call-template name="find.path.params">
539 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
540 </xsl:call-template>
541 </xsl:variable>
542
543 <xsl:if test="contains($toc.params, 'toc')">
544 <xsl:call-template name="component.toc">
545 <xsl:with-param name="toc.title.p"
546 select="contains($toc.params, 'title')"/>
547 </xsl:call-template>
548 <xsl:call-template name="component.toc.separator"/>
549 </xsl:if>
550 <xsl:apply-templates/>
551 </fo:flow>
552 </fo:page-sequence>
553</xsl:template>
554
555<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
556<xsl:template match="appendix/info"></xsl:template>
557<xsl:template match="appendix/title"></xsl:template>
558<xsl:template match="appendix/titleabbrev"></xsl:template>
559<xsl:template match="appendix/subtitle"></xsl:template>
560
561<!-- ==================================================================== -->
562
563<xsl:template match="article">
564 <xsl:variable name="id">
565 <xsl:call-template name="object.id"/>
566 </xsl:variable>
567
568 <xsl:variable name="master-reference">
569 <xsl:call-template name="select.pagemaster"/>
570 </xsl:variable>
571
572 <fo:page-sequence hyphenate="{$hyphenate}"
573 master-reference="{$master-reference}">
574 <xsl:attribute name="language">
575 <xsl:call-template name="l10n.language"/>
576 </xsl:attribute>
577 <xsl:attribute name="format">
578 <xsl:call-template name="page.number.format">
579 <xsl:with-param name="master-reference" select="$master-reference"/>
580 </xsl:call-template>
581 </xsl:attribute>
582 <xsl:attribute name="initial-page-number">
583 <xsl:call-template name="initial.page.number">
584 <xsl:with-param name="master-reference" select="$master-reference"/>
585 </xsl:call-template>
586 </xsl:attribute>
587
588 <xsl:attribute name="force-page-count">
589 <xsl:call-template name="force.page.count">
590 <xsl:with-param name="master-reference" select="$master-reference"/>
591 </xsl:call-template>
592 </xsl:attribute>
593
594 <xsl:attribute name="hyphenation-character">
595 <xsl:call-template name="gentext">
596 <xsl:with-param name="key" select="'hyphenation-character'"/>
597 </xsl:call-template>
598 </xsl:attribute>
599 <xsl:attribute name="hyphenation-push-character-count">
600 <xsl:call-template name="gentext">
601 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
602 </xsl:call-template>
603 </xsl:attribute>
604 <xsl:attribute name="hyphenation-remain-character-count">
605 <xsl:call-template name="gentext">
606 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
607 </xsl:call-template>
608 </xsl:attribute>
609
610 <xsl:apply-templates select="." mode="running.head.mode">
611 <xsl:with-param name="master-reference" select="$master-reference"/>
612 </xsl:apply-templates>
613
614 <xsl:apply-templates select="." mode="running.foot.mode">
615 <xsl:with-param name="master-reference" select="$master-reference"/>
616 </xsl:apply-templates>
617
618 <fo:flow flow-name="xsl-region-body">
619 <xsl:call-template name="set.flow.properties">
620 <xsl:with-param name="element" select="local-name(.)"/>
621 <xsl:with-param name="master-reference" select="$master-reference"/>
622 </xsl:call-template>
623
624 <fo:block id="{$id}"
625 xsl:use-attribute-sets="component.titlepage.properties">
626 <xsl:call-template name="article.titlepage"/>
627 </fo:block>
628
629 <xsl:variable name="toc.params">
630 <xsl:call-template name="find.path.params">
631 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
632 </xsl:call-template>
633 </xsl:variable>
634
635 <xsl:if test="contains($toc.params, 'toc')">
636 <xsl:call-template name="component.toc">
637 <xsl:with-param name="toc.title.p"
638 select="contains($toc.params, 'title')"/>
639 </xsl:call-template>
640 <xsl:call-template name="component.toc.separator"/>
641 </xsl:if>
642 <xsl:apply-templates/>
643 </fo:flow>
644 </fo:page-sequence>
645</xsl:template>
646
647<xsl:template match="article/artheader"></xsl:template>
648<xsl:template match="article/articleinfo"></xsl:template>
649<xsl:template match="article/info"></xsl:template>
650<xsl:template match="article/title"></xsl:template>
651<xsl:template match="article/subtitle"></xsl:template>
652<xsl:template match="article/titleabbrev"></xsl:template>
653
654<xsl:template match="article/appendix">
655 <xsl:variable name="id">
656 <xsl:call-template name="object.id"/>
657 </xsl:variable>
658
659 <xsl:variable name="title">
660 <xsl:apply-templates select="." mode="object.title.markup"/>
661 </xsl:variable>
662
663 <xsl:variable name="titleabbrev">
664 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
665 </xsl:variable>
666
667 <fo:block id='{$id}'>
668 <xsl:if test="$axf.extensions != 0">
669 <xsl:attribute name="axf:outline-level">
670 <xsl:value-of select="count(ancestor::*)+2"/>
671 </xsl:attribute>
672 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
673 <xsl:attribute name="axf:outline-title">
674 <xsl:value-of select="normalize-space($titleabbrev)"/>
675 </xsl:attribute>
676 </xsl:if>
677
678 <xsl:if test="$passivetex.extensions != 0">
679 <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
680 fotex-bookmark-level="{count(ancestor::*)+2}"
681 fotex-bookmark-label="{$id}">
682 <xsl:value-of select="$titleabbrev"/>
683 </fotex:bookmark>
684 </xsl:if>
685
686 <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
687 <fo:marker marker-class-name="section.head.marker">
688 <xsl:choose>
689 <xsl:when test="$titleabbrev = ''">
690 <xsl:value-of select="$title"/>
691 </xsl:when>
692 <xsl:otherwise>
693 <xsl:value-of select="$titleabbrev"/>
694 </xsl:otherwise>
695 </xsl:choose>
696 </fo:marker>
697 <xsl:copy-of select="$title"/>
698 </fo:block>
699
700 <xsl:apply-templates/>
701 </fo:block>
702</xsl:template>
703
704<!-- ==================================================================== -->
705
706<!-- Utility template to create a page sequence for an element -->
707<xsl:template match="*" mode="page.sequence" name="page.sequence">
708 <xsl:param name="content">
709 <xsl:apply-templates/>
710 </xsl:param>
711 <xsl:param name="master-reference">
712 <xsl:call-template name="select.pagemaster"/>
713 </xsl:param>
714 <xsl:param name="element" select="local-name(.)"/>
715 <xsl:param name="gentext-key" select="local-name(.)"/>
[00b1e11]716 <xsl:param name="language">
717 <xsl:call-template name="l10n.language"/>
718 </xsl:param>
719
720 <xsl:param name="format">
721 <xsl:call-template name="page.number.format">
722 <xsl:with-param name="master-reference" select="$master-reference"/>
723 <xsl:with-param name="element" select="$element"/>
724 </xsl:call-template>
725 </xsl:param>
726
727 <xsl:param name="initial-page-number">
728 <xsl:call-template name="initial.page.number">
729 <xsl:with-param name="master-reference" select="$master-reference"/>
730 <xsl:with-param name="element" select="$element"/>
731 </xsl:call-template>
732 </xsl:param>
733
734 <xsl:param name="force-page-count">
735 <xsl:call-template name="force.page.count">
736 <xsl:with-param name="master-reference" select="$master-reference"/>
737 <xsl:with-param name="element" select="$element"/>
738 </xsl:call-template>
739 </xsl:param>
[9882b55]740
741 <fo:page-sequence hyphenate="{$hyphenate}"
742 master-reference="{$master-reference}">
743 <xsl:attribute name="language">
[00b1e11]744 <xsl:value-of select="$language"/>
[9882b55]745 </xsl:attribute>
746 <xsl:attribute name="format">
[00b1e11]747 <xsl:value-of select="$format"/>
[9882b55]748 </xsl:attribute>
749
750 <xsl:attribute name="initial-page-number">
[00b1e11]751 <xsl:value-of select="$initial-page-number"/>
[9882b55]752 </xsl:attribute>
753
754 <xsl:attribute name="force-page-count">
[00b1e11]755 <xsl:value-of select="$force-page-count"/>
[9882b55]756 </xsl:attribute>
757
758 <xsl:attribute name="hyphenation-character">
759 <xsl:call-template name="gentext">
760 <xsl:with-param name="key" select="'hyphenation-character'"/>
761 </xsl:call-template>
762 </xsl:attribute>
763 <xsl:attribute name="hyphenation-push-character-count">
764 <xsl:call-template name="gentext">
765 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
766 </xsl:call-template>
767 </xsl:attribute>
768 <xsl:attribute name="hyphenation-remain-character-count">
769 <xsl:call-template name="gentext">
770 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
771 </xsl:call-template>
772 </xsl:attribute>
773
774 <xsl:apply-templates select="." mode="running.head.mode">
775 <xsl:with-param name="master-reference" select="$master-reference"/>
776 <xsl:with-param name="gentext-key" select="$gentext-key"/>
777 </xsl:apply-templates>
778
779 <xsl:apply-templates select="." mode="running.foot.mode">
780 <xsl:with-param name="master-reference" select="$master-reference"/>
781 <xsl:with-param name="gentext-key" select="$gentext-key"/>
782 </xsl:apply-templates>
783
784 <fo:flow flow-name="xsl-region-body">
785 <xsl:call-template name="set.flow.properties">
786 <xsl:with-param name="element" select="local-name(.)"/>
787 <xsl:with-param name="master-reference" select="$master-reference"/>
788 </xsl:call-template>
789
790 <xsl:copy-of select="$content"/>
791
792 </fo:flow>
793 </fo:page-sequence>
794</xsl:template>
795
796</xsl:stylesheet>
797
Note: See TracBrowser for help on using the repository browser.