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 9293 2012-04-19 18:42:11Z bobstayton $
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 <!-- article/colophon has no page sequence -->
361 <xsl:template match="article/colophon">
362 <xsl:variable name="id">
363 <xsl:call-template name="object.id"/>
366 <fo:block id="{$id}">
367 <fo:block xsl:use-attribute-sets="component.titlepage.properties">
368 <xsl:call-template name="colophon.titlepage"/>
370 <xsl:apply-templates/>
374 <!-- ==================================================================== -->
376 <xsl:template match="preface">
377 <xsl:variable name="id">
378 <xsl:call-template name="object.id"/>
381 <xsl:variable name="master-reference">
382 <xsl:call-template name="select.pagemaster"/>
385 <fo:page-sequence hyphenate="{$hyphenate}"
386 master-reference="{$master-reference}">
387 <xsl:attribute name="language">
388 <xsl:call-template name="l10n.language"/>
390 <xsl:attribute name="format">
391 <xsl:call-template name="page.number.format">
392 <xsl:with-param name="master-reference" select="$master-reference"/>
396 <xsl:attribute name="initial-page-number">
397 <xsl:call-template name="initial.page.number">
398 <xsl:with-param name="master-reference" select="$master-reference"/>
402 <xsl:attribute name="force-page-count">
403 <xsl:call-template name="force.page.count">
404 <xsl:with-param name="master-reference" select="$master-reference"/>
408 <xsl:attribute name="hyphenation-character">
409 <xsl:call-template name="gentext">
410 <xsl:with-param name="key" select="'hyphenation-character'"/>
413 <xsl:attribute name="hyphenation-push-character-count">
414 <xsl:call-template name="gentext">
415 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
418 <xsl:attribute name="hyphenation-remain-character-count">
419 <xsl:call-template name="gentext">
420 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
424 <xsl:apply-templates select="." mode="running.head.mode">
425 <xsl:with-param name="master-reference" select="$master-reference"/>
426 </xsl:apply-templates>
428 <xsl:apply-templates select="." mode="running.foot.mode">
429 <xsl:with-param name="master-reference" select="$master-reference"/>
430 </xsl:apply-templates>
432 <fo:flow flow-name="xsl-region-body">
433 <xsl:call-template name="set.flow.properties">
434 <xsl:with-param name="element" select="local-name(.)"/>
435 <xsl:with-param name="master-reference" select="$master-reference"/>
439 xsl:use-attribute-sets="component.titlepage.properties">
440 <xsl:call-template name="preface.titlepage"/>
443 <xsl:call-template name="make.component.tocs"/>
445 <xsl:apply-templates/>
450 <xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
451 <xsl:template match="preface/info"></xsl:template>
452 <xsl:template match="preface/title"></xsl:template>
453 <xsl:template match="preface/titleabbrev"></xsl:template>
454 <xsl:template match="preface/subtitle"></xsl:template>
456 <!-- ==================================================================== -->
458 <xsl:template match="chapter">
459 <xsl:variable name="id">
460 <xsl:call-template name="object.id"/>
463 <xsl:variable name="master-reference">
464 <xsl:call-template name="select.pagemaster"/>
467 <fo:page-sequence hyphenate="{$hyphenate}"
468 master-reference="{$master-reference}">
469 <xsl:attribute name="language">
470 <xsl:call-template name="l10n.language"/>
472 <xsl:attribute name="format">
473 <xsl:call-template name="page.number.format">
474 <xsl:with-param name="master-reference" select="$master-reference"/>
477 <xsl:attribute name="initial-page-number">
478 <xsl:call-template name="initial.page.number">
479 <xsl:with-param name="master-reference" select="$master-reference"/>
483 <xsl:attribute name="force-page-count">
484 <xsl:call-template name="force.page.count">
485 <xsl:with-param name="master-reference" select="$master-reference"/>
489 <xsl:attribute name="hyphenation-character">
490 <xsl:call-template name="gentext">
491 <xsl:with-param name="key" select="'hyphenation-character'"/>
494 <xsl:attribute name="hyphenation-push-character-count">
495 <xsl:call-template name="gentext">
496 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
499 <xsl:attribute name="hyphenation-remain-character-count">
500 <xsl:call-template name="gentext">
501 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
505 <xsl:apply-templates select="." mode="running.head.mode">
506 <xsl:with-param name="master-reference" select="$master-reference"/>
507 </xsl:apply-templates>
509 <xsl:apply-templates select="." mode="running.foot.mode">
510 <xsl:with-param name="master-reference" select="$master-reference"/>
511 </xsl:apply-templates>
513 <fo:flow flow-name="xsl-region-body">
514 <xsl:call-template name="set.flow.properties">
515 <xsl:with-param name="element" select="local-name(.)"/>
516 <xsl:with-param name="master-reference" select="$master-reference"/>
520 xsl:use-attribute-sets="component.titlepage.properties">
521 <xsl:call-template name="chapter.titlepage"/>
524 <xsl:call-template name="make.component.tocs"/>
526 <xsl:apply-templates/>
531 <xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
532 <xsl:template match="chapter/info"></xsl:template>
533 <xsl:template match="chapter/title"></xsl:template>
534 <xsl:template match="chapter/titleabbrev"></xsl:template>
535 <xsl:template match="chapter/subtitle"></xsl:template>
537 <!-- ==================================================================== -->
539 <xsl:template match="appendix">
540 <xsl:variable name="id">
541 <xsl:call-template name="object.id"/>
544 <xsl:variable name="master-reference">
545 <xsl:call-template name="select.pagemaster"/>
548 <fo:page-sequence hyphenate="{$hyphenate}"
549 master-reference="{$master-reference}">
550 <xsl:attribute name="language">
551 <xsl:call-template name="l10n.language"/>
553 <xsl:attribute name="format">
554 <xsl:call-template name="page.number.format">
555 <xsl:with-param name="master-reference" select="$master-reference"/>
558 <xsl:attribute name="initial-page-number">
559 <xsl:call-template name="initial.page.number">
560 <xsl:with-param name="master-reference" select="$master-reference"/>
564 <xsl:attribute name="force-page-count">
565 <xsl:call-template name="force.page.count">
566 <xsl:with-param name="master-reference" select="$master-reference"/>
570 <xsl:attribute name="hyphenation-character">
571 <xsl:call-template name="gentext">
572 <xsl:with-param name="key" select="'hyphenation-character'"/>
575 <xsl:attribute name="hyphenation-push-character-count">
576 <xsl:call-template name="gentext">
577 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
580 <xsl:attribute name="hyphenation-remain-character-count">
581 <xsl:call-template name="gentext">
582 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
586 <xsl:apply-templates select="." mode="running.head.mode">
587 <xsl:with-param name="master-reference" select="$master-reference"/>
588 </xsl:apply-templates>
590 <xsl:apply-templates select="." mode="running.foot.mode">
591 <xsl:with-param name="master-reference" select="$master-reference"/>
592 </xsl:apply-templates>
594 <fo:flow flow-name="xsl-region-body">
595 <xsl:call-template name="set.flow.properties">
596 <xsl:with-param name="element" select="local-name(.)"/>
597 <xsl:with-param name="master-reference" select="$master-reference"/>
601 xsl:use-attribute-sets="component.titlepage.properties">
602 <xsl:call-template name="appendix.titlepage"/>
605 <xsl:call-template name="make.component.tocs"/>
607 <xsl:apply-templates/>
612 <xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
613 <xsl:template match="appendix/info"></xsl:template>
614 <xsl:template match="appendix/title"></xsl:template>
615 <xsl:template match="appendix/titleabbrev"></xsl:template>
616 <xsl:template match="appendix/subtitle"></xsl:template>
618 <!-- ==================================================================== -->
620 <xsl:template match="article">
621 <xsl:variable name="id">
622 <xsl:call-template name="object.id"/>
625 <xsl:variable name="master-reference">
626 <xsl:call-template name="select.pagemaster"/>
629 <fo:page-sequence hyphenate="{$hyphenate}"
630 master-reference="{$master-reference}">
631 <xsl:attribute name="language">
632 <xsl:call-template name="l10n.language"/>
634 <xsl:attribute name="format">
635 <xsl:call-template name="page.number.format">
636 <xsl:with-param name="master-reference" select="$master-reference"/>
639 <xsl:attribute name="initial-page-number">
640 <xsl:call-template name="initial.page.number">
641 <xsl:with-param name="master-reference" select="$master-reference"/>
645 <xsl:attribute name="force-page-count">
646 <xsl:call-template name="force.page.count">
647 <xsl:with-param name="master-reference" select="$master-reference"/>
651 <xsl:attribute name="hyphenation-character">
652 <xsl:call-template name="gentext">
653 <xsl:with-param name="key" select="'hyphenation-character'"/>
656 <xsl:attribute name="hyphenation-push-character-count">
657 <xsl:call-template name="gentext">
658 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
661 <xsl:attribute name="hyphenation-remain-character-count">
662 <xsl:call-template name="gentext">
663 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
667 <xsl:apply-templates select="." mode="running.head.mode">
668 <xsl:with-param name="master-reference" select="$master-reference"/>
669 </xsl:apply-templates>
671 <xsl:apply-templates select="." mode="running.foot.mode">
672 <xsl:with-param name="master-reference" select="$master-reference"/>
673 </xsl:apply-templates>
675 <fo:flow flow-name="xsl-region-body">
676 <xsl:call-template name="set.flow.properties">
677 <xsl:with-param name="element" select="local-name(.)"/>
678 <xsl:with-param name="master-reference" select="$master-reference"/>
682 xsl:use-attribute-sets="component.titlepage.properties">
683 <xsl:call-template name="article.titlepage"/>
686 <xsl:call-template name="make.component.tocs"/>
688 <xsl:apply-templates/>
693 <xsl:template match="article/artheader"></xsl:template>
694 <xsl:template match="article/articleinfo"></xsl:template>
695 <xsl:template match="article/info"></xsl:template>
696 <xsl:template match="article/title"></xsl:template>
697 <xsl:template match="article/subtitle"></xsl:template>
698 <xsl:template match="article/titleabbrev"></xsl:template>
700 <xsl:template match="article/appendix">
701 <xsl:variable name="id">
702 <xsl:call-template name="object.id"/>
705 <xsl:variable name="title">
706 <xsl:apply-templates select="." mode="object.title.markup"/>
709 <xsl:variable name="titleabbrev">
710 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
713 <fo:block id='{$id}'>
714 <xsl:if test="$axf.extensions != 0">
715 <xsl:attribute name="axf:outline-level">
716 <xsl:value-of select="count(ancestor::*)+2"/>
718 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
719 <xsl:attribute name="axf:outline-title">
720 <xsl:value-of select="normalize-space($titleabbrev)"/>
724 <xsl:if test="$passivetex.extensions != 0">
725 <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
726 fotex-bookmark-level="{count(ancestor::*)+2}"
727 fotex-bookmark-label="{$id}">
728 <xsl:value-of select="$titleabbrev"/>
732 <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
733 <fo:marker marker-class-name="section.head.marker">
735 <xsl:when test="$titleabbrev = ''">
736 <xsl:value-of select="$title"/>
739 <xsl:value-of select="$titleabbrev"/>
743 <xsl:copy-of select="$title"/>
746 <xsl:call-template name="make.component.tocs"/>
748 <xsl:apply-templates/>
752 <!-- ==================================================================== -->
754 <!-- Utility template to create a page sequence for an element -->
755 <xsl:template match="*" mode="page.sequence" name="page.sequence">
756 <xsl:param name="content">
757 <xsl:apply-templates/>
759 <xsl:param name="master-reference">
760 <xsl:call-template name="select.pagemaster"/>
762 <xsl:param name="element" select="local-name(.)"/>
763 <xsl:param name="gentext-key" select="local-name(.)"/>
764 <xsl:param name="language">
765 <xsl:call-template name="l10n.language"/>
768 <xsl:param name="format">
769 <xsl:call-template name="page.number.format">
770 <xsl:with-param name="master-reference" select="$master-reference"/>
771 <xsl:with-param name="element" select="$element"/>
775 <xsl:param name="initial-page-number">
776 <xsl:call-template name="initial.page.number">
777 <xsl:with-param name="master-reference" select="$master-reference"/>
778 <xsl:with-param name="element" select="$element"/>
782 <xsl:param name="force-page-count">
783 <xsl:call-template name="force.page.count">
784 <xsl:with-param name="master-reference" select="$master-reference"/>
785 <xsl:with-param name="element" select="$element"/>
789 <fo:page-sequence hyphenate="{$hyphenate}"
790 master-reference="{$master-reference}">
791 <xsl:attribute name="language">
792 <xsl:value-of select="$language"/>
794 <xsl:attribute name="format">
795 <xsl:value-of select="$format"/>
798 <xsl:attribute name="initial-page-number">
799 <xsl:value-of select="$initial-page-number"/>
802 <xsl:attribute name="force-page-count">
803 <xsl:value-of select="$force-page-count"/>
806 <xsl:attribute name="hyphenation-character">
807 <xsl:call-template name="gentext">
808 <xsl:with-param name="key" select="'hyphenation-character'"/>
811 <xsl:attribute name="hyphenation-push-character-count">
812 <xsl:call-template name="gentext">
813 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
816 <xsl:attribute name="hyphenation-remain-character-count">
817 <xsl:call-template name="gentext">
818 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
822 <xsl:apply-templates select="." mode="running.head.mode">
823 <xsl:with-param name="master-reference" select="$master-reference"/>
824 <xsl:with-param name="gentext-key" select="$gentext-key"/>
825 </xsl:apply-templates>
827 <xsl:apply-templates select="." mode="running.foot.mode">
828 <xsl:with-param name="master-reference" select="$master-reference"/>
829 <xsl:with-param name="gentext-key" select="$gentext-key"/>
830 </xsl:apply-templates>
832 <fo:flow flow-name="xsl-region-body">
833 <xsl:call-template name="set.flow.properties">
834 <xsl:with-param name="element" select="local-name(.)"/>
835 <xsl:with-param name="master-reference" select="$master-reference"/>
838 <xsl:copy-of select="$content"/>
844 <xsl:template name="make.component.tocs">
846 <xsl:variable name="toc.params">
847 <xsl:call-template name="find.path.params">
848 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
852 <xsl:if test="contains($toc.params, 'toc')">
853 <xsl:call-template name="component.toc">
854 <xsl:with-param name="toc.title.p"
855 select="contains($toc.params, 'title')"/>
859 <xsl:if test="contains($toc.params,'figure') and .//figure">
860 <xsl:call-template name="component.list.of.titles">
861 <xsl:with-param name="titles" select="'figure'"/>
862 <xsl:with-param name="nodes" select=".//figure"/>
866 <xsl:if test="contains($toc.params,'table') and .//table">
867 <xsl:call-template name="component.list.of.titles">
868 <xsl:with-param name="titles" select="'table'"/>
869 <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
873 <xsl:if test="contains($toc.params,'example') and .//example">
874 <xsl:call-template name="component.list.of.titles">
875 <xsl:with-param name="titles" select="'example'"/>
876 <xsl:with-param name="nodes" select=".//example"/>
880 <xsl:if test="contains($toc.params,'equation') and
881 .//equation[title or info/title]">
882 <xsl:call-template name="component.list.of.titles">
883 <xsl:with-param name="titles" select="'equation'"/>
884 <xsl:with-param name="nodes"
885 select=".//equation[title or info/title]"/>
889 <xsl:if test="contains($toc.params,'procedure') and
890 .//procedure[title or info/title]">
891 <xsl:call-template name="component.list.of.titles">
892 <xsl:with-param name="titles" select="'procedure'"/>
893 <xsl:with-param name="nodes"
894 select=".//procedure[title or info/title]"/>
899 <xsl:when test="$toc.params = ''">
901 <xsl:when test="$toc.params = 'nop'">
904 <xsl:call-template name="component.toc.separator"/>
910 <xsl:template match="topic">
911 <xsl:variable name="id">
912 <xsl:call-template name="object.id"/>
915 <xsl:element name="fo:{$section.container.element}">
916 <xsl:attribute name="id"><xsl:value-of
917 select="$id"/></xsl:attribute>
918 <xsl:call-template name="topic.titlepage"/>
920 <xsl:apply-templates/>
925 <xsl:template match="/topic | book/topic" name="topic.page.sequence">
926 <xsl:variable name="master-reference">
927 <xsl:call-template name="select.pagemaster"/>
929 <xsl:variable name="id">
930 <xsl:call-template name="object.id"/>
933 <xsl:apply-templates select="." mode="page.sequence">
934 <xsl:with-param name="master-reference" select="$master-reference"/>
935 <xsl:with-param name="content">
936 <xsl:element name="fo:{$section.container.element}">
937 <xsl:attribute name="id"><xsl:value-of
938 select="$id"/></xsl:attribute>
939 <xsl:call-template name="topic.titlepage"/>
941 <xsl:apply-templates/>
945 </xsl:apply-templates>
948 <xsl:template match="topic/info"></xsl:template>
949 <xsl:template match="topic/title"></xsl:template>
950 <xsl:template match="topic/subtitle"></xsl:template>
951 <xsl:template match="topic/titleabbrev"></xsl:template>