2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 <!-- ********************************************************************
7 $Id: pagesetup.xsl 8900 2010-08-29 20:04:32Z dleidert $
8 ********************************************************************
10 This file is part of the DocBook XSL Stylesheet distribution.
11 See ../README or http://docbook.sf.net/ for copyright
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:param name="body.fontset">
19 <xsl:value-of select="$body.font.family"/>
20 <xsl:if test="$body.font.family != ''
21 and $symbol.font.family != ''">,</xsl:if>
22 <xsl:value-of select="$symbol.font.family"/>
25 <xsl:param name="title.fontset">
26 <xsl:value-of select="$title.font.family"/>
27 <xsl:if test="$title.font.family != ''
28 and $symbol.font.family != ''">,</xsl:if>
29 <xsl:value-of select="$symbol.font.family"/>
32 <xsl:param name="margin.left.inner">
34 <xsl:when test="$passivetex.extensions != 0">
35 <xsl:value-of select="$page.margin.inner"/>
38 <xsl:value-of select="$page.margin.inner"/>
39 <xsl:text> - </xsl:text>
40 <xsl:value-of select="$title.margin.left"/>
45 <xsl:template name="setup.pagemasters">
46 <fo:layout-master-set>
48 <fo:simple-page-master master-name="blank"
49 page-width="{$page.width}"
50 page-height="{$page.height}"
51 margin-top="{$page.margin.top}"
52 margin-bottom="{$page.margin.bottom}">
53 <xsl:attribute name="margin-{$direction.align.start}">
54 <xsl:value-of select="$page.margin.outer"/>
55 <xsl:if test="$fop.extensions != 0">
56 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
59 <xsl:attribute name="margin-{$direction.align.end}">
60 <xsl:value-of select="$page.margin.inner"/>
62 <xsl:if test="$axf.extensions != 0">
63 <xsl:call-template name="axf-page-master-properties">
64 <xsl:with-param name="page.master">blank</xsl:with-param>
67 <fo:region-body display-align="center"
68 margin-bottom="{$body.margin.bottom}"
69 margin-top="{$body.margin.top}">
70 <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0">
71 <xsl:attribute name="region-name">blank-body</xsl:attribute>
74 <fo:region-before region-name="xsl-region-before-blank"
75 extent="{$region.before.extent}"
76 display-align="before"/>
77 <fo:region-after region-name="xsl-region-after-blank"
78 extent="{$region.after.extent}"
79 display-align="after"/>
80 </fo:simple-page-master>
83 <fo:simple-page-master master-name="titlepage-first"
84 page-width="{$page.width}"
85 page-height="{$page.height}"
86 margin-top="{$page.margin.top}"
87 margin-bottom="{$page.margin.bottom}">
88 <xsl:attribute name="margin-{$direction.align.start}">
89 <xsl:value-of select="$page.margin.inner"/>
90 <xsl:if test="$fop.extensions != 0">
91 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
94 <xsl:attribute name="margin-{$direction.align.end}">
95 <xsl:value-of select="$page.margin.outer"/>
97 <xsl:if test="$axf.extensions != 0">
98 <xsl:call-template name="axf-page-master-properties">
99 <xsl:with-param name="page.master">titlepage-first</xsl:with-param>
102 <fo:region-body margin-bottom="{$body.margin.bottom}"
103 margin-top="{$body.margin.top}"
104 column-gap="{$column.gap.titlepage}"
105 column-count="{$column.count.titlepage}">
107 <fo:region-before region-name="xsl-region-before-first"
108 extent="{$region.before.extent}"
109 display-align="before"/>
110 <fo:region-after region-name="xsl-region-after-first"
111 extent="{$region.after.extent}"
112 display-align="after"/>
113 </fo:simple-page-master>
115 <fo:simple-page-master master-name="titlepage-odd"
116 page-width="{$page.width}"
117 page-height="{$page.height}"
118 margin-top="{$page.margin.top}"
119 margin-bottom="{$page.margin.bottom}">
120 <xsl:attribute name="margin-{$direction.align.start}">
121 <xsl:value-of select="$page.margin.inner"/>
122 <xsl:if test="$fop.extensions != 0">
123 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
126 <xsl:attribute name="margin-{$direction.align.end}">
127 <xsl:value-of select="$page.margin.outer"/>
129 <xsl:if test="$axf.extensions != 0">
130 <xsl:call-template name="axf-page-master-properties">
131 <xsl:with-param name="page.master">titlepage-odd</xsl:with-param>
134 <fo:region-body margin-bottom="{$body.margin.bottom}"
135 margin-top="{$body.margin.top}"
136 column-gap="{$column.gap.titlepage}"
137 column-count="{$column.count.titlepage}">
139 <fo:region-before region-name="xsl-region-before-odd"
140 extent="{$region.before.extent}"
141 display-align="before"/>
142 <fo:region-after region-name="xsl-region-after-odd"
143 extent="{$region.after.extent}"
144 display-align="after"/>
145 </fo:simple-page-master>
147 <fo:simple-page-master master-name="titlepage-even"
148 page-width="{$page.width}"
149 page-height="{$page.height}"
150 margin-top="{$page.margin.top}"
151 margin-bottom="{$page.margin.bottom}">
152 <xsl:attribute name="margin-{$direction.align.start}">
153 <xsl:value-of select="$page.margin.outer"/>
154 <xsl:if test="$fop.extensions != 0">
155 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
158 <xsl:attribute name="margin-{$direction.align.end}">
159 <xsl:value-of select="$page.margin.inner"/>
161 <xsl:if test="$axf.extensions != 0">
162 <xsl:call-template name="axf-page-master-properties">
163 <xsl:with-param name="page.master">titlepage-even</xsl:with-param>
166 <fo:region-body margin-bottom="{$body.margin.bottom}"
167 margin-top="{$body.margin.top}"
168 column-gap="{$column.gap.titlepage}"
169 column-count="{$column.count.titlepage}">
171 <fo:region-before region-name="xsl-region-before-even"
172 extent="{$region.before.extent}"
173 display-align="before"/>
174 <fo:region-after region-name="xsl-region-after-even"
175 extent="{$region.after.extent}"
176 display-align="after"/>
177 </fo:simple-page-master>
179 <!-- list-of-title pages -->
180 <fo:simple-page-master master-name="lot-first"
181 page-width="{$page.width}"
182 page-height="{$page.height}"
183 margin-top="{$page.margin.top}"
184 margin-bottom="{$page.margin.bottom}">
185 <xsl:attribute name="margin-{$direction.align.start}">
186 <xsl:value-of select="$page.margin.inner"/>
187 <xsl:if test="$fop.extensions != 0">
188 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
191 <xsl:attribute name="margin-{$direction.align.end}">
192 <xsl:value-of select="$page.margin.outer"/>
194 <xsl:if test="$axf.extensions != 0">
195 <xsl:call-template name="axf-page-master-properties">
196 <xsl:with-param name="page.master">lot-first</xsl:with-param>
199 <fo:region-body margin-bottom="{$body.margin.bottom}"
200 margin-top="{$body.margin.top}"
201 column-gap="{$column.gap.lot}"
202 column-count="{$column.count.lot}">
204 <fo:region-before region-name="xsl-region-before-first"
205 extent="{$region.before.extent}"
206 display-align="before"/>
207 <fo:region-after region-name="xsl-region-after-first"
208 extent="{$region.after.extent}"
209 display-align="after"/>
210 </fo:simple-page-master>
212 <fo:simple-page-master master-name="lot-odd"
213 page-width="{$page.width}"
214 page-height="{$page.height}"
215 margin-top="{$page.margin.top}"
216 margin-bottom="{$page.margin.bottom}">
217 <xsl:attribute name="margin-{$direction.align.start}">
218 <xsl:value-of select="$page.margin.inner"/>
219 <xsl:if test="$fop.extensions != 0">
220 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
223 <xsl:attribute name="margin-{$direction.align.end}">
224 <xsl:value-of select="$page.margin.outer"/>
226 <xsl:if test="$axf.extensions != 0">
227 <xsl:call-template name="axf-page-master-properties">
228 <xsl:with-param name="page.master">lot-odd</xsl:with-param>
231 <fo:region-body margin-bottom="{$body.margin.bottom}"
232 margin-top="{$body.margin.top}"
233 column-gap="{$column.gap.lot}"
234 column-count="{$column.count.lot}">
236 <fo:region-before region-name="xsl-region-before-odd"
237 extent="{$region.before.extent}"
238 display-align="before"/>
239 <fo:region-after region-name="xsl-region-after-odd"
240 extent="{$region.after.extent}"
241 display-align="after"/>
242 </fo:simple-page-master>
244 <fo:simple-page-master master-name="lot-even"
245 page-width="{$page.width}"
246 page-height="{$page.height}"
247 margin-top="{$page.margin.top}"
248 margin-bottom="{$page.margin.bottom}">
249 <xsl:attribute name="margin-{$direction.align.start}">
250 <xsl:value-of select="$page.margin.outer"/>
251 <xsl:if test="$fop.extensions != 0">
252 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
255 <xsl:attribute name="margin-{$direction.align.end}">
256 <xsl:value-of select="$page.margin.inner"/>
258 <xsl:if test="$axf.extensions != 0">
259 <xsl:call-template name="axf-page-master-properties">
260 <xsl:with-param name="page.master">lot-even</xsl:with-param>
263 <fo:region-body margin-bottom="{$body.margin.bottom}"
264 margin-top="{$body.margin.top}"
265 column-gap="{$column.gap.lot}"
266 column-count="{$column.count.lot}">
268 <fo:region-before region-name="xsl-region-before-even"
269 extent="{$region.before.extent}"
270 display-align="before"/>
271 <fo:region-after region-name="xsl-region-after-even"
272 extent="{$region.after.extent}"
273 display-align="after"/>
274 </fo:simple-page-master>
276 <!-- frontmatter pages -->
277 <fo:simple-page-master master-name="front-first"
278 page-width="{$page.width}"
279 page-height="{$page.height}"
280 margin-top="{$page.margin.top}"
281 margin-bottom="{$page.margin.bottom}">
282 <xsl:attribute name="margin-{$direction.align.start}">
283 <xsl:value-of select="$page.margin.inner"/>
284 <xsl:if test="$fop.extensions != 0">
285 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
288 <xsl:attribute name="margin-{$direction.align.end}">
289 <xsl:value-of select="$page.margin.outer"/>
291 <xsl:if test="$axf.extensions != 0">
292 <xsl:call-template name="axf-page-master-properties">
293 <xsl:with-param name="page.master">front-first</xsl:with-param>
296 <fo:region-body margin-bottom="{$body.margin.bottom}"
297 margin-top="{$body.margin.top}"
298 column-gap="{$column.gap.front}"
299 column-count="{$column.count.front}">
301 <fo:region-before region-name="xsl-region-before-first"
302 extent="{$region.before.extent}"
303 display-align="before"/>
304 <fo:region-after region-name="xsl-region-after-first"
305 extent="{$region.after.extent}"
306 display-align="after"/>
307 </fo:simple-page-master>
309 <fo:simple-page-master master-name="front-odd"
310 page-width="{$page.width}"
311 page-height="{$page.height}"
312 margin-top="{$page.margin.top}"
313 margin-bottom="{$page.margin.bottom}">
314 <xsl:attribute name="margin-{$direction.align.start}">
315 <xsl:value-of select="$page.margin.inner"/>
316 <xsl:if test="$fop.extensions != 0">
317 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
320 <xsl:attribute name="margin-{$direction.align.end}">
321 <xsl:value-of select="$page.margin.outer"/>
323 <xsl:if test="$axf.extensions != 0">
324 <xsl:call-template name="axf-page-master-properties">
325 <xsl:with-param name="page.master">front-odd</xsl:with-param>
328 <fo:region-body margin-bottom="{$body.margin.bottom}"
329 margin-top="{$body.margin.top}"
330 column-gap="{$column.gap.front}"
331 column-count="{$column.count.front}">
333 <fo:region-before region-name="xsl-region-before-odd"
334 extent="{$region.before.extent}"
335 display-align="before"/>
336 <fo:region-after region-name="xsl-region-after-odd"
337 extent="{$region.after.extent}"
338 display-align="after"/>
339 </fo:simple-page-master>
341 <fo:simple-page-master master-name="front-even"
342 page-width="{$page.width}"
343 page-height="{$page.height}"
344 margin-top="{$page.margin.top}"
345 margin-bottom="{$page.margin.bottom}">
346 <xsl:attribute name="margin-{$direction.align.start}">
347 <xsl:value-of select="$page.margin.outer"/>
348 <xsl:if test="$fop.extensions != 0">
349 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
352 <xsl:attribute name="margin-{$direction.align.end}">
353 <xsl:value-of select="$page.margin.inner"/>
355 <xsl:if test="$axf.extensions != 0">
356 <xsl:call-template name="axf-page-master-properties">
357 <xsl:with-param name="page.master">front-even</xsl:with-param>
360 <fo:region-body margin-bottom="{$body.margin.bottom}"
361 margin-top="{$body.margin.top}"
362 column-gap="{$column.gap.front}"
363 column-count="{$column.count.front}">
365 <fo:region-before region-name="xsl-region-before-even"
366 extent="{$region.before.extent}"
367 display-align="before"/>
368 <fo:region-after region-name="xsl-region-after-even"
369 extent="{$region.after.extent}"
370 display-align="after"/>
371 </fo:simple-page-master>
374 <fo:simple-page-master master-name="body-first"
375 page-width="{$page.width}"
376 page-height="{$page.height}"
377 margin-top="{$page.margin.top}"
378 margin-bottom="{$page.margin.bottom}">
379 <xsl:attribute name="margin-{$direction.align.start}">
380 <xsl:value-of select="$page.margin.inner"/>
381 <xsl:if test="$fop.extensions != 0">
382 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
384 <xsl:if test="$fop.extensions != 0">
385 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
388 <xsl:attribute name="margin-{$direction.align.end}">
389 <xsl:value-of select="$page.margin.outer"/>
391 <xsl:if test="$axf.extensions != 0">
392 <xsl:call-template name="axf-page-master-properties">
393 <xsl:with-param name="page.master">body-first</xsl:with-param>
396 <fo:region-body margin-bottom="{$body.margin.bottom}"
397 margin-top="{$body.margin.top}"
398 column-gap="{$column.gap.body}"
399 column-count="{$column.count.body}">
401 <fo:region-before region-name="xsl-region-before-first"
402 extent="{$region.before.extent}"
403 display-align="before"/>
404 <fo:region-after region-name="xsl-region-after-first"
405 extent="{$region.after.extent}"
406 display-align="after"/>
407 </fo:simple-page-master>
409 <fo:simple-page-master master-name="body-odd"
410 page-width="{$page.width}"
411 page-height="{$page.height}"
412 margin-top="{$page.margin.top}"
413 margin-bottom="{$page.margin.bottom}">
414 <xsl:attribute name="margin-{$direction.align.start}">
415 <xsl:value-of select="$page.margin.inner"/>
416 <xsl:if test="$fop.extensions != 0">
417 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
420 <xsl:attribute name="margin-{$direction.align.end}">
421 <xsl:value-of select="$page.margin.outer"/>
423 <xsl:if test="$axf.extensions != 0">
424 <xsl:call-template name="axf-page-master-properties">
425 <xsl:with-param name="page.master">body-odd</xsl:with-param>
428 <fo:region-body margin-bottom="{$body.margin.bottom}"
429 margin-top="{$body.margin.top}"
430 column-gap="{$column.gap.body}"
431 column-count="{$column.count.body}">
433 <fo:region-before region-name="xsl-region-before-odd"
434 extent="{$region.before.extent}"
435 display-align="before"/>
436 <fo:region-after region-name="xsl-region-after-odd"
437 extent="{$region.after.extent}"
438 display-align="after"/>
439 </fo:simple-page-master>
441 <fo:simple-page-master master-name="body-even"
442 page-width="{$page.width}"
443 page-height="{$page.height}"
444 margin-top="{$page.margin.top}"
445 margin-bottom="{$page.margin.bottom}">
446 <xsl:attribute name="margin-{$direction.align.start}">
447 <xsl:value-of select="$page.margin.outer"/>
448 <xsl:if test="$fop.extensions != 0">
449 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
452 <xsl:attribute name="margin-{$direction.align.end}">
453 <xsl:value-of select="$page.margin.inner"/>
455 <xsl:if test="$axf.extensions != 0">
456 <xsl:call-template name="axf-page-master-properties">
457 <xsl:with-param name="page.master">body-even</xsl:with-param>
460 <fo:region-body margin-bottom="{$body.margin.bottom}"
461 margin-top="{$body.margin.top}"
462 column-gap="{$column.gap.body}"
463 column-count="{$column.count.body}">
465 <fo:region-before region-name="xsl-region-before-even"
466 extent="{$region.before.extent}"
467 display-align="before"/>
468 <fo:region-after region-name="xsl-region-after-even"
469 extent="{$region.after.extent}"
470 display-align="after"/>
471 </fo:simple-page-master>
473 <!-- backmatter pages -->
474 <fo:simple-page-master master-name="back-first"
475 page-width="{$page.width}"
476 page-height="{$page.height}"
477 margin-top="{$page.margin.top}"
478 margin-bottom="{$page.margin.bottom}">
479 <xsl:attribute name="margin-{$direction.align.start}">
480 <xsl:value-of select="$page.margin.inner"/>
481 <xsl:if test="$fop.extensions != 0">
482 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
485 <xsl:attribute name="margin-{$direction.align.end}">
486 <xsl:value-of select="$page.margin.outer"/>
488 <xsl:if test="$axf.extensions != 0">
489 <xsl:call-template name="axf-page-master-properties">
490 <xsl:with-param name="page.master">back-first</xsl:with-param>
493 <fo:region-body margin-bottom="{$body.margin.bottom}"
494 margin-top="{$body.margin.top}"
495 column-gap="{$column.gap.back}"
496 column-count="{$column.count.back}">
498 <fo:region-before region-name="xsl-region-before-first"
499 extent="{$region.before.extent}"
500 display-align="before"/>
501 <fo:region-after region-name="xsl-region-after-first"
502 extent="{$region.after.extent}"
503 display-align="after"/>
504 </fo:simple-page-master>
506 <fo:simple-page-master master-name="back-odd"
507 page-width="{$page.width}"
508 page-height="{$page.height}"
509 margin-top="{$page.margin.top}"
510 margin-bottom="{$page.margin.bottom}">
511 <xsl:attribute name="margin-{$direction.align.start}">
512 <xsl:value-of select="$page.margin.inner"/>
513 <xsl:if test="$fop.extensions != 0">
514 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
517 <xsl:attribute name="margin-{$direction.align.end}">
518 <xsl:value-of select="$page.margin.outer"/>
520 <xsl:if test="$axf.extensions != 0">
521 <xsl:call-template name="axf-page-master-properties">
522 <xsl:with-param name="page.master">back-odd</xsl:with-param>
525 <fo:region-body margin-bottom="{$body.margin.bottom}"
526 margin-top="{$body.margin.top}"
527 column-gap="{$column.gap.back}"
528 column-count="{$column.count.back}">
530 <fo:region-before region-name="xsl-region-before-odd"
531 extent="{$region.before.extent}"
532 display-align="before"/>
533 <fo:region-after region-name="xsl-region-after-odd"
534 extent="{$region.after.extent}"
535 display-align="after"/>
536 </fo:simple-page-master>
538 <fo:simple-page-master master-name="back-even"
539 page-width="{$page.width}"
540 page-height="{$page.height}"
541 margin-top="{$page.margin.top}"
542 margin-bottom="{$page.margin.bottom}">
543 <xsl:attribute name="margin-{$direction.align.start}">
544 <xsl:value-of select="$page.margin.outer"/>
545 <xsl:if test="$fop.extensions != 0">
546 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
549 <xsl:attribute name="margin-{$direction.align.end}">
550 <xsl:value-of select="$page.margin.inner"/>
552 <xsl:if test="$axf.extensions != 0">
553 <xsl:call-template name="axf-page-master-properties">
554 <xsl:with-param name="page.master">back-even</xsl:with-param>
557 <fo:region-body margin-bottom="{$body.margin.bottom}"
558 margin-top="{$body.margin.top}"
559 column-gap="{$column.gap.back}"
560 column-count="{$column.count.back}">
562 <fo:region-before region-name="xsl-region-before-even"
563 extent="{$region.before.extent}"
564 display-align="before"/>
565 <fo:region-after region-name="xsl-region-after-even"
566 extent="{$region.after.extent}"
567 display-align="after"/>
568 </fo:simple-page-master>
571 <fo:simple-page-master master-name="index-first"
572 page-width="{$page.width}"
573 page-height="{$page.height}"
574 margin-top="{$page.margin.top}"
575 margin-bottom="{$page.margin.bottom}">
576 <xsl:attribute name="margin-{$direction.align.start}">
577 <xsl:value-of select="$page.margin.inner"/>
578 <xsl:if test="$fop.extensions != 0">
579 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
582 <xsl:attribute name="margin-{$direction.align.end}">
583 <xsl:value-of select="$page.margin.outer"/>
585 <xsl:if test="$axf.extensions != 0">
586 <xsl:call-template name="axf-page-master-properties">
587 <xsl:with-param name="page.master">index-first</xsl:with-param>
590 <fo:region-body margin-bottom="{$body.margin.bottom}"
591 margin-top="{$body.margin.top}"
592 column-gap="{$column.gap.index}"
593 column-count="{$column.count.index}">
595 <fo:region-before region-name="xsl-region-before-first"
596 extent="{$region.before.extent}"
597 display-align="before"/>
598 <fo:region-after region-name="xsl-region-after-first"
599 extent="{$region.after.extent}"
600 display-align="after"/>
601 </fo:simple-page-master>
603 <fo:simple-page-master master-name="index-odd"
604 page-width="{$page.width}"
605 page-height="{$page.height}"
606 margin-top="{$page.margin.top}"
607 margin-bottom="{$page.margin.bottom}">
608 <xsl:attribute name="margin-{$direction.align.start}">
609 <xsl:value-of select="$page.margin.inner"/>
610 <xsl:if test="$fop.extensions != 0">
611 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
614 <xsl:attribute name="margin-{$direction.align.end}">
615 <xsl:value-of select="$page.margin.outer"/>
617 <xsl:if test="$axf.extensions != 0">
618 <xsl:call-template name="axf-page-master-properties">
619 <xsl:with-param name="page.master">index-odd</xsl:with-param>
622 <fo:region-body margin-bottom="{$body.margin.bottom}"
623 margin-top="{$body.margin.top}"
624 column-gap="{$column.gap.index}"
625 column-count="{$column.count.index}">
627 <fo:region-before region-name="xsl-region-before-odd"
628 extent="{$region.before.extent}"
629 display-align="before"/>
630 <fo:region-after region-name="xsl-region-after-odd"
631 extent="{$region.after.extent}"
632 display-align="after"/>
633 </fo:simple-page-master>
635 <fo:simple-page-master master-name="index-even"
636 page-width="{$page.width}"
637 page-height="{$page.height}"
638 margin-top="{$page.margin.top}"
639 margin-bottom="{$page.margin.bottom}">
640 <xsl:attribute name="margin-{$direction.align.start}">
641 <xsl:value-of select="$page.margin.outer"/>
642 <xsl:if test="$fop.extensions != 0">
643 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
646 <xsl:attribute name="margin-{$direction.align.end}">
647 <xsl:value-of select="$page.margin.inner"/>
649 <xsl:if test="$axf.extensions != 0">
650 <xsl:call-template name="axf-page-master-properties">
651 <xsl:with-param name="page.master">index-even</xsl:with-param>
654 <fo:region-body margin-bottom="{$body.margin.bottom}"
655 margin-top="{$body.margin.top}"
656 column-gap="{$column.gap.index}"
657 column-count="{$column.count.index}">
659 <fo:region-before region-name="xsl-region-before-even"
660 extent="{$region.before.extent}"
661 display-align="before"/>
662 <fo:region-after region-name="xsl-region-after-even"
663 extent="{$region.after.extent}"
664 display-align="after"/>
665 </fo:simple-page-master>
667 <xsl:if test="$draft.mode != 'no'">
668 <!-- draft blank pages -->
669 <fo:simple-page-master master-name="blank-draft"
670 page-width="{$page.width}"
671 page-height="{$page.height}"
672 margin-top="{$page.margin.top}"
673 margin-bottom="{$page.margin.bottom}">
674 <xsl:attribute name="margin-{$direction.align.start}">
675 <xsl:value-of select="$page.margin.outer"/>
676 <xsl:if test="$fop.extensions != 0">
677 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
680 <xsl:attribute name="margin-{$direction.align.end}">
681 <xsl:value-of select="$page.margin.inner"/>
683 <xsl:if test="$axf.extensions != 0">
684 <xsl:call-template name="axf-page-master-properties">
685 <xsl:with-param name="page.master">blank-draft</xsl:with-param>
688 <fo:region-body margin-bottom="{$body.margin.bottom}"
689 margin-top="{$body.margin.top}">
690 <xsl:if test="$draft.watermark.image != ''">
691 <xsl:attribute name="background-image">
692 <xsl:call-template name="fo-external-image">
693 <xsl:with-param name="filename" select="$draft.watermark.image"/>
696 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
697 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
698 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
699 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
702 <fo:region-before region-name="xsl-region-before-blank"
703 extent="{$region.before.extent}"
704 display-align="before"/>
705 <fo:region-after region-name="xsl-region-after-blank"
706 extent="{$region.after.extent}"
707 display-align="after"/>
708 </fo:simple-page-master>
710 <!-- draft title pages -->
711 <fo:simple-page-master master-name="titlepage-first-draft"
712 page-width="{$page.width}"
713 page-height="{$page.height}"
714 margin-top="{$page.margin.top}"
715 margin-bottom="{$page.margin.bottom}">
716 <xsl:attribute name="margin-{$direction.align.start}">
717 <xsl:value-of select="$page.margin.inner"/>
718 <xsl:if test="$fop.extensions != 0">
719 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
722 <xsl:attribute name="margin-{$direction.align.end}">
723 <xsl:value-of select="$page.margin.outer"/>
725 <xsl:if test="$axf.extensions != 0">
726 <xsl:call-template name="axf-page-master-properties">
727 <xsl:with-param name="page.master">titlepage-first-draft</xsl:with-param>
730 <fo:region-body margin-bottom="{$body.margin.bottom}"
731 margin-top="{$body.margin.top}"
732 column-gap="{$column.gap.titlepage}"
733 column-count="{$column.count.titlepage}">
734 <xsl:if test="$draft.watermark.image != ''">
735 <xsl:attribute name="background-image">
736 <xsl:call-template name="fo-external-image">
737 <xsl:with-param name="filename" select="$draft.watermark.image"/>
740 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
741 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
742 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
743 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
746 <fo:region-before region-name="xsl-region-before-first"
747 extent="{$region.before.extent}"
748 display-align="before"/>
749 <fo:region-after region-name="xsl-region-after-first"
750 extent="{$region.after.extent}"
751 display-align="after"/>
752 </fo:simple-page-master>
754 <fo:simple-page-master master-name="titlepage-odd-draft"
755 page-width="{$page.width}"
756 page-height="{$page.height}"
757 margin-top="{$page.margin.top}"
758 margin-bottom="{$page.margin.bottom}">
759 <xsl:attribute name="margin-{$direction.align.start}">
760 <xsl:value-of select="$page.margin.inner"/>
761 <xsl:if test="$fop.extensions != 0">
762 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
765 <xsl:attribute name="margin-{$direction.align.end}">
766 <xsl:value-of select="$page.margin.outer"/>
768 <xsl:if test="$axf.extensions != 0">
769 <xsl:call-template name="axf-page-master-properties">
770 <xsl:with-param name="page.master">titlepage-odd-draft</xsl:with-param>
773 <fo:region-body margin-bottom="{$body.margin.bottom}"
774 margin-top="{$body.margin.top}"
775 column-gap="{$column.gap.titlepage}"
776 column-count="{$column.count.titlepage}">
777 <xsl:if test="$draft.watermark.image != ''">
778 <xsl:attribute name="background-image">
779 <xsl:call-template name="fo-external-image">
780 <xsl:with-param name="filename" select="$draft.watermark.image"/>
783 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
784 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
785 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
786 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
789 <fo:region-before region-name="xsl-region-before-odd"
790 extent="{$region.before.extent}"
791 display-align="before"/>
792 <fo:region-after region-name="xsl-region-after-odd"
793 extent="{$region.after.extent}"
794 display-align="after"/>
795 </fo:simple-page-master>
797 <fo:simple-page-master master-name="titlepage-even-draft"
798 page-width="{$page.width}"
799 page-height="{$page.height}"
800 margin-top="{$page.margin.top}"
801 margin-bottom="{$page.margin.bottom}">
802 <xsl:attribute name="margin-{$direction.align.start}">
803 <xsl:value-of select="$page.margin.outer"/>
804 <xsl:if test="$fop.extensions != 0">
805 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
808 <xsl:attribute name="margin-{$direction.align.end}">
809 <xsl:value-of select="$page.margin.inner"/>
811 <xsl:if test="$axf.extensions != 0">
812 <xsl:call-template name="axf-page-master-properties">
813 <xsl:with-param name="page.master">titlepage-even-draft</xsl:with-param>
816 <fo:region-body margin-bottom="{$body.margin.bottom}"
817 margin-top="{$body.margin.top}"
818 column-gap="{$column.gap.titlepage}"
819 column-count="{$column.count.titlepage}">
820 <xsl:if test="$draft.watermark.image != ''">
821 <xsl:attribute name="background-image">
822 <xsl:call-template name="fo-external-image">
823 <xsl:with-param name="filename" select="$draft.watermark.image"/>
826 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
827 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
828 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
829 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
832 <fo:region-before region-name="xsl-region-before-even"
833 extent="{$region.before.extent}"
834 display-align="before"/>
835 <fo:region-after region-name="xsl-region-after-even"
836 extent="{$region.after.extent}"
837 display-align="after"/>
838 </fo:simple-page-master>
840 <!-- draft list-of-title pages -->
841 <fo:simple-page-master master-name="lot-first-draft"
842 page-width="{$page.width}"
843 page-height="{$page.height}"
844 margin-top="{$page.margin.top}"
845 margin-bottom="{$page.margin.bottom}">
846 <xsl:attribute name="margin-{$direction.align.start}">
847 <xsl:value-of select="$page.margin.inner"/>
848 <xsl:if test="$fop.extensions != 0">
849 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
852 <xsl:attribute name="margin-{$direction.align.end}">
853 <xsl:value-of select="$page.margin.outer"/>
855 <xsl:if test="$axf.extensions != 0">
856 <xsl:call-template name="axf-page-master-properties">
857 <xsl:with-param name="page.master">lot-first-draft</xsl:with-param>
860 <fo:region-body margin-bottom="{$body.margin.bottom}"
861 margin-top="{$body.margin.top}"
862 column-gap="{$column.gap.lot}"
863 column-count="{$column.count.lot}">
864 <xsl:if test="$draft.watermark.image != ''">
865 <xsl:attribute name="background-image">
866 <xsl:call-template name="fo-external-image">
867 <xsl:with-param name="filename" select="$draft.watermark.image"/>
870 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
871 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
872 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
873 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
876 <fo:region-before region-name="xsl-region-before-first"
877 extent="{$region.before.extent}"
878 display-align="before"/>
879 <fo:region-after region-name="xsl-region-after-first"
880 extent="{$region.after.extent}"
881 display-align="after"/>
882 </fo:simple-page-master>
884 <fo:simple-page-master master-name="lot-odd-draft"
885 page-width="{$page.width}"
886 page-height="{$page.height}"
887 margin-top="{$page.margin.top}"
888 margin-bottom="{$page.margin.bottom}">
889 <xsl:attribute name="margin-{$direction.align.start}">
890 <xsl:value-of select="$page.margin.inner"/>
891 <xsl:if test="$fop.extensions != 0">
892 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
895 <xsl:attribute name="margin-{$direction.align.end}">
896 <xsl:value-of select="$page.margin.outer"/>
898 <xsl:if test="$axf.extensions != 0">
899 <xsl:call-template name="axf-page-master-properties">
900 <xsl:with-param name="page.master">lot-odd-draft</xsl:with-param>
903 <fo:region-body margin-bottom="{$body.margin.bottom}"
904 margin-top="{$body.margin.top}"
905 column-gap="{$column.gap.lot}"
906 column-count="{$column.count.lot}">
907 <xsl:if test="$draft.watermark.image != ''">
908 <xsl:attribute name="background-image">
909 <xsl:call-template name="fo-external-image">
910 <xsl:with-param name="filename" select="$draft.watermark.image"/>
913 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
914 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
915 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
916 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
919 <fo:region-before region-name="xsl-region-before-odd"
920 extent="{$region.before.extent}"
921 display-align="before"/>
922 <fo:region-after region-name="xsl-region-after-odd"
923 extent="{$region.after.extent}"
924 display-align="after"/>
925 </fo:simple-page-master>
927 <fo:simple-page-master master-name="lot-even-draft"
928 page-width="{$page.width}"
929 page-height="{$page.height}"
930 margin-top="{$page.margin.top}"
931 margin-bottom="{$page.margin.bottom}">
932 <xsl:attribute name="margin-{$direction.align.start}">
933 <xsl:value-of select="$page.margin.outer"/>
934 <xsl:if test="$fop.extensions != 0">
935 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
938 <xsl:attribute name="margin-{$direction.align.end}">
939 <xsl:value-of select="$page.margin.inner"/>
941 <xsl:if test="$axf.extensions != 0">
942 <xsl:call-template name="axf-page-master-properties">
943 <xsl:with-param name="page.master">lot-even-draft</xsl:with-param>
946 <fo:region-body margin-bottom="{$body.margin.bottom}"
947 margin-top="{$body.margin.top}"
948 column-gap="{$column.gap.lot}"
949 column-count="{$column.count.lot}">
950 <xsl:if test="$draft.watermark.image != ''">
951 <xsl:attribute name="background-image">
952 <xsl:call-template name="fo-external-image">
953 <xsl:with-param name="filename" select="$draft.watermark.image"/>
956 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
957 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
958 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
959 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
962 <fo:region-before region-name="xsl-region-before-even"
963 extent="{$region.before.extent}"
964 display-align="before"/>
965 <fo:region-after region-name="xsl-region-after-even"
966 extent="{$region.after.extent}"
967 display-align="after"/>
968 </fo:simple-page-master>
970 <!-- draft frontmatter pages -->
971 <fo:simple-page-master master-name="front-first-draft"
972 page-width="{$page.width}"
973 page-height="{$page.height}"
974 margin-top="{$page.margin.top}"
975 margin-bottom="{$page.margin.bottom}">
976 <xsl:attribute name="margin-{$direction.align.start}">
977 <xsl:value-of select="$page.margin.inner"/>
978 <xsl:if test="$fop.extensions != 0">
979 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
982 <xsl:attribute name="margin-{$direction.align.end}">
983 <xsl:value-of select="$page.margin.outer"/>
985 <xsl:if test="$axf.extensions != 0">
986 <xsl:call-template name="axf-page-master-properties">
987 <xsl:with-param name="page.master">front-first-draft</xsl:with-param>
990 <fo:region-body margin-bottom="{$body.margin.bottom}"
991 margin-top="{$body.margin.top}"
992 column-gap="{$column.gap.front}"
993 column-count="{$column.count.front}">
994 <xsl:if test="$draft.watermark.image != ''">
995 <xsl:attribute name="background-image">
996 <xsl:call-template name="fo-external-image">
997 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1000 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1001 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1002 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1003 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1006 <fo:region-before region-name="xsl-region-before-first"
1007 extent="{$region.before.extent}"
1008 display-align="before"/>
1009 <fo:region-after region-name="xsl-region-after-first"
1010 extent="{$region.after.extent}"
1011 display-align="after"/>
1012 </fo:simple-page-master>
1014 <fo:simple-page-master master-name="front-odd-draft"
1015 page-width="{$page.width}"
1016 page-height="{$page.height}"
1017 margin-top="{$page.margin.top}"
1018 margin-bottom="{$page.margin.bottom}">
1019 <xsl:attribute name="margin-{$direction.align.start}">
1020 <xsl:value-of select="$page.margin.inner"/>
1021 <xsl:if test="$fop.extensions != 0">
1022 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1025 <xsl:attribute name="margin-{$direction.align.end}">
1026 <xsl:value-of select="$page.margin.outer"/>
1028 <xsl:if test="$axf.extensions != 0">
1029 <xsl:call-template name="axf-page-master-properties">
1030 <xsl:with-param name="page.master">front-odd-draft</xsl:with-param>
1031 </xsl:call-template>
1033 <fo:region-body margin-bottom="{$body.margin.bottom}"
1034 margin-top="{$body.margin.top}"
1035 column-gap="{$column.gap.front}"
1036 column-count="{$column.count.front}">
1037 <xsl:if test="$draft.watermark.image != ''">
1038 <xsl:attribute name="background-image">
1039 <xsl:call-template name="fo-external-image">
1040 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1041 </xsl:call-template>
1043 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1044 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1045 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1046 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1049 <fo:region-before region-name="xsl-region-before-odd"
1050 extent="{$region.before.extent}"
1051 display-align="before"/>
1052 <fo:region-after region-name="xsl-region-after-odd"
1053 extent="{$region.after.extent}"
1054 display-align="after"/>
1055 </fo:simple-page-master>
1057 <fo:simple-page-master master-name="front-even-draft"
1058 page-width="{$page.width}"
1059 page-height="{$page.height}"
1060 margin-top="{$page.margin.top}"
1061 margin-bottom="{$page.margin.bottom}">
1062 <xsl:attribute name="margin-{$direction.align.start}">
1063 <xsl:value-of select="$page.margin.outer"/>
1064 <xsl:if test="$fop.extensions != 0">
1065 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1068 <xsl:attribute name="margin-{$direction.align.end}">
1069 <xsl:value-of select="$page.margin.inner"/>
1071 <xsl:if test="$axf.extensions != 0">
1072 <xsl:call-template name="axf-page-master-properties">
1073 <xsl:with-param name="page.master">front-even-draft</xsl:with-param>
1074 </xsl:call-template>
1076 <fo:region-body margin-bottom="{$body.margin.bottom}"
1077 margin-top="{$body.margin.top}"
1078 column-gap="{$column.gap.front}"
1079 column-count="{$column.count.front}">
1080 <xsl:if test="$draft.watermark.image != ''">
1081 <xsl:attribute name="background-image">
1082 <xsl:call-template name="fo-external-image">
1083 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1084 </xsl:call-template>
1086 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1087 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1088 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1089 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1092 <fo:region-before region-name="xsl-region-before-even"
1093 extent="{$region.before.extent}"
1094 display-align="before"/>
1095 <fo:region-after region-name="xsl-region-after-even"
1096 extent="{$region.after.extent}"
1097 display-align="after"/>
1098 </fo:simple-page-master>
1100 <!-- draft body pages -->
1101 <fo:simple-page-master master-name="body-first-draft"
1102 page-width="{$page.width}"
1103 page-height="{$page.height}"
1104 margin-top="{$page.margin.top}"
1105 margin-bottom="{$page.margin.bottom}">
1106 <xsl:attribute name="margin-{$direction.align.start}">
1107 <xsl:value-of select="$page.margin.inner"/>
1108 <xsl:if test="$fop.extensions != 0">
1109 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1112 <xsl:attribute name="margin-{$direction.align.end}">
1113 <xsl:value-of select="$page.margin.outer"/>
1115 <xsl:if test="$axf.extensions != 0">
1116 <xsl:call-template name="axf-page-master-properties">
1117 <xsl:with-param name="page.master">body-first-draft</xsl:with-param>
1118 </xsl:call-template>
1120 <fo:region-body margin-bottom="{$body.margin.bottom}"
1121 margin-top="{$body.margin.top}"
1122 column-gap="{$column.gap.body}"
1123 column-count="{$column.count.body}">
1124 <xsl:if test="$draft.watermark.image != ''">
1125 <xsl:attribute name="background-image">
1126 <xsl:call-template name="fo-external-image">
1127 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1128 </xsl:call-template>
1130 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1131 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1132 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1133 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1136 <fo:region-before region-name="xsl-region-before-first"
1137 extent="{$region.before.extent}"
1138 display-align="before"/>
1139 <fo:region-after region-name="xsl-region-after-first"
1140 extent="{$region.after.extent}"
1141 display-align="after"/>
1142 </fo:simple-page-master>
1144 <fo:simple-page-master master-name="body-odd-draft"
1145 page-width="{$page.width}"
1146 page-height="{$page.height}"
1147 margin-top="{$page.margin.top}"
1148 margin-bottom="{$page.margin.bottom}">
1149 <xsl:attribute name="margin-{$direction.align.start}">
1150 <xsl:value-of select="$page.margin.inner"/>
1151 <xsl:if test="$fop.extensions != 0">
1152 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1155 <xsl:attribute name="margin-{$direction.align.end}">
1156 <xsl:value-of select="$page.margin.outer"/>
1158 <xsl:if test="$axf.extensions != 0">
1159 <xsl:call-template name="axf-page-master-properties">
1160 <xsl:with-param name="page.master">body-odd-draft</xsl:with-param>
1161 </xsl:call-template>
1163 <fo:region-body margin-bottom="{$body.margin.bottom}"
1164 margin-top="{$body.margin.top}"
1165 column-gap="{$column.gap.body}"
1166 column-count="{$column.count.body}">
1167 <xsl:if test="$draft.watermark.image != ''">
1168 <xsl:attribute name="background-image">
1169 <xsl:call-template name="fo-external-image">
1170 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1171 </xsl:call-template>
1173 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1174 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1175 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1176 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1179 <fo:region-before region-name="xsl-region-before-odd"
1180 extent="{$region.before.extent}"
1181 display-align="before"/>
1182 <fo:region-after region-name="xsl-region-after-odd"
1183 extent="{$region.after.extent}"
1184 display-align="after"/>
1185 </fo:simple-page-master>
1187 <fo:simple-page-master master-name="body-even-draft"
1188 page-width="{$page.width}"
1189 page-height="{$page.height}"
1190 margin-top="{$page.margin.top}"
1191 margin-bottom="{$page.margin.bottom}">
1192 <xsl:attribute name="margin-{$direction.align.start}">
1193 <xsl:value-of select="$page.margin.outer"/>
1194 <xsl:if test="$fop.extensions != 0">
1195 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1198 <xsl:attribute name="margin-{$direction.align.end}">
1199 <xsl:value-of select="$page.margin.inner"/>
1201 <xsl:if test="$axf.extensions != 0">
1202 <xsl:call-template name="axf-page-master-properties">
1203 <xsl:with-param name="page.master">body-even-draft</xsl:with-param>
1204 </xsl:call-template>
1206 <fo:region-body margin-bottom="{$body.margin.bottom}"
1207 margin-top="{$body.margin.top}"
1208 column-gap="{$column.gap.body}"
1209 column-count="{$column.count.body}">
1210 <xsl:if test="$draft.watermark.image != ''">
1211 <xsl:attribute name="background-image">
1212 <xsl:call-template name="fo-external-image">
1213 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1214 </xsl:call-template>
1216 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1217 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1218 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1219 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1222 <fo:region-before region-name="xsl-region-before-even"
1223 extent="{$region.before.extent}"
1224 display-align="before"/>
1225 <fo:region-after region-name="xsl-region-after-even"
1226 extent="{$region.after.extent}"
1227 display-align="after"/>
1228 </fo:simple-page-master>
1230 <!-- draft backmatter pages -->
1231 <fo:simple-page-master master-name="back-first-draft"
1232 page-width="{$page.width}"
1233 page-height="{$page.height}"
1234 margin-top="{$page.margin.top}"
1235 margin-bottom="{$page.margin.bottom}">
1236 <xsl:attribute name="margin-{$direction.align.start}">
1237 <xsl:value-of select="$page.margin.inner"/>
1238 <xsl:if test="$fop.extensions != 0">
1239 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1242 <xsl:attribute name="margin-{$direction.align.end}">
1243 <xsl:value-of select="$page.margin.outer"/>
1245 <xsl:if test="$axf.extensions != 0">
1246 <xsl:call-template name="axf-page-master-properties">
1247 <xsl:with-param name="page.master">back-first-draft</xsl:with-param>
1248 </xsl:call-template>
1250 <fo:region-body margin-bottom="{$body.margin.bottom}"
1251 margin-top="{$body.margin.top}"
1252 column-gap="{$column.gap.back}"
1253 column-count="{$column.count.back}">
1254 <xsl:if test="$draft.watermark.image != ''">
1255 <xsl:attribute name="background-image">
1256 <xsl:call-template name="fo-external-image">
1257 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1258 </xsl:call-template>
1260 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1261 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1262 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1263 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1266 <fo:region-before region-name="xsl-region-before-first"
1267 extent="{$region.before.extent}"
1268 display-align="before"/>
1269 <fo:region-after region-name="xsl-region-after-first"
1270 extent="{$region.after.extent}"
1271 display-align="after"/>
1272 </fo:simple-page-master>
1274 <fo:simple-page-master master-name="back-odd-draft"
1275 page-width="{$page.width}"
1276 page-height="{$page.height}"
1277 margin-top="{$page.margin.top}"
1278 margin-bottom="{$page.margin.bottom}">
1279 <xsl:attribute name="margin-{$direction.align.start}">
1280 <xsl:value-of select="$page.margin.inner"/>
1281 <xsl:if test="$fop.extensions != 0">
1282 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1285 <xsl:attribute name="margin-{$direction.align.end}">
1286 <xsl:value-of select="$page.margin.outer"/>
1288 <xsl:if test="$axf.extensions != 0">
1289 <xsl:call-template name="axf-page-master-properties">
1290 <xsl:with-param name="page.master">back-odd-draft</xsl:with-param>
1291 </xsl:call-template>
1293 <fo:region-body margin-bottom="{$body.margin.bottom}"
1294 margin-top="{$body.margin.top}"
1295 column-gap="{$column.gap.back}"
1296 column-count="{$column.count.back}">
1297 <xsl:if test="$draft.watermark.image != ''">
1298 <xsl:attribute name="background-image">
1299 <xsl:call-template name="fo-external-image">
1300 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1301 </xsl:call-template>
1303 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1304 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1305 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1306 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1309 <fo:region-before region-name="xsl-region-before-odd"
1310 extent="{$region.before.extent}"
1311 display-align="before"/>
1312 <fo:region-after region-name="xsl-region-after-odd"
1313 extent="{$region.after.extent}"
1314 display-align="after"/>
1315 </fo:simple-page-master>
1317 <fo:simple-page-master master-name="back-even-draft"
1318 page-width="{$page.width}"
1319 page-height="{$page.height}"
1320 margin-top="{$page.margin.top}"
1321 margin-bottom="{$page.margin.bottom}">
1322 <xsl:attribute name="margin-{$direction.align.start}">
1323 <xsl:value-of select="$page.margin.outer"/>
1324 <xsl:if test="$fop.extensions != 0">
1325 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1328 <xsl:attribute name="margin-{$direction.align.end}">
1329 <xsl:value-of select="$page.margin.inner"/>
1331 <xsl:if test="$axf.extensions != 0">
1332 <xsl:call-template name="axf-page-master-properties">
1333 <xsl:with-param name="page.master">back-even-draft</xsl:with-param>
1334 </xsl:call-template>
1336 <fo:region-body margin-bottom="{$body.margin.bottom}"
1337 margin-top="{$body.margin.top}"
1338 column-gap="{$column.gap.back}"
1339 column-count="{$column.count.back}">
1340 <xsl:if test="$draft.watermark.image != ''">
1341 <xsl:attribute name="background-image">
1342 <xsl:call-template name="fo-external-image">
1343 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1344 </xsl:call-template>
1346 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1347 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1348 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1349 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1352 <fo:region-before region-name="xsl-region-before-even"
1353 extent="{$region.before.extent}"
1354 display-align="before"/>
1355 <fo:region-after region-name="xsl-region-after-even"
1356 extent="{$region.after.extent}"
1357 display-align="after"/>
1358 </fo:simple-page-master>
1360 <!-- draft index pages -->
1361 <fo:simple-page-master master-name="index-first-draft"
1362 page-width="{$page.width}"
1363 page-height="{$page.height}"
1364 margin-top="{$page.margin.top}"
1365 margin-bottom="{$page.margin.bottom}">
1366 <xsl:attribute name="margin-{$direction.align.start}">
1367 <xsl:value-of select="$page.margin.inner"/>
1368 <xsl:if test="$fop.extensions != 0">
1369 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1372 <xsl:attribute name="margin-{$direction.align.end}">
1373 <xsl:value-of select="$page.margin.outer"/>
1375 <xsl:if test="$axf.extensions != 0">
1376 <xsl:call-template name="axf-page-master-properties">
1377 <xsl:with-param name="page.master">index-first-draft</xsl:with-param>
1378 </xsl:call-template>
1380 <fo:region-body margin-bottom="{$body.margin.bottom}"
1381 margin-top="{$body.margin.top}"
1382 column-gap="{$column.gap.index}"
1383 column-count="{$column.count.index}">
1384 <xsl:if test="$draft.watermark.image != ''">
1385 <xsl:attribute name="background-image">
1386 <xsl:call-template name="fo-external-image">
1387 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1388 </xsl:call-template>
1390 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1391 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1392 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1393 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1396 <fo:region-before region-name="xsl-region-before-first"
1397 extent="{$region.before.extent}"
1398 display-align="before"/>
1399 <fo:region-after region-name="xsl-region-after-first"
1400 extent="{$region.after.extent}"
1401 display-align="after"/>
1402 </fo:simple-page-master>
1404 <fo:simple-page-master master-name="index-odd-draft"
1405 page-width="{$page.width}"
1406 page-height="{$page.height}"
1407 margin-top="{$page.margin.top}"
1408 margin-bottom="{$page.margin.bottom}">
1409 <xsl:attribute name="margin-{$direction.align.start}">
1410 <xsl:value-of select="$page.margin.inner"/>
1411 <xsl:if test="$fop.extensions != 0">
1412 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1415 <xsl:attribute name="margin-{$direction.align.end}">
1416 <xsl:value-of select="$page.margin.outer"/>
1418 <xsl:if test="$axf.extensions != 0">
1419 <xsl:call-template name="axf-page-master-properties">
1420 <xsl:with-param name="page.master">index-odd-draft</xsl:with-param>
1421 </xsl:call-template>
1423 <fo:region-body margin-bottom="{$body.margin.bottom}"
1424 margin-top="{$body.margin.top}"
1425 column-gap="{$column.gap.index}"
1426 column-count="{$column.count.index}">
1427 <xsl:if test="$draft.watermark.image != ''">
1428 <xsl:attribute name="background-image">
1429 <xsl:call-template name="fo-external-image">
1430 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1431 </xsl:call-template>
1433 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1434 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1435 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1436 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1439 <fo:region-before region-name="xsl-region-before-odd"
1440 extent="{$region.before.extent}"
1441 display-align="before"/>
1442 <fo:region-after region-name="xsl-region-after-odd"
1443 extent="{$region.after.extent}"
1444 display-align="after"/>
1445 </fo:simple-page-master>
1447 <fo:simple-page-master master-name="index-even-draft"
1448 page-width="{$page.width}"
1449 page-height="{$page.height}"
1450 margin-top="{$page.margin.top}"
1451 margin-bottom="{$page.margin.bottom}">
1452 <xsl:attribute name="margin-{$direction.align.start}">
1453 <xsl:value-of select="$page.margin.outer"/>
1454 <xsl:if test="$fop.extensions != 0">
1455 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
1458 <xsl:attribute name="margin-{$direction.align.end}">
1459 <xsl:value-of select="$page.margin.inner"/>
1461 <xsl:if test="$axf.extensions != 0">
1462 <xsl:call-template name="axf-page-master-properties">
1463 <xsl:with-param name="page.master">index-even-draft</xsl:with-param>
1464 </xsl:call-template>
1466 <fo:region-body margin-bottom="{$body.margin.bottom}"
1467 margin-top="{$body.margin.top}"
1468 column-gap="{$column.gap.index}"
1469 column-count="{$column.count.index}">
1470 <xsl:if test="$draft.watermark.image != ''">
1471 <xsl:attribute name="background-image">
1472 <xsl:call-template name="fo-external-image">
1473 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1474 </xsl:call-template>
1476 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1477 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1478 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1479 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1482 <fo:region-before region-name="xsl-region-before-even"
1483 extent="{$region.before.extent}"
1484 display-align="before"/>
1485 <fo:region-after region-name="xsl-region-after-even"
1486 extent="{$region.after.extent}"
1487 display-align="after"/>
1488 </fo:simple-page-master>
1491 <!-- setup for title page(s) -->
1492 <fo:page-sequence-master master-name="titlepage">
1493 <fo:repeatable-page-master-alternatives>
1494 <fo:conditional-page-master-reference master-reference="blank"
1495 blank-or-not-blank="blank"/>
1496 <fo:conditional-page-master-reference master-reference="titlepage-first"
1497 page-position="first"/>
1498 <fo:conditional-page-master-reference master-reference="titlepage-odd"
1500 <fo:conditional-page-master-reference
1502 <xsl:attribute name="master-reference">
1504 <xsl:when test="$double.sided != 0">titlepage-even</xsl:when>
1505 <xsl:otherwise>titlepage-odd</xsl:otherwise>
1508 </fo:conditional-page-master-reference>
1509 </fo:repeatable-page-master-alternatives>
1510 </fo:page-sequence-master>
1512 <!-- setup for lots -->
1513 <fo:page-sequence-master master-name="lot">
1514 <fo:repeatable-page-master-alternatives>
1515 <fo:conditional-page-master-reference master-reference="blank"
1516 blank-or-not-blank="blank"/>
1517 <fo:conditional-page-master-reference master-reference="lot-first"
1518 page-position="first"/>
1519 <fo:conditional-page-master-reference master-reference="lot-odd"
1521 <fo:conditional-page-master-reference
1523 <xsl:attribute name="master-reference">
1525 <xsl:when test="$double.sided != 0">lot-even</xsl:when>
1526 <xsl:otherwise>lot-odd</xsl:otherwise>
1529 </fo:conditional-page-master-reference>
1530 </fo:repeatable-page-master-alternatives>
1531 </fo:page-sequence-master>
1533 <!-- setup front matter -->
1534 <fo:page-sequence-master master-name="front">
1535 <fo:repeatable-page-master-alternatives>
1536 <fo:conditional-page-master-reference master-reference="blank"
1537 blank-or-not-blank="blank"/>
1538 <fo:conditional-page-master-reference master-reference="front-first"
1539 page-position="first"/>
1540 <fo:conditional-page-master-reference master-reference="front-odd"
1542 <fo:conditional-page-master-reference
1544 <xsl:attribute name="master-reference">
1546 <xsl:when test="$double.sided != 0">front-even</xsl:when>
1547 <xsl:otherwise>front-odd</xsl:otherwise>
1550 </fo:conditional-page-master-reference>
1551 </fo:repeatable-page-master-alternatives>
1552 </fo:page-sequence-master>
1554 <!-- setup for body pages -->
1555 <fo:page-sequence-master master-name="body">
1556 <fo:repeatable-page-master-alternatives>
1557 <fo:conditional-page-master-reference master-reference="blank"
1558 blank-or-not-blank="blank"/>
1559 <fo:conditional-page-master-reference master-reference="body-first"
1560 page-position="first"/>
1561 <fo:conditional-page-master-reference master-reference="body-odd"
1563 <fo:conditional-page-master-reference
1565 <xsl:attribute name="master-reference">
1567 <xsl:when test="$double.sided != 0">body-even</xsl:when>
1568 <xsl:otherwise>body-odd</xsl:otherwise>
1571 </fo:conditional-page-master-reference>
1572 </fo:repeatable-page-master-alternatives>
1573 </fo:page-sequence-master>
1575 <!-- setup back matter -->
1576 <fo:page-sequence-master master-name="back">
1577 <fo:repeatable-page-master-alternatives>
1578 <fo:conditional-page-master-reference master-reference="blank"
1579 blank-or-not-blank="blank"/>
1580 <fo:conditional-page-master-reference master-reference="back-first"
1581 page-position="first"/>
1582 <fo:conditional-page-master-reference master-reference="back-odd"
1584 <fo:conditional-page-master-reference
1586 <xsl:attribute name="master-reference">
1588 <xsl:when test="$double.sided != 0">back-even</xsl:when>
1589 <xsl:otherwise>back-odd</xsl:otherwise>
1592 </fo:conditional-page-master-reference>
1593 </fo:repeatable-page-master-alternatives>
1594 </fo:page-sequence-master>
1596 <!-- setup back matter -->
1597 <fo:page-sequence-master master-name="index">
1598 <fo:repeatable-page-master-alternatives>
1599 <fo:conditional-page-master-reference master-reference="blank"
1600 blank-or-not-blank="blank"/>
1601 <fo:conditional-page-master-reference master-reference="index-first"
1602 page-position="first"/>
1603 <fo:conditional-page-master-reference master-reference="index-odd"
1605 <fo:conditional-page-master-reference
1607 <xsl:attribute name="master-reference">
1609 <xsl:when test="$double.sided != 0">index-even</xsl:when>
1610 <xsl:otherwise>index-odd</xsl:otherwise>
1613 </fo:conditional-page-master-reference>
1614 </fo:repeatable-page-master-alternatives>
1615 </fo:page-sequence-master>
1617 <xsl:if test="$draft.mode != 'no'">
1618 <!-- setup for draft title page(s) -->
1619 <fo:page-sequence-master master-name="titlepage-draft">
1620 <fo:repeatable-page-master-alternatives>
1621 <fo:conditional-page-master-reference master-reference="blank-draft"
1622 blank-or-not-blank="blank"/>
1623 <fo:conditional-page-master-reference master-reference="titlepage-first-draft"
1624 page-position="first"/>
1625 <fo:conditional-page-master-reference master-reference="titlepage-odd-draft"
1627 <fo:conditional-page-master-reference
1629 <xsl:attribute name="master-reference">
1631 <xsl:when test="$double.sided != 0">titlepage-even-draft</xsl:when>
1632 <xsl:otherwise>titlepage-odd-draft</xsl:otherwise>
1635 </fo:conditional-page-master-reference>
1636 </fo:repeatable-page-master-alternatives>
1637 </fo:page-sequence-master>
1639 <!-- setup for draft lots -->
1640 <fo:page-sequence-master master-name="lot-draft">
1641 <fo:repeatable-page-master-alternatives>
1642 <fo:conditional-page-master-reference master-reference="blank-draft"
1643 blank-or-not-blank="blank"/>
1644 <fo:conditional-page-master-reference master-reference="lot-first-draft"
1645 page-position="first"/>
1646 <fo:conditional-page-master-reference master-reference="lot-odd-draft"
1648 <fo:conditional-page-master-reference
1650 <xsl:attribute name="master-reference">
1652 <xsl:when test="$double.sided != 0">lot-even-draft</xsl:when>
1653 <xsl:otherwise>lot-odd-draft</xsl:otherwise>
1656 </fo:conditional-page-master-reference>
1657 </fo:repeatable-page-master-alternatives>
1658 </fo:page-sequence-master>
1660 <!-- setup draft front matter -->
1661 <fo:page-sequence-master master-name="front-draft">
1662 <fo:repeatable-page-master-alternatives>
1663 <fo:conditional-page-master-reference master-reference="blank-draft"
1664 blank-or-not-blank="blank"/>
1665 <fo:conditional-page-master-reference master-reference="front-first-draft"
1666 page-position="first"/>
1667 <fo:conditional-page-master-reference master-reference="front-odd-draft"
1669 <fo:conditional-page-master-reference
1671 <xsl:attribute name="master-reference">
1673 <xsl:when test="$double.sided != 0">front-even-draft</xsl:when>
1674 <xsl:otherwise>front-odd-draft</xsl:otherwise>
1677 </fo:conditional-page-master-reference>
1678 </fo:repeatable-page-master-alternatives>
1679 </fo:page-sequence-master>
1681 <!-- setup for draft body pages -->
1682 <fo:page-sequence-master master-name="body-draft">
1683 <fo:repeatable-page-master-alternatives>
1684 <fo:conditional-page-master-reference master-reference="blank-draft"
1685 blank-or-not-blank="blank"/>
1686 <fo:conditional-page-master-reference master-reference="body-first-draft"
1687 page-position="first"/>
1688 <fo:conditional-page-master-reference master-reference="body-odd-draft"
1690 <fo:conditional-page-master-reference
1692 <xsl:attribute name="master-reference">
1694 <xsl:when test="$double.sided != 0">body-even-draft</xsl:when>
1695 <xsl:otherwise>body-odd-draft</xsl:otherwise>
1698 </fo:conditional-page-master-reference>
1699 </fo:repeatable-page-master-alternatives>
1700 </fo:page-sequence-master>
1702 <!-- setup draft back matter -->
1703 <fo:page-sequence-master master-name="back-draft">
1704 <fo:repeatable-page-master-alternatives>
1705 <fo:conditional-page-master-reference master-reference="blank-draft"
1706 blank-or-not-blank="blank"/>
1707 <fo:conditional-page-master-reference master-reference="back-first-draft"
1708 page-position="first"/>
1709 <fo:conditional-page-master-reference master-reference="back-odd-draft"
1711 <fo:conditional-page-master-reference
1713 <xsl:attribute name="master-reference">
1715 <xsl:when test="$double.sided != 0">back-even-draft</xsl:when>
1716 <xsl:otherwise>back-odd-draft</xsl:otherwise>
1719 </fo:conditional-page-master-reference>
1720 </fo:repeatable-page-master-alternatives>
1721 </fo:page-sequence-master>
1723 <!-- setup draft index pages -->
1724 <fo:page-sequence-master master-name="index-draft">
1725 <fo:repeatable-page-master-alternatives>
1726 <fo:conditional-page-master-reference master-reference="blank-draft"
1727 blank-or-not-blank="blank"/>
1728 <fo:conditional-page-master-reference master-reference="index-first-draft"
1729 page-position="first"/>
1730 <fo:conditional-page-master-reference master-reference="index-odd-draft"
1732 <fo:conditional-page-master-reference
1734 <xsl:attribute name="master-reference">
1736 <xsl:when test="$double.sided != 0">index-even-draft</xsl:when>
1737 <xsl:otherwise>index-odd-draft</xsl:otherwise>
1740 </fo:conditional-page-master-reference>
1741 </fo:repeatable-page-master-alternatives>
1742 </fo:page-sequence-master>
1745 <xsl:call-template name="user.pagemasters"/>
1747 </fo:layout-master-set>
1750 <!-- ==================================================================== -->
1752 <xsl:template name="user.pagemasters"/> <!-- intentionally empty -->
1754 <!-- ==================================================================== -->
1756 <xsl:template name="select.pagemaster">
1757 <xsl:param name="element" select="local-name(.)"/>
1758 <xsl:param name="pageclass" select="''"/>
1760 <xsl:variable name="pagemaster">
1762 <xsl:when test="$pageclass != ''">
1763 <xsl:value-of select="$pageclass"/>
1765 <xsl:when test="$pageclass = 'lot'">lot</xsl:when>
1766 <xsl:when test="$element = 'dedication'">front</xsl:when>
1767 <xsl:when test="$element = 'acknowledgements'">front</xsl:when>
1768 <xsl:when test="$element = 'preface'">front</xsl:when>
1769 <xsl:when test="$element = 'appendix'">back</xsl:when>
1770 <xsl:when test="$element = 'glossary'">back</xsl:when>
1771 <xsl:when test="$element = 'bibliography'">back</xsl:when>
1772 <xsl:when test="$element = 'index'">index</xsl:when>
1773 <xsl:when test="$element = 'colophon'">back</xsl:when>
1774 <xsl:otherwise>body</xsl:otherwise>
1778 <xsl:when test="$draft.mode = 'yes'">
1779 <xsl:text>-draft</xsl:text>
1781 <xsl:when test="$draft.mode = 'no'">
1784 <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">
1785 <xsl:text>-draft</xsl:text>
1793 <xsl:call-template name="select.user.pagemaster">
1794 <xsl:with-param name="element" select="$element"/>
1795 <xsl:with-param name="pageclass" select="$pageclass"/>
1796 <xsl:with-param name="default-pagemaster" select="$pagemaster"/>
1797 </xsl:call-template>
1800 <xsl:template name="select.user.pagemaster">
1801 <xsl:param name="element"/>
1802 <xsl:param name="pageclass"/>
1803 <xsl:param name="default-pagemaster"/>
1805 <!-- by default, return the default. But if you've created your own
1806 pagemasters in user.pagemasters, you might want to select one here. -->
1807 <xsl:value-of select="$default-pagemaster"/>
1810 <!-- ==================================================================== -->
1812 <xsl:template name="head.sep.rule">
1813 <xsl:param name="pageclass"/>
1814 <xsl:param name="sequence"/>
1815 <xsl:param name="gentext-key"/>
1817 <xsl:if test="$header.rule != 0">
1818 <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
1819 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
1820 <xsl:attribute name="border-bottom-color">black</xsl:attribute>
1824 <xsl:template name="foot.sep.rule">
1825 <xsl:param name="pageclass"/>
1826 <xsl:param name="sequence"/>
1827 <xsl:param name="gentext-key"/>
1829 <xsl:if test="$footer.rule != 0">
1830 <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
1831 <xsl:attribute name="border-top-style">solid</xsl:attribute>
1832 <xsl:attribute name="border-top-color">black</xsl:attribute>
1836 <!-- ==================================================================== -->
1838 <xsl:template match="*" mode="running.head.mode">
1839 <xsl:param name="master-reference" select="'unknown'"/>
1840 <xsl:param name="gentext-key" select="local-name(.)"/>
1842 <!-- remove -draft from reference -->
1843 <xsl:variable name="pageclass">
1845 <xsl:when test="contains($master-reference, '-draft')">
1846 <xsl:value-of select="substring-before($master-reference, '-draft')"/>
1849 <xsl:value-of select="$master-reference"/>
1854 <fo:static-content flow-name="xsl-region-before-first">
1855 <fo:block xsl:use-attribute-sets="header.content.properties">
1856 <xsl:call-template name="header.table">
1857 <xsl:with-param name="pageclass" select="$pageclass"/>
1858 <xsl:with-param name="sequence" select="'first'"/>
1859 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1860 </xsl:call-template>
1862 </fo:static-content>
1864 <fo:static-content flow-name="xsl-region-before-odd">
1865 <fo:block xsl:use-attribute-sets="header.content.properties">
1866 <xsl:call-template name="header.table">
1867 <xsl:with-param name="pageclass" select="$pageclass"/>
1868 <xsl:with-param name="sequence" select="'odd'"/>
1869 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1870 </xsl:call-template>
1872 </fo:static-content>
1874 <fo:static-content flow-name="xsl-region-before-even">
1875 <fo:block xsl:use-attribute-sets="header.content.properties">
1876 <xsl:call-template name="header.table">
1877 <xsl:with-param name="pageclass" select="$pageclass"/>
1878 <xsl:with-param name="sequence" select="'even'"/>
1879 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1880 </xsl:call-template>
1882 </fo:static-content>
1884 <fo:static-content flow-name="xsl-region-before-blank">
1885 <fo:block xsl:use-attribute-sets="header.content.properties">
1886 <xsl:call-template name="header.table">
1887 <xsl:with-param name="pageclass" select="$pageclass"/>
1888 <xsl:with-param name="sequence" select="'blank'"/>
1889 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1890 </xsl:call-template>
1892 </fo:static-content>
1894 <xsl:call-template name="footnote-separator"/>
1896 <xsl:if test="$fop.extensions = 0 and $fop1.extensions = 0">
1897 <xsl:call-template name="blank.page.content"/>
1901 <xsl:template name="footnote-separator">
1902 <fo:static-content flow-name="xsl-footnote-separator">
1904 <fo:leader xsl:use-attribute-sets="footnote.sep.leader.properties"/>
1906 </fo:static-content>
1909 <xsl:template name="blank.page.content">
1910 <fo:static-content flow-name="blank-body">
1911 <fo:block text-align="center"/>
1912 </fo:static-content>
1915 <xsl:template name="header.table">
1916 <xsl:param name="pageclass" select="''"/>
1917 <xsl:param name="sequence" select="''"/>
1918 <xsl:param name="gentext-key" select="''"/>
1920 <!-- default is a single table style for all headers -->
1921 <!-- Customize it for different page classes or sequence location -->
1924 <xsl:when test="$pageclass = 'index'">
1925 <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute>
1929 <xsl:variable name="column1">
1931 <xsl:when test="$double.sided = 0">1</xsl:when>
1932 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
1933 <xsl:otherwise>3</xsl:otherwise>
1937 <xsl:variable name="column3">
1939 <xsl:when test="$double.sided = 0">3</xsl:when>
1940 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
1941 <xsl:otherwise>1</xsl:otherwise>
1945 <xsl:variable name="candidate">
1946 <fo:table xsl:use-attribute-sets="header.table.properties">
1947 <xsl:call-template name="head.sep.rule">
1948 <xsl:with-param name="pageclass" select="$pageclass"/>
1949 <xsl:with-param name="sequence" select="$sequence"/>
1950 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1951 </xsl:call-template>
1953 <fo:table-column column-number="1">
1954 <xsl:attribute name="column-width">
1955 <xsl:text>proportional-column-width(</xsl:text>
1956 <xsl:call-template name="header.footer.width">
1957 <xsl:with-param name="location">header</xsl:with-param>
1958 <xsl:with-param name="position" select="$column1"/>
1959 </xsl:call-template>
1960 <xsl:text>)</xsl:text>
1963 <fo:table-column column-number="2">
1964 <xsl:attribute name="column-width">
1965 <xsl:text>proportional-column-width(</xsl:text>
1966 <xsl:call-template name="header.footer.width">
1967 <xsl:with-param name="location">header</xsl:with-param>
1968 <xsl:with-param name="position" select="2"/>
1969 </xsl:call-template>
1970 <xsl:text>)</xsl:text>
1973 <fo:table-column column-number="3">
1974 <xsl:attribute name="column-width">
1975 <xsl:text>proportional-column-width(</xsl:text>
1976 <xsl:call-template name="header.footer.width">
1977 <xsl:with-param name="location">header</xsl:with-param>
1978 <xsl:with-param name="position" select="$column3"/>
1979 </xsl:call-template>
1980 <xsl:text>)</xsl:text>
1986 <xsl:attribute name="block-progression-dimension.minimum">
1987 <xsl:value-of select="$header.table.height"/>
1989 <fo:table-cell text-align="start"
1990 display-align="before">
1991 <xsl:if test="$fop.extensions = 0">
1992 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1995 <xsl:call-template name="header.content">
1996 <xsl:with-param name="pageclass" select="$pageclass"/>
1997 <xsl:with-param name="sequence" select="$sequence"/>
1998 <xsl:with-param name="position" select="$direction.align.start"/>
1999 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2000 </xsl:call-template>
2003 <fo:table-cell text-align="center"
2004 display-align="before">
2005 <xsl:if test="$fop.extensions = 0">
2006 <xsl:attribute name="relative-align">baseline</xsl:attribute>
2009 <xsl:call-template name="header.content">
2010 <xsl:with-param name="pageclass" select="$pageclass"/>
2011 <xsl:with-param name="sequence" select="$sequence"/>
2012 <xsl:with-param name="position" select="'center'"/>
2013 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2014 </xsl:call-template>
2017 <fo:table-cell text-align="right"
2018 display-align="before">
2019 <xsl:if test="$fop.extensions = 0">
2020 <xsl:attribute name="relative-align">baseline</xsl:attribute>
2023 <xsl:call-template name="header.content">
2024 <xsl:with-param name="pageclass" select="$pageclass"/>
2025 <xsl:with-param name="sequence" select="$sequence"/>
2026 <xsl:with-param name="position" select="$direction.align.end"/>
2027 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2028 </xsl:call-template>
2036 <!-- Really output a header? -->
2038 <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book'
2039 and $sequence='first'">
2040 <!-- no, book titlepages have no headers at all -->
2042 <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0">
2046 <xsl:copy-of select="$candidate"/>
2051 <xsl:template name="header.content">
2052 <xsl:param name="pageclass" select="''"/>
2053 <xsl:param name="sequence" select="''"/>
2054 <xsl:param name="position" select="''"/>
2055 <xsl:param name="gentext-key" select="''"/>
2059 <xsl:value-of select="$pageclass"/>
2060 <xsl:text>, </xsl:text>
2061 <xsl:value-of select="$sequence"/>
2062 <xsl:text>, </xsl:text>
2063 <xsl:value-of select="$position"/>
2064 <xsl:text>, </xsl:text>
2065 <xsl:value-of select="$gentext-key"/>
2071 <!-- sequence can be odd, even, first, blank -->
2072 <!-- position can be left, center, right -->
2074 <xsl:when test="$sequence = 'blank'">
2078 <xsl:when test="$position='left'">
2079 <!-- Same for odd, even, empty, and blank sequences -->
2080 <xsl:call-template name="draft.text"/>
2083 <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'">
2084 <xsl:if test="$pageclass != 'titlepage'">
2086 <xsl:when test="ancestor::book and ($double.sided != 0)">
2087 <fo:retrieve-marker retrieve-class-name="section.head.marker"
2088 retrieve-position="first-including-carryover"
2089 retrieve-boundary="page-sequence"/>
2092 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
2098 <xsl:when test="$position='center'">
2099 <!-- nothing for empty and blank sequences -->
2102 <xsl:when test="$position='right'">
2103 <!-- Same for odd, even, empty, and blank sequences -->
2104 <xsl:call-template name="draft.text"/>
2107 <xsl:when test="$sequence = 'first'">
2108 <!-- nothing for first pages -->
2111 <xsl:when test="$sequence = 'blank'">
2112 <!-- nothing for blank pages -->
2118 <xsl:template name="header.footer.width">
2119 <xsl:param name="location" select="'header'"/>
2120 <xsl:param name="position" select="1"/>
2122 <xsl:variable name="width.set">
2124 <xsl:when test="$location = 'header'">
2125 <xsl:value-of select="normalize-space($header.column.widths)"/>
2128 <xsl:value-of select="normalize-space($footer.column.widths)"/>
2134 <xsl:variable name="width">
2136 <xsl:when test="$position = 1">
2137 <xsl:value-of select="substring-before($width.set, ' ')"/>
2139 <xsl:when test="$position = 2">
2140 <xsl:value-of select="substring-before(substring-after($width.set, ' '), ' ')"/>
2143 <xsl:value-of select="substring-after(substring-after($width.set, ' '), ' ')"/>
2148 <!-- Make sure it is a number -->
2150 <xsl:when test = "$width = number($width)">
2151 <xsl:value-of select="$width"/>
2154 <xsl:message>Error: value in <xsl:value-of select="$location"/>.column.widths at position <xsl:value-of select="$position"/> is not a number.</xsl:message>
2155 <xsl:text>1</xsl:text>
2160 <xsl:template name="draft.text">
2162 <xsl:when test="$draft.mode = 'yes'">
2163 <xsl:call-template name="gentext">
2164 <xsl:with-param name="key" select="'Draft'"/>
2165 </xsl:call-template>
2167 <xsl:when test="$draft.mode = 'no'">
2170 <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'">
2171 <xsl:call-template name="gentext">
2172 <xsl:with-param name="key" select="'Draft'"/>
2173 </xsl:call-template>
2181 <!-- ==================================================================== -->
2183 <xsl:template match="*" mode="running.foot.mode">
2184 <xsl:param name="master-reference" select="'unknown'"/>
2185 <xsl:param name="gentext-key" select="local-name(.)"/>
2187 <!-- remove -draft from reference -->
2188 <xsl:variable name="pageclass">
2190 <xsl:when test="contains($master-reference, '-draft')">
2191 <xsl:value-of select="substring-before($master-reference, '-draft')"/>
2194 <xsl:value-of select="$master-reference"/>
2199 <fo:static-content flow-name="xsl-region-after-first">
2200 <fo:block xsl:use-attribute-sets="footer.content.properties">
2201 <xsl:call-template name="footer.table">
2202 <xsl:with-param name="pageclass" select="$pageclass"/>
2203 <xsl:with-param name="sequence" select="'first'"/>
2204 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2205 </xsl:call-template>
2207 </fo:static-content>
2209 <fo:static-content flow-name="xsl-region-after-odd">
2210 <fo:block xsl:use-attribute-sets="footer.content.properties">
2211 <xsl:call-template name="footer.table">
2212 <xsl:with-param name="pageclass" select="$pageclass"/>
2213 <xsl:with-param name="sequence" select="'odd'"/>
2214 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2215 </xsl:call-template>
2217 </fo:static-content>
2219 <fo:static-content flow-name="xsl-region-after-even">
2220 <fo:block xsl:use-attribute-sets="footer.content.properties">
2221 <xsl:call-template name="footer.table">
2222 <xsl:with-param name="pageclass" select="$pageclass"/>
2223 <xsl:with-param name="sequence" select="'even'"/>
2224 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2225 </xsl:call-template>
2227 </fo:static-content>
2229 <fo:static-content flow-name="xsl-region-after-blank">
2230 <fo:block xsl:use-attribute-sets="footer.content.properties">
2231 <xsl:call-template name="footer.table">
2232 <xsl:with-param name="pageclass" select="$pageclass"/>
2233 <xsl:with-param name="sequence" select="'blank'"/>
2234 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2235 </xsl:call-template>
2237 </fo:static-content>
2240 <xsl:template name="footer.table">
2241 <xsl:param name="pageclass" select="''"/>
2242 <xsl:param name="sequence" select="''"/>
2243 <xsl:param name="gentext-key" select="''"/>
2245 <!-- default is a single table style for all footers -->
2246 <!-- Customize it for different page classes or sequence location -->
2249 <xsl:when test="$pageclass = 'index'">
2250 <xsl:attribute name="margin-{$direction.align.start}">0pt</xsl:attribute>
2254 <xsl:variable name="column1">
2256 <xsl:when test="$double.sided = 0">1</xsl:when>
2257 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
2258 <xsl:otherwise>3</xsl:otherwise>
2262 <xsl:variable name="column3">
2264 <xsl:when test="$double.sided = 0">3</xsl:when>
2265 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
2266 <xsl:otherwise>1</xsl:otherwise>
2270 <xsl:variable name="candidate">
2271 <fo:table xsl:use-attribute-sets="footer.table.properties">
2272 <xsl:call-template name="foot.sep.rule">
2273 <xsl:with-param name="pageclass" select="$pageclass"/>
2274 <xsl:with-param name="sequence" select="$sequence"/>
2275 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2276 </xsl:call-template>
2277 <fo:table-column column-number="1">
2278 <xsl:attribute name="column-width">
2279 <xsl:text>proportional-column-width(</xsl:text>
2280 <xsl:call-template name="header.footer.width">
2281 <xsl:with-param name="location">footer</xsl:with-param>
2282 <xsl:with-param name="position" select="$column1"/>
2283 </xsl:call-template>
2284 <xsl:text>)</xsl:text>
2287 <fo:table-column column-number="2">
2288 <xsl:attribute name="column-width">
2289 <xsl:text>proportional-column-width(</xsl:text>
2290 <xsl:call-template name="header.footer.width">
2291 <xsl:with-param name="location">footer</xsl:with-param>
2292 <xsl:with-param name="position" select="2"/>
2293 </xsl:call-template>
2294 <xsl:text>)</xsl:text>
2297 <fo:table-column column-number="3">
2298 <xsl:attribute name="column-width">
2299 <xsl:text>proportional-column-width(</xsl:text>
2300 <xsl:call-template name="header.footer.width">
2301 <xsl:with-param name="location">footer</xsl:with-param>
2302 <xsl:with-param name="position" select="$column3"/>
2303 </xsl:call-template>
2304 <xsl:text>)</xsl:text>
2310 <xsl:attribute name="block-progression-dimension.minimum">
2311 <xsl:value-of select="$footer.table.height"/>
2313 <fo:table-cell text-align="start"
2314 display-align="after">
2315 <xsl:if test="$fop.extensions = 0">
2316 <xsl:attribute name="relative-align">baseline</xsl:attribute>
2319 <xsl:call-template name="footer.content">
2320 <xsl:with-param name="pageclass" select="$pageclass"/>
2321 <xsl:with-param name="sequence" select="$sequence"/>
2322 <xsl:with-param name="position" select="$direction.align.start"/>
2323 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2324 </xsl:call-template>
2327 <fo:table-cell text-align="center"
2328 display-align="after">
2329 <xsl:if test="$fop.extensions = 0">
2330 <xsl:attribute name="relative-align">baseline</xsl:attribute>
2333 <xsl:call-template name="footer.content">
2334 <xsl:with-param name="pageclass" select="$pageclass"/>
2335 <xsl:with-param name="sequence" select="$sequence"/>
2336 <xsl:with-param name="position" select="'center'"/>
2337 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2338 </xsl:call-template>
2341 <fo:table-cell text-align="end"
2342 display-align="after">
2343 <xsl:if test="$fop.extensions = 0">
2344 <xsl:attribute name="relative-align">baseline</xsl:attribute>
2347 <xsl:call-template name="footer.content">
2348 <xsl:with-param name="pageclass" select="$pageclass"/>
2349 <xsl:with-param name="sequence" select="$sequence"/>
2350 <xsl:with-param name="position" select="$direction.align.end"/>
2351 <xsl:with-param name="gentext-key" select="$gentext-key"/>
2352 </xsl:call-template>
2360 <!-- Really output a footer? -->
2362 <xsl:when test="$pageclass='titlepage' and $gentext-key='book'
2363 and $sequence='first'">
2364 <!-- no, book titlepages have no footers at all -->
2366 <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0">
2370 <xsl:copy-of select="$candidate"/>
2375 <xsl:template name="footer.content">
2376 <xsl:param name="pageclass" select="''"/>
2377 <xsl:param name="sequence" select="''"/>
2378 <xsl:param name="position" select="''"/>
2379 <xsl:param name="gentext-key" select="''"/>
2383 <xsl:value-of select="$pageclass"/>
2384 <xsl:text>, </xsl:text>
2385 <xsl:value-of select="$sequence"/>
2386 <xsl:text>, </xsl:text>
2387 <xsl:value-of select="$position"/>
2388 <xsl:text>, </xsl:text>
2389 <xsl:value-of select="$gentext-key"/>
2394 <!-- pageclass can be front, body, back -->
2395 <!-- sequence can be odd, even, first, blank -->
2396 <!-- position can be left, center, right -->
2398 <xsl:when test="$pageclass = 'titlepage'">
2399 <!-- nop; no footer on title pages -->
2402 <xsl:when test="$double.sided != 0 and $sequence = 'even'
2403 and $position='left'">
2407 <xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first')
2408 and $position='right'">
2412 <xsl:when test="$double.sided = 0 and $position='center'">
2416 <xsl:when test="$sequence='blank'">
2418 <xsl:when test="$double.sided != 0 and $position = 'left'">
2421 <xsl:when test="$double.sided = 0 and $position = 'center'">
2438 <!-- ==================================================================== -->
2440 <xsl:template name="page.number.format">
2441 <xsl:param name="element" select="local-name(.)"/>
2442 <xsl:param name="master-reference" select="''"/>
2445 <xsl:when test="$element = 'toc' and self::book">i</xsl:when>
2446 <xsl:when test="$element = 'preface'">i</xsl:when>
2447 <xsl:when test="$element = 'dedication'">i</xsl:when>
2448 <xsl:when test="$element = 'acknowledgements'">i</xsl:when>
2449 <xsl:otherwise>1</xsl:otherwise>
2453 <xsl:template name="initial.page.number">
2454 <xsl:param name="element" select="local-name(.)"/>
2455 <xsl:param name="master-reference" select="''"/>
2457 <!-- Select the first content that the stylesheet places
2459 <xsl:variable name="first.book.content"
2460 select="ancestor::book/*[
2463 self::titleabbrev or
2467 self::acknowledgements or
2472 <!-- double-sided output -->
2473 <xsl:when test="$double.sided != 0">
2475 <xsl:when test="$element = 'toc'">auto-odd</xsl:when>
2476 <xsl:when test="$element = 'book'">1</xsl:when>
2477 <!-- preface typically continues TOC roman numerals -->
2478 <!-- Change page.number.format if not -->
2479 <xsl:when test="$element = 'preface'">auto-odd</xsl:when>
2480 <xsl:when test="($element = 'dedication' or $element = 'article')
2481 and not(preceding::chapter
2482 or preceding::preface
2483 or preceding::appendix
2484 or preceding::article
2485 or preceding::dedication
2487 or parent::reference)">1</xsl:when>
2488 <xsl:when test="generate-id($first.book.content) =
2489 generate-id(.)">1</xsl:when>
2490 <xsl:otherwise>auto-odd</xsl:otherwise>
2494 <!-- single-sided output -->
2497 <xsl:when test="$element = 'toc'">auto</xsl:when>
2498 <xsl:when test="$element = 'book'">1</xsl:when>
2499 <xsl:when test="$element = 'preface'">auto</xsl:when>
2500 <xsl:when test="($element = 'dedication' or $element = 'article') and
2501 not(preceding::chapter
2502 or preceding::preface
2503 or preceding::appendix
2504 or preceding::article
2505 or preceding::dedication
2507 or parent::reference)">1</xsl:when>
2508 <xsl:when test="generate-id($first.book.content) =
2509 generate-id(.)">1</xsl:when>
2510 <xsl:otherwise>auto</xsl:otherwise>
2516 <xsl:template name="force.page.count">
2517 <xsl:param name="element" select="local-name(.)"/>
2518 <xsl:param name="master-reference" select="''"/>
2521 <!-- double-sided output -->
2522 <xsl:when test="$double.sided != 0">end-on-even</xsl:when>
2523 <!-- single-sided output -->
2524 <xsl:otherwise>no-force</xsl:otherwise>
2528 <xsl:template name="set.flow.properties">
2529 <xsl:param name="element" select="local-name(.)"/>
2530 <xsl:param name="master-reference" select="''"/>
2532 <!-- This template is called after each <fo:flow> starts. -->
2533 <!-- Customize this template to set attributes on fo:flow -->
2535 <!-- remove -draft from reference -->
2536 <xsl:variable name="pageclass">
2538 <xsl:when test="contains($master-reference, '-draft')">
2539 <xsl:value-of select="substring-before($master-reference, '-draft')"/>
2542 <xsl:value-of select="$master-reference"/>
2548 <xsl:when test="$fop.extensions != 0 or $passivetex.extensions != 0">
2549 <!-- body.start.indent does not work well with these processors -->
2551 <xsl:when test="starts-with($pageclass, 'body') or
2552 starts-with($pageclass, 'lot') or
2553 starts-with($pageclass, 'front') or
2554 $element = 'preface' or
2555 (starts-with($pageclass, 'back') and
2556 $element = 'appendix')">
2557 <xsl:attribute name="start-indent">
2558 <xsl:value-of select="$body.start.indent"/>
2560 <xsl:attribute name="end-indent">
2561 <xsl:value-of select="$body.end.indent"/>
2567 <!-- ==================================================================== -->