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"
7 <!-- ********************************************************************
8 $Id: component.xsl 8320 2009-03-12 17:43:44Z mzjn $
9 ********************************************************************
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.
15 ******************************************************************** -->
17 <!-- ==================================================================== -->
20 <xsl:template name="component.title">
21 <xsl:param name="node" select="."/>
22 <xsl:param name="pagewide" select="0"/>
24 <xsl:variable name="id">
25 <xsl:call-template name="object.id">
26 <xsl:with-param name="object" select="$node"/>
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>
36 <xsl:variable name="titleabbrev">
37 <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
40 <xsl:variable name="level">
42 <xsl:when test="ancestor::section">
43 <xsl:value-of select="count(ancestor::section)+1"/>
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>
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"/>
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>
67 <xsl:attribute name="hyphenation-character">
68 <xsl:call-template name="gentext">
69 <xsl:with-param name="key" select="'hyphenation-character'"/>
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'"/>
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'"/>
82 <xsl:if test="$axf.extensions != 0">
83 <xsl:attribute name="axf:outline-level">
84 <xsl:value-of select="count($node/ancestor::*)"/>
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)"/>
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... -->
98 <xsl:when test="$level=2">
99 <fo:block xsl:use-attribute-sets="section.title.level2.properties">
100 <xsl:copy-of select="$title"/>
103 <xsl:when test="$level=3">
104 <fo:block xsl:use-attribute-sets="section.title.level3.properties">
105 <xsl:copy-of select="$title"/>
108 <xsl:when test="$level=4">
109 <fo:block xsl:use-attribute-sets="section.title.level4.properties">
110 <xsl:copy-of select="$title"/>
113 <xsl:when test="$level=5">
114 <fo:block xsl:use-attribute-sets="section.title.level5.properties">
115 <xsl:copy-of select="$title"/>
118 <xsl:when test="$level=6">
119 <fo:block xsl:use-attribute-sets="section.title.level6.properties">
120 <xsl:copy-of select="$title"/>
124 <!-- not in a section: do nothing special -->
125 <xsl:copy-of select="$title"/>
131 <!-- ==================================================================== -->
133 <xsl:template match="dedication" mode="dedication">
134 <xsl:variable name="id">
135 <xsl:call-template name="object.id"/>
138 <xsl:variable name="master-reference">
139 <xsl:call-template name="select.pagemaster"/>
142 <fo:page-sequence hyphenate="{$hyphenate}"
143 master-reference="{$master-reference}">
144 <xsl:attribute name="language">
145 <xsl:call-template name="l10n.language"/>
147 <xsl:attribute name="format">
148 <xsl:call-template name="page.number.format">
149 <xsl:with-param name="master-reference" select="$master-reference"/>
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"/>
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"/>
165 <xsl:attribute name="hyphenation-character">
166 <xsl:call-template name="gentext">
167 <xsl:with-param name="key" select="'hyphenation-character'"/>
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'"/>
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'"/>
181 <xsl:apply-templates select="." mode="running.head.mode">
182 <xsl:with-param name="master-reference" select="$master-reference"/>
183 </xsl:apply-templates>
185 <xsl:apply-templates select="." mode="running.foot.mode">
186 <xsl:with-param name="master-reference" select="$master-reference"/>
187 </xsl:apply-templates>
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"/>
196 xsl:use-attribute-sets="component.titlepage.properties">
197 <xsl:call-template name="dedication.titlepage"/>
199 <xsl:apply-templates/>
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>
210 <!-- ==================================================================== -->
212 <xsl:template match="acknowledgements" mode="acknowledgements">
213 <xsl:variable name="id">
214 <xsl:call-template name="object.id"/>
217 <xsl:variable name="master-reference">
218 <xsl:call-template name="select.pagemaster"/>
221 <fo:page-sequence hyphenate="{$hyphenate}"
222 master-reference="{$master-reference}">
223 <xsl:attribute name="language">
224 <xsl:call-template name="l10n.language"/>
226 <xsl:attribute name="format">
227 <xsl:call-template name="page.number.format">
228 <xsl:with-param name="master-reference" select="$master-reference"/>
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"/>
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"/>
241 <xsl:attribute name="hyphenation-character">
242 <xsl:call-template name="gentext">
243 <xsl:with-param name="key" select="'hyphenation-character'"/>
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'"/>
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'"/>
257 <xsl:apply-templates select="." mode="running.head.mode">
258 <xsl:with-param name="master-reference" select="$master-reference"/>
259 </xsl:apply-templates>
261 <xsl:apply-templates select="." mode="running.foot.mode">
262 <xsl:with-param name="master-reference" select="$master-reference"/>
263 </xsl:apply-templates>
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"/>
272 xsl:use-attribute-sets="component.titlepage.properties">
273 <xsl:call-template name="acknowledgements.titlepage"/>
275 <xsl:apply-templates/>
280 <xsl:template match="acknowledgements"></xsl:template>
281 <xsl:template match="acknowledgements/info"></xsl:template>
282 <xsl:template match="acknowledgements/title"></xsl:template>
283 <xsl:template match="acknowledgements/titleabbrev"></xsl:template>
284 <xsl:template match="acknowledgements/subtitle"></xsl:template>
286 <!-- ==================================================================== -->
288 <xsl:template match="colophon">
289 <xsl:variable name="id">
290 <xsl:call-template name="object.id"/>
293 <xsl:variable name="master-reference">
294 <xsl:call-template name="select.pagemaster"/>
297 <fo:page-sequence hyphenate="{$hyphenate}"
298 master-reference="{$master-reference}">
299 <xsl:attribute name="language">
300 <xsl:call-template name="l10n.language"/>
302 <xsl:attribute name="format">
303 <xsl:call-template name="page.number.format">
304 <xsl:with-param name="master-reference" select="$master-reference"/>
307 <xsl:attribute name="initial-page-number">
308 <xsl:call-template name="initial.page.number">
309 <xsl:with-param name="master-reference" select="$master-reference"/>
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"/>
317 <xsl:attribute name="hyphenation-character">
318 <xsl:call-template name="gentext">
319 <xsl:with-param name="key" select="'hyphenation-character'"/>
322 <xsl:attribute name="hyphenation-push-character-count">
323 <xsl:call-template name="gentext">
324 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
327 <xsl:attribute name="hyphenation-remain-character-count">
328 <xsl:call-template name="gentext">
329 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
333 <xsl:apply-templates select="." mode="running.head.mode">
334 <xsl:with-param name="master-reference" select="$master-reference"/>
335 </xsl:apply-templates>
337 <xsl:apply-templates select="." mode="running.foot.mode">
338 <xsl:with-param name="master-reference" select="$master-reference"/>
339 </xsl:apply-templates>
341 <fo:flow flow-name="xsl-region-body">
342 <xsl:call-template name="set.flow.properties">
343 <xsl:with-param name="element" select="local-name(.)"/>
344 <xsl:with-param name="master-reference" select="$master-reference"/>
348 xsl:use-attribute-sets="component.titlepage.properties">
349 <xsl:call-template name="colophon.titlepage"/>
351 <xsl:apply-templates/>
356 <xsl:template match="colophon/title"></xsl:template>
357 <xsl:template match="colophon/subtitle"></xsl:template>
358 <xsl:template match="colophon/titleabbrev"></xsl:template>
360 <!-- ==================================================================== -->
362 <xsl:template match="preface">
363 <xsl:variable name="id">
364 <xsl:call-template name="object.id"/>
367 <xsl:variable name="master-reference">
368 <xsl:call-template name="select.pagemaster"/>
371 <fo:page-sequence hyphenate="{$hyphenate}"
372 master-reference="{$master-reference}">
373 <xsl:attribute name="language">
374 <xsl:call-template name="l10n.language"/>
376 <xsl:attribute name="format">
377 <xsl:call-template name="page.number.format">
378 <xsl:with-param name="master-reference" select="$master-reference"/>
382 <xsl:attribute name="initial-page-number">
383 <xsl:call-template name="initial.page.number">
384 <xsl:with-param name="master-reference" select="$master-reference"/>
388 <xsl:attribute name="force-page-count">
389 <xsl:call-template name="force.page.count">
390 <xsl:with-param name="master-reference" select="$master-reference"/>
394 <xsl:attribute name="hyphenation-character">
395 <xsl:call-template name="gentext">
396 <xsl:with-param name="key" select="'hyphenation-character'"/>
399 <xsl:attribute name="hyphenation-push-character-count">
400 <xsl:call-template name="gentext">
401 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
404 <xsl:attribute name="hyphenation-remain-character-count">
405 <xsl:call-template name="gentext">
406 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
410 <xsl:apply-templates select="." mode="running.head.mode">
411 <xsl:with-param name="master-reference" select="$master-reference"/>
412 </xsl:apply-templates>
414 <xsl:apply-templates select="." mode="running.foot.mode">
415 <xsl:with-param name="master-reference" select="$master-reference"/>
416 </xsl:apply-templates>
418 <fo:flow flow-name="xsl-region-body">
419 <xsl:call-template name="set.flow.properties">
420 <xsl:with-param name="element" select="local-name(.)"/>
421 <xsl:with-param name="master-reference" select="$master-reference"/>
425 xsl:use-attribute-sets="component.titlepage.properties">
426 <xsl:call-template name="preface.titlepage"/>
429 <xsl:variable name="toc.params">
430 <xsl:call-template name="find.path.params">
431 <xsl:with-param name="table"
432 select="normalize-space($generate.toc)"/>
435 <xsl:if test="contains($toc.params, 'toc')">
436 <xsl:call-template name="component.toc">
437 <xsl:with-param name="toc.title.p"
438 select="contains($toc.params, 'title')"/>
440 <xsl:call-template name="component.toc.separator"/>
443 <xsl:apply-templates/>
448 <xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
449 <xsl:template match="preface/info"></xsl:template>
450 <xsl:template match="preface/title"></xsl:template>
451 <xsl:template match="preface/titleabbrev"></xsl:template>
452 <xsl:template match="preface/subtitle"></xsl:template>
454 <!-- ==================================================================== -->
456 <xsl:template match="chapter">
457 <xsl:variable name="id">
458 <xsl:call-template name="object.id"/>
461 <xsl:variable name="master-reference">
462 <xsl:call-template name="select.pagemaster"/>
465 <fo:page-sequence hyphenate="{$hyphenate}"
466 master-reference="{$master-reference}">
467 <xsl:attribute name="language">
468 <xsl:call-template name="l10n.language"/>
470 <xsl:attribute name="format">
471 <xsl:call-template name="page.number.format">
472 <xsl:with-param name="master-reference" select="$master-reference"/>
475 <xsl:attribute name="initial-page-number">
476 <xsl:call-template name="initial.page.number">
477 <xsl:with-param name="master-reference" select="$master-reference"/>
481 <xsl:attribute name="force-page-count">
482 <xsl:call-template name="force.page.count">
483 <xsl:with-param name="master-reference" select="$master-reference"/>
487 <xsl:attribute name="hyphenation-character">
488 <xsl:call-template name="gentext">
489 <xsl:with-param name="key" select="'hyphenation-character'"/>
492 <xsl:attribute name="hyphenation-push-character-count">
493 <xsl:call-template name="gentext">
494 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
497 <xsl:attribute name="hyphenation-remain-character-count">
498 <xsl:call-template name="gentext">
499 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
503 <xsl:apply-templates select="." mode="running.head.mode">
504 <xsl:with-param name="master-reference" select="$master-reference"/>
505 </xsl:apply-templates>
507 <xsl:apply-templates select="." mode="running.foot.mode">
508 <xsl:with-param name="master-reference" select="$master-reference"/>
509 </xsl:apply-templates>
511 <fo:flow flow-name="xsl-region-body">
512 <xsl:call-template name="set.flow.properties">
513 <xsl:with-param name="element" select="local-name(.)"/>
514 <xsl:with-param name="master-reference" select="$master-reference"/>
518 xsl:use-attribute-sets="component.titlepage.properties">
519 <xsl:call-template name="chapter.titlepage"/>
522 <xsl:variable name="toc.params">
523 <xsl:call-template name="find.path.params">
524 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
527 <xsl:if test="contains($toc.params, 'toc')">
528 <xsl:call-template name="component.toc">
529 <xsl:with-param name="toc.title.p"
530 select="contains($toc.params, 'title')"/>
532 <xsl:call-template name="component.toc.separator"/>
534 <xsl:apply-templates/>
539 <xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
540 <xsl:template match="chapter/info"></xsl:template>
541 <xsl:template match="chapter/title"></xsl:template>
542 <xsl:template match="chapter/titleabbrev"></xsl:template>
543 <xsl:template match="chapter/subtitle"></xsl:template>
545 <!-- ==================================================================== -->
547 <xsl:template match="appendix">
548 <xsl:variable name="id">
549 <xsl:call-template name="object.id"/>
552 <xsl:variable name="master-reference">
553 <xsl:call-template name="select.pagemaster"/>
556 <fo:page-sequence hyphenate="{$hyphenate}"
557 master-reference="{$master-reference}">
558 <xsl:attribute name="language">
559 <xsl:call-template name="l10n.language"/>
561 <xsl:attribute name="format">
562 <xsl:call-template name="page.number.format">
563 <xsl:with-param name="master-reference" select="$master-reference"/>
566 <xsl:attribute name="initial-page-number">
567 <xsl:call-template name="initial.page.number">
568 <xsl:with-param name="master-reference" select="$master-reference"/>
572 <xsl:attribute name="force-page-count">
573 <xsl:call-template name="force.page.count">
574 <xsl:with-param name="master-reference" select="$master-reference"/>
578 <xsl:attribute name="hyphenation-character">
579 <xsl:call-template name="gentext">
580 <xsl:with-param name="key" select="'hyphenation-character'"/>
583 <xsl:attribute name="hyphenation-push-character-count">
584 <xsl:call-template name="gentext">
585 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
588 <xsl:attribute name="hyphenation-remain-character-count">
589 <xsl:call-template name="gentext">
590 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
594 <xsl:apply-templates select="." mode="running.head.mode">
595 <xsl:with-param name="master-reference" select="$master-reference"/>
596 </xsl:apply-templates>
598 <xsl:apply-templates select="." mode="running.foot.mode">
599 <xsl:with-param name="master-reference" select="$master-reference"/>
600 </xsl:apply-templates>
602 <fo:flow flow-name="xsl-region-body">
603 <xsl:call-template name="set.flow.properties">
604 <xsl:with-param name="element" select="local-name(.)"/>
605 <xsl:with-param name="master-reference" select="$master-reference"/>
609 xsl:use-attribute-sets="component.titlepage.properties">
610 <xsl:call-template name="appendix.titlepage"/>
613 <xsl:variable name="toc.params">
614 <xsl:call-template name="find.path.params">
615 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
619 <xsl:if test="contains($toc.params, 'toc')">
620 <xsl:call-template name="component.toc">
621 <xsl:with-param name="toc.title.p"
622 select="contains($toc.params, 'title')"/>
624 <xsl:call-template name="component.toc.separator"/>
626 <xsl:apply-templates/>
631 <xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
632 <xsl:template match="appendix/info"></xsl:template>
633 <xsl:template match="appendix/title"></xsl:template>
634 <xsl:template match="appendix/titleabbrev"></xsl:template>
635 <xsl:template match="appendix/subtitle"></xsl:template>
637 <!-- ==================================================================== -->
639 <xsl:template match="article">
640 <xsl:variable name="id">
641 <xsl:call-template name="object.id"/>
644 <xsl:variable name="master-reference">
645 <xsl:call-template name="select.pagemaster"/>
648 <fo:page-sequence hyphenate="{$hyphenate}"
649 master-reference="{$master-reference}">
650 <xsl:attribute name="language">
651 <xsl:call-template name="l10n.language"/>
653 <xsl:attribute name="format">
654 <xsl:call-template name="page.number.format">
655 <xsl:with-param name="master-reference" select="$master-reference"/>
658 <xsl:attribute name="initial-page-number">
659 <xsl:call-template name="initial.page.number">
660 <xsl:with-param name="master-reference" select="$master-reference"/>
664 <xsl:attribute name="force-page-count">
665 <xsl:call-template name="force.page.count">
666 <xsl:with-param name="master-reference" select="$master-reference"/>
670 <xsl:attribute name="hyphenation-character">
671 <xsl:call-template name="gentext">
672 <xsl:with-param name="key" select="'hyphenation-character'"/>
675 <xsl:attribute name="hyphenation-push-character-count">
676 <xsl:call-template name="gentext">
677 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
680 <xsl:attribute name="hyphenation-remain-character-count">
681 <xsl:call-template name="gentext">
682 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
686 <xsl:apply-templates select="." mode="running.head.mode">
687 <xsl:with-param name="master-reference" select="$master-reference"/>
688 </xsl:apply-templates>
690 <xsl:apply-templates select="." mode="running.foot.mode">
691 <xsl:with-param name="master-reference" select="$master-reference"/>
692 </xsl:apply-templates>
694 <fo:flow flow-name="xsl-region-body">
695 <xsl:call-template name="set.flow.properties">
696 <xsl:with-param name="element" select="local-name(.)"/>
697 <xsl:with-param name="master-reference" select="$master-reference"/>
701 xsl:use-attribute-sets="component.titlepage.properties">
702 <xsl:call-template name="article.titlepage"/>
705 <xsl:variable name="toc.params">
706 <xsl:call-template name="find.path.params">
707 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
711 <xsl:if test="contains($toc.params, 'toc')">
712 <xsl:call-template name="component.toc">
713 <xsl:with-param name="toc.title.p"
714 select="contains($toc.params, 'title')"/>
716 <xsl:call-template name="component.toc.separator"/>
718 <xsl:apply-templates/>
723 <xsl:template match="article/artheader"></xsl:template>
724 <xsl:template match="article/articleinfo"></xsl:template>
725 <xsl:template match="article/info"></xsl:template>
726 <xsl:template match="article/title"></xsl:template>
727 <xsl:template match="article/subtitle"></xsl:template>
728 <xsl:template match="article/titleabbrev"></xsl:template>
730 <xsl:template match="article/appendix">
731 <xsl:variable name="id">
732 <xsl:call-template name="object.id"/>
735 <xsl:variable name="title">
736 <xsl:apply-templates select="." mode="object.title.markup"/>
739 <xsl:variable name="titleabbrev">
740 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
743 <fo:block id='{$id}'>
744 <xsl:if test="$axf.extensions != 0">
745 <xsl:attribute name="axf:outline-level">
746 <xsl:value-of select="count(ancestor::*)+2"/>
748 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
749 <xsl:attribute name="axf:outline-title">
750 <xsl:value-of select="normalize-space($titleabbrev)"/>
754 <xsl:if test="$passivetex.extensions != 0">
755 <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
756 fotex-bookmark-level="{count(ancestor::*)+2}"
757 fotex-bookmark-label="{$id}">
758 <xsl:value-of select="$titleabbrev"/>
762 <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
763 <fo:marker marker-class-name="section.head.marker">
765 <xsl:when test="$titleabbrev = ''">
766 <xsl:value-of select="$title"/>
769 <xsl:value-of select="$titleabbrev"/>
773 <xsl:copy-of select="$title"/>
776 <xsl:variable name="toc.params">
777 <xsl:call-template name="find.path.params">
778 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
782 <xsl:if test="contains($toc.params, 'toc')">
783 <xsl:call-template name="component.toc">
784 <xsl:with-param name="toc.title.p"
785 select="contains($toc.params, 'title')"/>
787 <xsl:call-template name="component.toc.separator"/>
790 <xsl:apply-templates/>
794 <!-- ==================================================================== -->
796 <!-- Utility template to create a page sequence for an element -->
797 <xsl:template match="*" mode="page.sequence" name="page.sequence">
798 <xsl:param name="content">
799 <xsl:apply-templates/>
801 <xsl:param name="master-reference">
802 <xsl:call-template name="select.pagemaster"/>
804 <xsl:param name="element" select="local-name(.)"/>
805 <xsl:param name="gentext-key" select="local-name(.)"/>
806 <xsl:param name="language">
807 <xsl:call-template name="l10n.language"/>
810 <xsl:param name="format">
811 <xsl:call-template name="page.number.format">
812 <xsl:with-param name="master-reference" select="$master-reference"/>
813 <xsl:with-param name="element" select="$element"/>
817 <xsl:param name="initial-page-number">
818 <xsl:call-template name="initial.page.number">
819 <xsl:with-param name="master-reference" select="$master-reference"/>
820 <xsl:with-param name="element" select="$element"/>
824 <xsl:param name="force-page-count">
825 <xsl:call-template name="force.page.count">
826 <xsl:with-param name="master-reference" select="$master-reference"/>
827 <xsl:with-param name="element" select="$element"/>
831 <fo:page-sequence hyphenate="{$hyphenate}"
832 master-reference="{$master-reference}">
833 <xsl:attribute name="language">
834 <xsl:value-of select="$language"/>
836 <xsl:attribute name="format">
837 <xsl:value-of select="$format"/>
840 <xsl:attribute name="initial-page-number">
841 <xsl:value-of select="$initial-page-number"/>
844 <xsl:attribute name="force-page-count">
845 <xsl:value-of select="$force-page-count"/>
848 <xsl:attribute name="hyphenation-character">
849 <xsl:call-template name="gentext">
850 <xsl:with-param name="key" select="'hyphenation-character'"/>
853 <xsl:attribute name="hyphenation-push-character-count">
854 <xsl:call-template name="gentext">
855 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
858 <xsl:attribute name="hyphenation-remain-character-count">
859 <xsl:call-template name="gentext">
860 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
864 <xsl:apply-templates select="." mode="running.head.mode">
865 <xsl:with-param name="master-reference" select="$master-reference"/>
866 <xsl:with-param name="gentext-key" select="$gentext-key"/>
867 </xsl:apply-templates>
869 <xsl:apply-templates select="." mode="running.foot.mode">
870 <xsl:with-param name="master-reference" select="$master-reference"/>
871 <xsl:with-param name="gentext-key" select="$gentext-key"/>
872 </xsl:apply-templates>
874 <fo:flow flow-name="xsl-region-body">
875 <xsl:call-template name="set.flow.properties">
876 <xsl:with-param name="element" select="local-name(.)"/>
877 <xsl:with-param name="master-reference" select="$master-reference"/>
880 <xsl:copy-of select="$content"/>