2 <xsl:stylesheet exclude-result-prefixes="d"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:d="http://docbook.org/ns/docbook"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
9 <!-- ********************************************************************
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://cdn.docbook.org/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::d:section">
43 <xsl:value-of select="count(ancestor::d:section)+1"/>
45 <xsl:when test="ancestor::d:sect5">6</xsl:when>
46 <xsl:when test="ancestor::d:sect4">5</xsl:when>
47 <xsl:when test="ancestor::d:sect3">4</xsl:when>
48 <xsl:when test="ancestor::d:sect2">3</xsl:when>
49 <xsl:when test="ancestor::d:sect1">2</xsl:when>
50 <xsl:otherwise>1</xsl:otherwise>
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>
59 <xsl:attribute name="hyphenation-character">
60 <xsl:call-template name="gentext">
61 <xsl:with-param name="key" select="'hyphenation-character'"/>
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'"/>
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'"/>
74 <xsl:if test="$axf.extensions != 0 and
75 $xsl1.1.bookmarks = 0 and
76 $show.bookmarks != 0">
77 <xsl:attribute name="axf:outline-level">
78 <xsl:value-of select="count($node/ancestor::*)"/>
80 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
81 <xsl:attribute name="axf:outline-title">
82 <xsl:value-of select="normalize-space($title)"/>
86 <!-- Let's handle the case where a component (bibliography, for example)
87 occurs inside a section; will we need parameters for this?
88 Danger Will Robinson: using section.title.level*.properties here
89 runs the risk that someone will set something other than
90 font-size there... -->
92 <xsl:when test="$level=2">
93 <fo:block xsl:use-attribute-sets="section.title.level2.properties">
94 <xsl:copy-of select="$title"/>
97 <xsl:when test="$level=3">
98 <fo:block xsl:use-attribute-sets="section.title.level3.properties">
99 <xsl:copy-of select="$title"/>
102 <xsl:when test="$level=4">
103 <fo:block xsl:use-attribute-sets="section.title.level4.properties">
104 <xsl:copy-of select="$title"/>
107 <xsl:when test="$level=5">
108 <fo:block xsl:use-attribute-sets="section.title.level5.properties">
109 <xsl:copy-of select="$title"/>
112 <xsl:when test="$level=6">
113 <fo:block xsl:use-attribute-sets="section.title.level6.properties">
114 <xsl:copy-of select="$title"/>
118 <!-- not in a section: do nothing special -->
119 <xsl:copy-of select="$title"/>
125 <!-- ==================================================================== -->
127 <xsl:template match="d:dedication" mode="dedication">
128 <xsl:variable name="id">
129 <xsl:call-template name="object.id"/>
132 <xsl:variable name="master-reference">
133 <xsl:call-template name="select.pagemaster"/>
136 <fo:page-sequence hyphenate="{$hyphenate}"
137 master-reference="{$master-reference}">
138 <xsl:attribute name="language">
139 <xsl:call-template name="l10n.language"/>
141 <xsl:attribute name="format">
142 <xsl:call-template name="page.number.format">
143 <xsl:with-param name="master-reference" select="$master-reference"/>
147 <xsl:attribute name="initial-page-number">
148 <xsl:call-template name="initial.page.number">
149 <xsl:with-param name="master-reference" select="$master-reference"/>
153 <xsl:attribute name="force-page-count">
154 <xsl:call-template name="force.page.count">
155 <xsl:with-param name="master-reference" select="$master-reference"/>
159 <xsl:attribute name="hyphenation-character">
160 <xsl:call-template name="gentext">
161 <xsl:with-param name="key" select="'hyphenation-character'"/>
164 <xsl:attribute name="hyphenation-push-character-count">
165 <xsl:call-template name="gentext">
166 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
169 <xsl:attribute name="hyphenation-remain-character-count">
170 <xsl:call-template name="gentext">
171 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
175 <xsl:apply-templates select="." mode="running.head.mode">
176 <xsl:with-param name="master-reference" select="$master-reference"/>
177 </xsl:apply-templates>
179 <xsl:apply-templates select="." mode="running.foot.mode">
180 <xsl:with-param name="master-reference" select="$master-reference"/>
181 </xsl:apply-templates>
183 <fo:flow flow-name="xsl-region-body">
184 <xsl:call-template name="set.flow.properties">
185 <xsl:with-param name="element" select="local-name(.)"/>
186 <xsl:with-param name="master-reference" select="$master-reference"/>
190 xsl:use-attribute-sets="component.titlepage.properties">
191 <xsl:call-template name="dedication.titlepage"/>
193 <xsl:apply-templates/>
198 <xsl:template match="d:dedication"></xsl:template> <!-- see mode="dedication" -->
199 <xsl:template match="d:dedication/d:docinfo"></xsl:template>
200 <xsl:template match="d:dedication/d:title"></xsl:template>
201 <xsl:template match="d:dedication/d:subtitle"></xsl:template>
202 <xsl:template match="d:dedication/d:titleabbrev"></xsl:template>
204 <!-- ==================================================================== -->
206 <xsl:template match="d:acknowledgements" mode="acknowledgements">
207 <xsl:variable name="id">
208 <xsl:call-template name="object.id"/>
211 <xsl:variable name="master-reference">
212 <xsl:call-template name="select.pagemaster"/>
215 <fo:page-sequence hyphenate="{$hyphenate}"
216 master-reference="{$master-reference}">
217 <xsl:attribute name="language">
218 <xsl:call-template name="l10n.language"/>
220 <xsl:attribute name="format">
221 <xsl:call-template name="page.number.format">
222 <xsl:with-param name="master-reference" select="$master-reference"/>
225 <xsl:attribute name="initial-page-number">
226 <xsl:call-template name="initial.page.number">
227 <xsl:with-param name="master-reference" select="$master-reference"/>
230 <xsl:attribute name="force-page-count">
231 <xsl:call-template name="force.page.count">
232 <xsl:with-param name="master-reference" select="$master-reference"/>
235 <xsl:attribute name="hyphenation-character">
236 <xsl:call-template name="gentext">
237 <xsl:with-param name="key" select="'hyphenation-character'"/>
240 <xsl:attribute name="hyphenation-push-character-count">
241 <xsl:call-template name="gentext">
242 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
245 <xsl:attribute name="hyphenation-remain-character-count">
246 <xsl:call-template name="gentext">
247 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
251 <xsl:apply-templates select="." mode="running.head.mode">
252 <xsl:with-param name="master-reference" select="$master-reference"/>
253 </xsl:apply-templates>
255 <xsl:apply-templates select="." mode="running.foot.mode">
256 <xsl:with-param name="master-reference" select="$master-reference"/>
257 </xsl:apply-templates>
259 <fo:flow flow-name="xsl-region-body">
260 <xsl:call-template name="set.flow.properties">
261 <xsl:with-param name="element" select="local-name(.)"/>
262 <xsl:with-param name="master-reference" select="$master-reference"/>
266 xsl:use-attribute-sets="component.titlepage.properties">
267 <xsl:call-template name="acknowledgements.titlepage"/>
269 <xsl:apply-templates/>
274 <xsl:template match="d:acknowledgements"></xsl:template>
275 <xsl:template match="d:acknowledgements/d:info"></xsl:template>
276 <xsl:template match="d:acknowledgements/d:title"></xsl:template>
277 <xsl:template match="d:acknowledgements/d:titleabbrev"></xsl:template>
278 <xsl:template match="d:acknowledgements/d:subtitle"></xsl:template>
280 <!-- ==================================================================== -->
282 <xsl:template match="d:colophon">
283 <xsl:variable name="id">
284 <xsl:call-template name="object.id"/>
287 <xsl:variable name="master-reference">
288 <xsl:call-template name="select.pagemaster"/>
291 <fo:page-sequence hyphenate="{$hyphenate}"
292 master-reference="{$master-reference}">
293 <xsl:attribute name="language">
294 <xsl:call-template name="l10n.language"/>
296 <xsl:attribute name="format">
297 <xsl:call-template name="page.number.format">
298 <xsl:with-param name="master-reference" select="$master-reference"/>
301 <xsl:attribute name="initial-page-number">
302 <xsl:call-template name="initial.page.number">
303 <xsl:with-param name="master-reference" select="$master-reference"/>
306 <xsl:attribute name="force-page-count">
307 <xsl:call-template name="force.page.count">
308 <xsl:with-param name="master-reference" select="$master-reference"/>
311 <xsl:attribute name="hyphenation-character">
312 <xsl:call-template name="gentext">
313 <xsl:with-param name="key" select="'hyphenation-character'"/>
316 <xsl:attribute name="hyphenation-push-character-count">
317 <xsl:call-template name="gentext">
318 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
321 <xsl:attribute name="hyphenation-remain-character-count">
322 <xsl:call-template name="gentext">
323 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
327 <xsl:apply-templates select="." mode="running.head.mode">
328 <xsl:with-param name="master-reference" select="$master-reference"/>
329 </xsl:apply-templates>
331 <xsl:apply-templates select="." mode="running.foot.mode">
332 <xsl:with-param name="master-reference" select="$master-reference"/>
333 </xsl:apply-templates>
335 <fo:flow flow-name="xsl-region-body">
336 <xsl:call-template name="set.flow.properties">
337 <xsl:with-param name="element" select="local-name(.)"/>
338 <xsl:with-param name="master-reference" select="$master-reference"/>
342 xsl:use-attribute-sets="component.titlepage.properties">
343 <xsl:call-template name="colophon.titlepage"/>
345 <xsl:apply-templates/>
350 <xsl:template match="d:colophon/d:title"></xsl:template>
351 <xsl:template match="d:colophon/d:subtitle"></xsl:template>
352 <xsl:template match="d:colophon/d:titleabbrev"></xsl:template>
354 <!-- article/colophon has no page sequence -->
355 <xsl:template match="d:article/d:colophon">
356 <xsl:variable name="id">
357 <xsl:call-template name="object.id"/>
360 <fo:block id="{$id}">
361 <fo:block xsl:use-attribute-sets="component.titlepage.properties">
362 <xsl:call-template name="colophon.titlepage"/>
364 <xsl:apply-templates/>
368 <!-- ==================================================================== -->
370 <xsl:template match="d:preface">
371 <xsl:variable name="id">
372 <xsl:call-template name="object.id"/>
375 <xsl:variable name="master-reference">
376 <xsl:call-template name="select.pagemaster"/>
379 <fo:page-sequence hyphenate="{$hyphenate}"
380 master-reference="{$master-reference}">
381 <xsl:attribute name="language">
382 <xsl:call-template name="l10n.language"/>
384 <xsl:attribute name="format">
385 <xsl:call-template name="page.number.format">
386 <xsl:with-param name="master-reference" select="$master-reference"/>
390 <xsl:attribute name="initial-page-number">
391 <xsl:call-template name="initial.page.number">
392 <xsl:with-param name="master-reference" select="$master-reference"/>
396 <xsl:attribute name="force-page-count">
397 <xsl:call-template name="force.page.count">
398 <xsl:with-param name="master-reference" select="$master-reference"/>
402 <xsl:attribute name="hyphenation-character">
403 <xsl:call-template name="gentext">
404 <xsl:with-param name="key" select="'hyphenation-character'"/>
407 <xsl:attribute name="hyphenation-push-character-count">
408 <xsl:call-template name="gentext">
409 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
412 <xsl:attribute name="hyphenation-remain-character-count">
413 <xsl:call-template name="gentext">
414 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
418 <xsl:apply-templates select="." mode="running.head.mode">
419 <xsl:with-param name="master-reference" select="$master-reference"/>
420 </xsl:apply-templates>
422 <xsl:apply-templates select="." mode="running.foot.mode">
423 <xsl:with-param name="master-reference" select="$master-reference"/>
424 </xsl:apply-templates>
426 <fo:flow flow-name="xsl-region-body">
427 <xsl:call-template name="set.flow.properties">
428 <xsl:with-param name="element" select="local-name(.)"/>
429 <xsl:with-param name="master-reference" select="$master-reference"/>
433 xsl:use-attribute-sets="component.titlepage.properties">
434 <xsl:call-template name="preface.titlepage"/>
437 <xsl:call-template name="make.component.tocs"/>
439 <xsl:apply-templates/>
444 <xsl:template match="d:preface/d:docinfo|d:prefaceinfo"></xsl:template>
445 <xsl:template match="d:preface/d:info"></xsl:template>
446 <xsl:template match="d:preface/d:title"></xsl:template>
447 <xsl:template match="d:preface/d:titleabbrev"></xsl:template>
448 <xsl:template match="d:preface/d:subtitle"></xsl:template>
450 <!-- ==================================================================== -->
452 <xsl:template match="d:chapter">
453 <xsl:variable name="id">
454 <xsl:call-template name="object.id"/>
457 <xsl:variable name="master-reference">
458 <xsl:call-template name="select.pagemaster"/>
461 <fo:page-sequence hyphenate="{$hyphenate}"
462 master-reference="{$master-reference}">
463 <xsl:attribute name="language">
464 <xsl:call-template name="l10n.language"/>
466 <xsl:attribute name="format">
467 <xsl:call-template name="page.number.format">
468 <xsl:with-param name="master-reference" select="$master-reference"/>
471 <xsl:attribute name="initial-page-number">
472 <xsl:call-template name="initial.page.number">
473 <xsl:with-param name="master-reference" select="$master-reference"/>
477 <xsl:attribute name="force-page-count">
478 <xsl:call-template name="force.page.count">
479 <xsl:with-param name="master-reference" select="$master-reference"/>
483 <xsl:attribute name="hyphenation-character">
484 <xsl:call-template name="gentext">
485 <xsl:with-param name="key" select="'hyphenation-character'"/>
488 <xsl:attribute name="hyphenation-push-character-count">
489 <xsl:call-template name="gentext">
490 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
493 <xsl:attribute name="hyphenation-remain-character-count">
494 <xsl:call-template name="gentext">
495 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
499 <xsl:apply-templates select="." mode="running.head.mode">
500 <xsl:with-param name="master-reference" select="$master-reference"/>
501 </xsl:apply-templates>
503 <xsl:apply-templates select="." mode="running.foot.mode">
504 <xsl:with-param name="master-reference" select="$master-reference"/>
505 </xsl:apply-templates>
507 <fo:flow flow-name="xsl-region-body">
508 <xsl:call-template name="set.flow.properties">
509 <xsl:with-param name="element" select="local-name(.)"/>
510 <xsl:with-param name="master-reference" select="$master-reference"/>
514 xsl:use-attribute-sets="component.titlepage.properties">
515 <xsl:call-template name="chapter.titlepage"/>
518 <xsl:call-template name="make.component.tocs"/>
520 <xsl:apply-templates/>
525 <xsl:template match="d:chapter/d:docinfo|d:chapterinfo"></xsl:template>
526 <xsl:template match="d:chapter/d:info"></xsl:template>
527 <xsl:template match="d:chapter/d:title"></xsl:template>
528 <xsl:template match="d:chapter/d:titleabbrev"></xsl:template>
529 <xsl:template match="d:chapter/d:subtitle"></xsl:template>
531 <!-- ==================================================================== -->
533 <xsl:template match="d:appendix">
534 <xsl:variable name="id">
535 <xsl:call-template name="object.id"/>
538 <xsl:variable name="master-reference">
539 <xsl:call-template name="select.pagemaster"/>
542 <fo:page-sequence hyphenate="{$hyphenate}"
543 master-reference="{$master-reference}">
544 <xsl:attribute name="language">
545 <xsl:call-template name="l10n.language"/>
547 <xsl:attribute name="format">
548 <xsl:call-template name="page.number.format">
549 <xsl:with-param name="master-reference" select="$master-reference"/>
552 <xsl:attribute name="initial-page-number">
553 <xsl:call-template name="initial.page.number">
554 <xsl:with-param name="master-reference" select="$master-reference"/>
558 <xsl:attribute name="force-page-count">
559 <xsl:call-template name="force.page.count">
560 <xsl:with-param name="master-reference" select="$master-reference"/>
564 <xsl:attribute name="hyphenation-character">
565 <xsl:call-template name="gentext">
566 <xsl:with-param name="key" select="'hyphenation-character'"/>
569 <xsl:attribute name="hyphenation-push-character-count">
570 <xsl:call-template name="gentext">
571 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
574 <xsl:attribute name="hyphenation-remain-character-count">
575 <xsl:call-template name="gentext">
576 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
580 <xsl:apply-templates select="." mode="running.head.mode">
581 <xsl:with-param name="master-reference" select="$master-reference"/>
582 </xsl:apply-templates>
584 <xsl:apply-templates select="." mode="running.foot.mode">
585 <xsl:with-param name="master-reference" select="$master-reference"/>
586 </xsl:apply-templates>
588 <fo:flow flow-name="xsl-region-body">
589 <xsl:call-template name="set.flow.properties">
590 <xsl:with-param name="element" select="local-name(.)"/>
591 <xsl:with-param name="master-reference" select="$master-reference"/>
595 xsl:use-attribute-sets="component.titlepage.properties">
596 <xsl:call-template name="appendix.titlepage"/>
599 <xsl:call-template name="make.component.tocs"/>
601 <xsl:apply-templates/>
606 <xsl:template match="d:appendix/d:docinfo|d:appendixinfo"></xsl:template>
607 <xsl:template match="d:appendix/d:info"></xsl:template>
608 <xsl:template match="d:appendix/d:title"></xsl:template>
609 <xsl:template match="d:appendix/d:titleabbrev"></xsl:template>
610 <xsl:template match="d:appendix/d:subtitle"></xsl:template>
612 <!-- ==================================================================== -->
614 <xsl:template match="d:article">
615 <xsl:variable name="id">
616 <xsl:call-template name="object.id"/>
619 <xsl:variable name="master-reference">
620 <xsl:call-template name="select.pagemaster"/>
623 <fo:page-sequence hyphenate="{$hyphenate}"
624 master-reference="{$master-reference}">
625 <xsl:attribute name="language">
626 <xsl:call-template name="l10n.language"/>
628 <xsl:attribute name="format">
629 <xsl:call-template name="page.number.format">
630 <xsl:with-param name="master-reference" select="$master-reference"/>
633 <xsl:attribute name="initial-page-number">
634 <xsl:call-template name="initial.page.number">
635 <xsl:with-param name="master-reference" select="$master-reference"/>
639 <xsl:attribute name="force-page-count">
640 <xsl:call-template name="force.page.count">
641 <xsl:with-param name="master-reference" select="$master-reference"/>
645 <xsl:attribute name="hyphenation-character">
646 <xsl:call-template name="gentext">
647 <xsl:with-param name="key" select="'hyphenation-character'"/>
650 <xsl:attribute name="hyphenation-push-character-count">
651 <xsl:call-template name="gentext">
652 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
655 <xsl:attribute name="hyphenation-remain-character-count">
656 <xsl:call-template name="gentext">
657 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
661 <xsl:apply-templates select="." mode="running.head.mode">
662 <xsl:with-param name="master-reference" select="$master-reference"/>
663 </xsl:apply-templates>
665 <xsl:apply-templates select="." mode="running.foot.mode">
666 <xsl:with-param name="master-reference" select="$master-reference"/>
667 </xsl:apply-templates>
669 <fo:flow flow-name="xsl-region-body">
670 <xsl:call-template name="set.flow.properties">
671 <xsl:with-param name="element" select="local-name(.)"/>
672 <xsl:with-param name="master-reference" select="$master-reference"/>
676 xsl:use-attribute-sets="component.titlepage.properties">
677 <xsl:call-template name="article.titlepage"/>
680 <xsl:call-template name="make.component.tocs"/>
682 <xsl:apply-templates/>
687 <xsl:template match="d:article/d:artheader"></xsl:template>
688 <xsl:template match="d:article/d:articleinfo"></xsl:template>
689 <xsl:template match="d:article/d:info"></xsl:template>
690 <xsl:template match="d:article/d:title"></xsl:template>
691 <xsl:template match="d:article/d:subtitle"></xsl:template>
692 <xsl:template match="d:article/d:titleabbrev"></xsl:template>
694 <xsl:template match="d:article/d:appendix">
695 <xsl:variable name="id">
696 <xsl:call-template name="object.id"/>
699 <xsl:variable name="title">
700 <xsl:apply-templates select="." mode="object.title.markup"/>
703 <xsl:variable name="titleabbrev">
704 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
707 <fo:block id='{$id}'>
708 <xsl:if test="$axf.extensions != 0 and
709 $xsl1.1.bookmarks = 0 and
710 $show.bookmarks != 0">
711 <xsl:attribute name="axf:outline-level">
712 <xsl:value-of select="count(ancestor::*)+2"/>
714 <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
715 <xsl:attribute name="axf:outline-title">
716 <xsl:value-of select="normalize-space($titleabbrev)"/>
720 <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
721 <fo:marker marker-class-name="section.head.marker">
723 <xsl:when test="$titleabbrev = ''">
724 <xsl:value-of select="$title"/>
727 <xsl:value-of select="$titleabbrev"/>
731 <xsl:copy-of select="$title"/>
734 <xsl:call-template name="make.component.tocs"/>
736 <xsl:apply-templates/>
740 <!-- ==================================================================== -->
742 <!-- Utility template to create a page sequence for an element -->
743 <xsl:template match="*" mode="page.sequence" name="page.sequence">
744 <xsl:param name="content">
745 <xsl:apply-templates/>
747 <xsl:param name="master-reference">
748 <xsl:call-template name="select.pagemaster"/>
750 <xsl:param name="element" select="local-name(.)"/>
751 <xsl:param name="gentext-key" select="local-name(.)"/>
752 <xsl:param name="language">
753 <xsl:call-template name="l10n.language"/>
756 <xsl:param name="format">
757 <xsl:call-template name="page.number.format">
758 <xsl:with-param name="master-reference" select="$master-reference"/>
759 <xsl:with-param name="element" select="$element"/>
763 <xsl:param name="initial-page-number">
764 <xsl:call-template name="initial.page.number">
765 <xsl:with-param name="master-reference" select="$master-reference"/>
766 <xsl:with-param name="element" select="$element"/>
770 <xsl:param name="force-page-count">
771 <xsl:call-template name="force.page.count">
772 <xsl:with-param name="master-reference" select="$master-reference"/>
773 <xsl:with-param name="element" select="$element"/>
778 <xsl:when test="string-length($content) != 0">
779 <fo:page-sequence hyphenate="{$hyphenate}"
780 master-reference="{$master-reference}">
781 <xsl:attribute name="language">
782 <xsl:value-of select="$language"/>
784 <xsl:attribute name="format">
785 <xsl:value-of select="$format"/>
788 <xsl:attribute name="initial-page-number">
789 <xsl:value-of select="$initial-page-number"/>
792 <xsl:attribute name="force-page-count">
793 <xsl:value-of select="$force-page-count"/>
796 <xsl:attribute name="hyphenation-character">
797 <xsl:call-template name="gentext">
798 <xsl:with-param name="key" select="'hyphenation-character'"/>
801 <xsl:attribute name="hyphenation-push-character-count">
802 <xsl:call-template name="gentext">
803 <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
806 <xsl:attribute name="hyphenation-remain-character-count">
807 <xsl:call-template name="gentext">
808 <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
812 <xsl:apply-templates select="." mode="running.head.mode">
813 <xsl:with-param name="master-reference" select="$master-reference"/>
814 <xsl:with-param name="gentext-key" select="$gentext-key"/>
815 </xsl:apply-templates>
817 <xsl:apply-templates select="." mode="running.foot.mode">
818 <xsl:with-param name="master-reference" select="$master-reference"/>
819 <xsl:with-param name="gentext-key" select="$gentext-key"/>
820 </xsl:apply-templates>
822 <fo:flow flow-name="xsl-region-body">
823 <xsl:call-template name="set.flow.properties">
824 <xsl:with-param name="element" select="local-name(.)"/>
825 <xsl:with-param name="master-reference" select="$master-reference"/>
828 <xsl:copy-of select="$content"/>
835 <xsl:text>WARNING: call to template 'page.sequence' </xsl:text>
836 <xsl:text>has zero length content; no page-sequence generated.</xsl:text>
842 <xsl:template name="make.component.tocs">
844 <xsl:variable name="toc.params">
845 <xsl:call-template name="find.path.params">
846 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
850 <xsl:if test="contains($toc.params, 'toc')">
851 <xsl:call-template name="component.toc">
852 <xsl:with-param name="toc.title.p"
853 select="contains($toc.params, 'title')"/>
857 <xsl:if test="contains($toc.params,'figure') and .//d:figure">
858 <xsl:call-template name="component.list.of.titles">
859 <xsl:with-param name="titles" select="'figure'"/>
860 <xsl:with-param name="nodes" select=".//d:figure"/>
864 <xsl:if test="contains($toc.params,'table') and .//d:table">
865 <xsl:call-template name="component.list.of.titles">
866 <xsl:with-param name="titles" select="'table'"/>
867 <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
871 <xsl:if test="contains($toc.params,'example') and .//d:example">
872 <xsl:call-template name="component.list.of.titles">
873 <xsl:with-param name="titles" select="'example'"/>
874 <xsl:with-param name="nodes" select=".//d:example"/>
878 <xsl:if test="contains($toc.params,'equation') and
879 .//d:equation[d:title or d:info/d:title]">
880 <xsl:call-template name="component.list.of.titles">
881 <xsl:with-param name="titles" select="'equation'"/>
882 <xsl:with-param name="nodes"
883 select=".//d:equation[d:title or d:info/d:title]"/>
887 <xsl:if test="contains($toc.params,'procedure') and
888 .//d:procedure[d:title or d:info/d:title]">
889 <xsl:call-template name="component.list.of.titles">
890 <xsl:with-param name="titles" select="'procedure'"/>
891 <xsl:with-param name="nodes"
892 select=".//d:procedure[d:title or d:info/d:title]"/>
897 <xsl:when test="$toc.params = ''">
899 <xsl:when test="$toc.params = 'nop'">
902 <xsl:call-template name="component.toc.separator"/>
908 <xsl:template match="d:topic">
909 <xsl:variable name="id">
910 <xsl:call-template name="object.id"/>
913 <xsl:element name="fo:{$section.container.element}">
914 <xsl:attribute name="id"><xsl:value-of
915 select="$id"/></xsl:attribute>
916 <xsl:call-template name="topic.titlepage"/>
918 <xsl:apply-templates/>
923 <xsl:template match="/d:topic | d:book/d:topic" name="topic.page.sequence">
924 <xsl:variable name="master-reference">
925 <xsl:call-template name="select.pagemaster"/>
927 <xsl:variable name="id">
928 <xsl:call-template name="object.id"/>
931 <xsl:apply-templates select="." mode="page.sequence">
932 <xsl:with-param name="master-reference" select="$master-reference"/>
933 <xsl:with-param name="content">
934 <xsl:element name="fo:{$section.container.element}">
935 <xsl:attribute name="id"><xsl:value-of
936 select="$id"/></xsl:attribute>
937 <xsl:call-template name="topic.titlepage"/>
939 <xsl:apply-templates/>
943 </xsl:apply-templates>
946 <xsl:template match="d:topic/d:info"></xsl:template>
947 <xsl:template match="d:topic/d:title"></xsl:template>
948 <xsl:template match="d:topic/d:subtitle"></xsl:template>
949 <xsl:template match="d:topic/d:titleabbrev"></xsl:template>