2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 <xsl:template name="setup.pagemasters">
9 <fo:simple-page-master master-name="blank"
10 page-width="{$page.width}"
11 page-height="{$page.height}"
12 margin-top="{$page.margin.top}"
13 margin-bottom="{$page.margin.bottom}"
14 margin-left="{$margin.left.outer}"
15 margin-right="{$page.margin.inner}">
16 <fo:region-body margin-bottom="{$body.margin.bottom}"
17 margin-top="{$body.margin.top}"
19 margin-right="{$region.side.extent}">
21 <fo:region-before region-name="xsl-region-before-blank"
22 extent="{$region.before.extent}"
24 display-align="before"/>
25 <fo:region-after region-name="xsl-region-after-blank"
26 extent="{$region.after.extent}"
28 display-align="after"/>
29 <fo:region-start region-name="xsl-region-start-even"
31 <fo:region-end region-name="xsl-region-end-even"
32 extent="{$region.side.extent}"/>
33 </fo:simple-page-master>
36 <fo:simple-page-master master-name="titlepage-first"
37 page-width="{$page.width}"
38 page-height="{$page.height}"
39 margin-top="{$page.margin.top}"
40 margin-bottom="{$page.margin.bottom}"
41 margin-left="{$margin.left.inner}"
42 margin-right="{$margin.left.outer}">
43 <fo:region-body margin-bottom="{$body.margin.bottom}"
44 margin-top="{$body.margin.top}"
45 margin-left="{$region.side.extent}"
47 column-gap="{$column.gap.titlepage}"
48 column-count="{$column.count.titlepage}">
50 <fo:region-before region-name="xsl-region-before-first"
51 extent="{$region.before.extent}"
53 display-align="before"/>
54 <fo:region-after region-name="xsl-region-after-first"
55 extent="{$region.after.extent}"
57 display-align="after"/>
58 <fo:region-start region-name="xsl-region-start-first"
59 extent="{$region.side.extent}"/>
60 <fo:region-end region-name="xsl-region-end-first"
62 </fo:simple-page-master>
64 <fo:simple-page-master master-name="titlepage-odd"
65 page-width="{$page.width}"
66 page-height="{$page.height}"
67 margin-top="{$page.margin.top}"
68 margin-bottom="{$page.margin.bottom}"
69 margin-left="{$margin.left.inner}"
70 margin-right="{$margin.left.outer}">
71 <fo:region-body margin-bottom="{$body.margin.bottom}"
72 margin-top="{$body.margin.top}"
73 margin-left="{$region.side.extent}"
75 column-gap="{$column.gap.titlepage}"
76 column-count="{$column.count.titlepage}">
78 <fo:region-before region-name="xsl-region-before-odd"
79 extent="{$region.before.extent}"
81 display-align="before"/>
82 <fo:region-after region-name="xsl-region-after-odd"
83 extent="{$region.after.extent}"
85 display-align="after"/>
86 <fo:region-start region-name="xsl-region-start-odd"
87 extent="{$region.side.extent}"/>
88 <fo:region-end region-name="xsl-region-end-odd"
90 </fo:simple-page-master>
92 <fo:simple-page-master master-name="titlepage-even"
93 page-width="{$page.width}"
94 page-height="{$page.height}"
95 margin-top="{$page.margin.top}"
96 margin-bottom="{$page.margin.bottom}"
97 margin-left="{$margin.left.outer}"
98 margin-right="{$page.margin.inner}">
99 <fo:region-body margin-bottom="{$body.margin.bottom}"
100 margin-top="{$body.margin.top}"
102 margin-right="{$region.side.extent}"
103 column-gap="{$column.gap.titlepage}"
104 column-count="{$column.count.titlepage}">
106 <fo:region-before region-name="xsl-region-before-even"
107 extent="{$region.before.extent}"
109 display-align="before"/>
110 <fo:region-after region-name="xsl-region-after-even"
111 extent="{$region.after.extent}"
113 display-align="after"/>
114 <fo:region-start region-name="xsl-region-start-even"
116 <fo:region-end region-name="xsl-region-end-even"
117 extent="{$region.side.extent}"/>
118 </fo:simple-page-master>
120 <!-- list-of-title pages -->
121 <fo:simple-page-master master-name="lot-first"
122 page-width="{$page.width}"
123 page-height="{$page.height}"
124 margin-top="{$page.margin.top}"
125 margin-bottom="{$page.margin.bottom}"
126 margin-left="{$margin.left.inner}"
127 margin-right="{$margin.left.outer}">
128 <fo:region-body margin-bottom="{$body.margin.bottom}"
129 margin-top="{$body.margin.top}"
130 margin-left="{$region.side.extent}"
132 column-gap="{$column.gap.lot}"
133 column-count="{$column.count.lot}">
135 <fo:region-before region-name="xsl-region-before-first"
136 extent="{$region.before.extent}"
138 display-align="before"/>
139 <fo:region-after region-name="xsl-region-after-first"
140 extent="{$region.after.extent}"
142 display-align="after"/>
143 <fo:region-start region-name="xsl-region-start-first"
144 extent="{$region.side.extent}"/>
145 <fo:region-end region-name="xsl-region-end-first"
147 </fo:simple-page-master>
149 <fo:simple-page-master master-name="lot-odd"
150 page-width="{$page.width}"
151 page-height="{$page.height}"
152 margin-top="{$page.margin.top}"
153 margin-bottom="{$page.margin.bottom}"
154 margin-left="{$margin.left.inner}"
155 margin-right="{$margin.left.outer}">
156 <fo:region-body margin-bottom="{$body.margin.bottom}"
157 margin-top="{$body.margin.top}"
158 margin-left="{$region.side.extent}"
160 column-gap="{$column.gap.lot}"
161 column-count="{$column.count.lot}">
163 <fo:region-before region-name="xsl-region-before-odd"
164 extent="{$region.before.extent}"
166 display-align="before"/>
167 <fo:region-after region-name="xsl-region-after-odd"
168 extent="{$region.after.extent}"
170 display-align="after"/>
171 <fo:region-start region-name="xsl-region-start-odd"
172 extent="{$region.side.extent}"/>
173 <fo:region-end region-name="xsl-region-end-first"
175 </fo:simple-page-master>
177 <fo:simple-page-master master-name="lot-even"
178 page-width="{$page.width}"
179 page-height="{$page.height}"
180 margin-top="{$page.margin.top}"
181 margin-bottom="{$page.margin.bottom}"
182 margin-left="{$margin.left.outer}"
183 margin-right="{$page.margin.inner}">
184 <fo:region-body margin-bottom="{$body.margin.bottom}"
185 margin-top="{$body.margin.top}"
187 margin-right="{$region.side.extent}"
188 column-gap="{$column.gap.lot}"
189 column-count="{$column.count.lot}">
191 <fo:region-before region-name="xsl-region-before-even"
192 extent="{$region.before.extent}"
194 display-align="before"/>
195 <fo:region-after region-name="xsl-region-after-even"
196 extent="{$region.after.extent}"
198 display-align="after"/>
199 <fo:region-start region-name="xsl-region-start-even"
201 <fo:region-end region-name="xsl-region-end-even"
202 extent="{$region.side.extent}"/>
203 </fo:simple-page-master>
205 <!-- frontmatter pages -->
206 <fo:simple-page-master master-name="front-first"
207 page-width="{$page.width}"
208 page-height="{$page.height}"
209 margin-top="{$page.margin.top}"
210 margin-bottom="{$page.margin.bottom}"
211 margin-left="{$margin.left.inner}"
212 margin-right="{$margin.left.outer}">
213 <fo:region-body margin-bottom="{$body.margin.bottom}"
214 margin-top="{$body.margin.top}"
215 margin-left="{$region.side.extent}"
217 column-gap="{$column.gap.front}"
218 column-count="{$column.count.front}">
220 <fo:region-before region-name="xsl-region-before-first"
221 extent="{$region.before.extent}"
223 display-align="before"/>
224 <fo:region-after region-name="xsl-region-after-first"
225 extent="{$region.after.extent}"
227 display-align="after"/>
228 <fo:region-start region-name="xsl-region-start-first"
229 extent="{$region.side.extent}"/>
230 <fo:region-end region-name="xsl-region-end-first"
232 </fo:simple-page-master>
234 <fo:simple-page-master master-name="front-odd"
235 page-width="{$page.width}"
236 page-height="{$page.height}"
237 margin-top="{$page.margin.top}"
238 margin-bottom="{$page.margin.bottom}"
239 margin-left="{$margin.left.inner}"
240 margin-right="{$margin.left.outer}">
241 <fo:region-body margin-bottom="{$body.margin.bottom}"
242 margin-top="{$body.margin.top}"
243 margin-left="{$region.side.extent}"
245 column-gap="{$column.gap.front}"
246 column-count="{$column.count.front}">
248 <fo:region-before region-name="xsl-region-before-odd"
249 extent="{$region.before.extent}"
251 display-align="before"/>
252 <fo:region-after region-name="xsl-region-after-odd"
253 extent="{$region.after.extent}"
255 display-align="after"/>
256 <fo:region-start region-name="xsl-region-start-odd"
257 extent="{$region.side.extent}"/>
258 <fo:region-end region-name="xsl-region-end-odd"
260 </fo:simple-page-master>
262 <fo:simple-page-master master-name="front-even"
263 page-width="{$page.width}"
264 page-height="{$page.height}"
265 margin-top="{$page.margin.top}"
266 margin-bottom="{$page.margin.bottom}"
267 margin-left="{$margin.left.outer}"
268 margin-right="{$page.margin.inner}">
269 <fo:region-body margin-bottom="{$body.margin.bottom}"
270 margin-top="{$body.margin.top}"
272 margin-right="{$region.side.extent}"
273 column-gap="{$column.gap.front}"
274 column-count="{$column.count.front}">
276 <fo:region-before region-name="xsl-region-before-even"
277 extent="{$region.before.extent}"
279 display-align="before"/>
280 <fo:region-after region-name="xsl-region-after-even"
281 extent="{$region.after.extent}"
283 display-align="after"/>
284 <fo:region-start region-name="xsl-region-start-even"
286 <fo:region-end region-name="xsl-region-end-even"
287 extent="{$region.side.extent}"/>
288 </fo:simple-page-master>
291 <fo:simple-page-master master-name="body-first"
292 page-width="{$page.width}"
293 page-height="{$page.height}"
294 margin-top="{$page.margin.top}"
295 margin-bottom="{$page.margin.bottom}"
296 margin-left="{$margin.left.inner}"
297 margin-right="{$margin.left.outer}">
298 <fo:region-body margin-bottom="{$body.margin.bottom}"
299 margin-top="{$body.margin.top}"
300 margin-left="{$region.side.extent}"
302 column-gap="{$column.gap.body}"
303 column-count="{$column.count.body}">
305 <fo:region-before region-name="xsl-region-before-first"
306 extent="{$region.before.extent}"
308 display-align="before"/>
309 <fo:region-after region-name="xsl-region-after-first"
310 extent="{$region.after.extent}"
312 display-align="after"/>
313 <fo:region-start region-name="xsl-region-start-first"
314 extent="{$region.side.extent}"/>
315 <fo:region-end region-name="xsl-region-end-first"
317 </fo:simple-page-master>
319 <fo:simple-page-master master-name="body-odd"
320 page-width="{$page.width}"
321 page-height="{$page.height}"
322 margin-top="{$page.margin.top}"
323 margin-bottom="{$page.margin.bottom}"
324 margin-left="{$margin.left.inner}"
325 margin-right="{$margin.left.outer}">
326 <fo:region-body margin-bottom="{$body.margin.bottom}"
327 margin-top="{$body.margin.top}"
328 margin-left="{$region.side.extent}"
330 column-gap="{$column.gap.body}"
331 column-count="{$column.count.body}">
333 <fo:region-before region-name="xsl-region-before-odd"
334 extent="{$region.before.extent}"
336 display-align="before"/>
337 <fo:region-after region-name="xsl-region-after-odd"
338 extent="{$region.after.extent}"
340 display-align="after"/>
341 <fo:region-start region-name="xsl-region-start-first"
342 extent="{$region.side.extent}"/>
343 <fo:region-end region-name="xsl-region-end-first"
345 </fo:simple-page-master>
347 <fo:simple-page-master master-name="body-even"
348 page-width="{$page.width}"
349 page-height="{$page.height}"
350 margin-top="{$page.margin.top}"
351 margin-bottom="{$page.margin.bottom}"
352 margin-left="{$margin.left.outer}"
353 margin-right="{$page.margin.inner}">
354 <fo:region-body margin-bottom="{$body.margin.bottom}"
355 margin-top="{$body.margin.top}"
357 margin-right="{$region.side.extent}"
358 column-gap="{$column.gap.body}"
359 column-count="{$column.count.body}">
361 <fo:region-before region-name="xsl-region-before-even"
362 extent="{$region.before.extent}"
364 display-align="before"/>
365 <fo:region-after region-name="xsl-region-after-even"
366 extent="{$region.after.extent}"
368 display-align="after"/>
369 <fo:region-start region-name="xsl-region-start-even"
371 <fo:region-end region-name="xsl-region-end-even"
372 extent="{$region.side.extent}"/>
373 </fo:simple-page-master>
375 <!-- backmatter pages -->
376 <fo:simple-page-master master-name="back-first"
377 page-width="{$page.width}"
378 page-height="{$page.height}"
379 margin-top="{$page.margin.top}"
380 margin-bottom="{$page.margin.bottom}"
381 margin-left="{$margin.left.inner}"
382 margin-right="{$page.margin.outer}">
383 <fo:region-body margin-bottom="{$body.margin.bottom}"
384 margin-top="{$body.margin.top}"
385 column-gap="{$column.gap.back}"
386 column-count="{$column.count.back}">
388 <fo:region-before region-name="xsl-region-before-first"
389 extent="{$region.before.extent}"
390 display-align="before"/>
391 <fo:region-after region-name="xsl-region-after-first"
392 extent="{$region.after.extent}"
393 display-align="after"/>
394 </fo:simple-page-master>
396 <fo:simple-page-master master-name="back-odd"
397 page-width="{$page.width}"
398 page-height="{$page.height}"
399 margin-top="{$page.margin.top}"
400 margin-bottom="{$page.margin.bottom}"
401 margin-left="{$margin.left.inner}"
402 margin-right="{$page.margin.outer}">
403 <fo:region-body margin-bottom="{$body.margin.bottom}"
404 margin-top="{$body.margin.top}"
405 column-gap="{$column.gap.back}"
406 column-count="{$column.count.back}">
408 <fo:region-before region-name="xsl-region-before-odd"
409 extent="{$region.before.extent}"
410 display-align="before"/>
411 <fo:region-after region-name="xsl-region-after-odd"
412 extent="{$region.after.extent}"
413 display-align="after"/>
414 </fo:simple-page-master>
416 <fo:simple-page-master master-name="back-even"
417 page-width="{$page.width}"
418 page-height="{$page.height}"
419 margin-top="{$page.margin.top}"
420 margin-bottom="{$page.margin.bottom}"
421 margin-left="{$margin.left.outer}"
422 margin-right="{$page.margin.inner}">
423 <fo:region-body margin-bottom="{$body.margin.bottom}"
424 margin-top="{$body.margin.top}"
425 column-gap="{$column.gap.back}"
426 column-count="{$column.count.back}">
428 <fo:region-before region-name="xsl-region-before-even"
429 extent="{$region.before.extent}"
430 display-align="before"/>
431 <fo:region-after region-name="xsl-region-after-even"
432 extent="{$region.after.extent}"
433 display-align="after"/>
434 </fo:simple-page-master>
437 <fo:simple-page-master master-name="index-first"
438 page-width="{$page.width}"
439 page-height="{$page.height}"
440 margin-top="{$page.margin.top}"
441 margin-bottom="{$page.margin.bottom}"
442 margin-left="{$margin.left.inner}"
443 margin-right="{$margin.left.outer}">
444 <fo:region-body margin-bottom="{$body.margin.bottom}"
445 margin-top="{$body.margin.top}"
446 margin-left="{$region.side.extent}"
448 column-gap="{$column.gap.index}"
449 column-count="{$column.count.index}">
451 <fo:region-before region-name="xsl-region-before-first"
452 extent="{$region.before.extent}"
454 display-align="before"/>
455 <fo:region-after region-name="xsl-region-after-first"
456 extent="{$region.after.extent}"
458 display-align="after"/>
459 <fo:region-start region-name="xsl-region-start-first"
460 extent="{$region.side.extent}"/>
461 <fo:region-end region-name="xsl-region-end-first"
463 </fo:simple-page-master>
465 <fo:simple-page-master master-name="index-odd"
466 page-width="{$page.width}"
467 page-height="{$page.height}"
468 margin-top="{$page.margin.top}"
469 margin-bottom="{$page.margin.bottom}"
470 margin-left="{$margin.left.inner}"
471 margin-right="{$margin.left.outer}">
472 <fo:region-body margin-bottom="{$body.margin.bottom}"
473 margin-top="{$body.margin.top}"
474 margin-left="{$region.side.extent}"
476 column-gap="{$column.gap.index}"
477 column-count="{$column.count.index}">
479 <fo:region-before region-name="xsl-region-before-odd"
480 extent="{$region.before.extent}"
482 display-align="before"/>
483 <fo:region-after region-name="xsl-region-after-odd"
484 extent="{$region.after.extent}"
486 display-align="after"/>
487 <fo:region-start region-name="xsl-region-start-odd"
488 extent="{$region.side.extent}"/>
489 <fo:region-end region-name="xsl-region-end-odd"
491 </fo:simple-page-master>
493 <fo:simple-page-master master-name="index-even"
494 page-width="{$page.width}"
495 page-height="{$page.height}"
496 margin-top="{$page.margin.top}"
497 margin-bottom="{$page.margin.bottom}"
498 margin-left="{$margin.left.outer}"
499 margin-right="{$page.margin.inner}">
500 <fo:region-body margin-bottom="{$body.margin.bottom}"
501 margin-top="{$body.margin.top}"
503 margin-right="{$region.side.extent}"
504 column-gap="{$column.gap.index}"
505 column-count="{$column.count.index}">
507 <fo:region-before region-name="xsl-region-before-even"
508 extent="{$region.before.extent}"
510 display-align="before"/>
511 <fo:region-after region-name="xsl-region-after-even"
512 extent="{$region.after.extent}"
514 display-align="after"/>
515 <fo:region-start region-name="xsl-region-start-even"
517 <fo:region-end region-name="xsl-region-end-even"
518 extent="{$region.side.extent}"/>
519 </fo:simple-page-master>
521 <xsl:if test="$draft.mode != 'no'">
522 <!-- draft blank pages -->
523 <fo:simple-page-master master-name="blank-draft"
524 page-width="{$page.width}"
525 page-height="{$page.height}"
526 margin-top="{$page.margin.top}"
527 margin-bottom="{$page.margin.bottom}"
528 margin-left="{$margin.left.outer}"
529 margin-right="{$page.margin.inner}">
530 <fo:region-body margin-bottom="{$body.margin.bottom}"
531 margin-top="{$body.margin.top}">
532 <xsl:if test="$draft.watermark.image != ''">
533 <xsl:attribute name="background-image">
534 <xsl:call-template name="fo-external-image">
535 <xsl:with-param name="filename" select="$draft.watermark.image"/>
538 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
539 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
540 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
541 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
544 <fo:region-before region-name="xsl-region-before-blank"
545 extent="{$region.before.extent}"
546 display-align="before"/>
547 <fo:region-after region-name="xsl-region-after-blank"
548 extent="{$region.after.extent}"
549 display-align="after"/>
550 </fo:simple-page-master>
552 <!-- draft title pages -->
553 <fo:simple-page-master master-name="titlepage-first-draft"
554 page-width="{$page.width}"
555 page-height="{$page.height}"
556 margin-top="{$page.margin.top}"
557 margin-bottom="{$page.margin.bottom}"
558 margin-left="{$margin.left.inner}"
559 margin-right="{$page.margin.outer}">
560 <fo:region-body margin-bottom="{$body.margin.bottom}"
561 margin-top="{$body.margin.top}"
562 column-gap="{$column.gap.titlepage}"
563 column-count="{$column.count.titlepage}">
564 <xsl:if test="$draft.watermark.image != ''">
565 <xsl:attribute name="background-image">
566 <xsl:call-template name="fo-external-image">
567 <xsl:with-param name="filename" select="$draft.watermark.image"/>
570 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
571 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
572 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
573 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
576 <fo:region-before region-name="xsl-region-before-first"
577 extent="{$region.before.extent}"
578 display-align="before"/>
579 <fo:region-after region-name="xsl-region-after-first"
580 extent="{$region.after.extent}"
581 display-align="after"/>
582 </fo:simple-page-master>
584 <fo:simple-page-master master-name="titlepage-odd-draft"
585 page-width="{$page.width}"
586 page-height="{$page.height}"
587 margin-top="{$page.margin.top}"
588 margin-bottom="{$page.margin.bottom}"
589 margin-left="{$margin.left.inner}"
590 margin-right="{$page.margin.outer}">
591 <fo:region-body margin-bottom="{$body.margin.bottom}"
592 margin-top="{$body.margin.top}"
593 column-gap="{$column.gap.titlepage}"
594 column-count="{$column.count.titlepage}">
595 <xsl:if test="$draft.watermark.image != ''">
596 <xsl:attribute name="background-image">
597 <xsl:call-template name="fo-external-image">
598 <xsl:with-param name="filename" select="$draft.watermark.image"/>
601 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
602 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
603 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
604 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
607 <fo:region-before region-name="xsl-region-before-odd"
608 extent="{$region.before.extent}"
609 display-align="before"/>
610 <fo:region-after region-name="xsl-region-after-odd"
611 extent="{$region.after.extent}"
612 display-align="after"/>
613 </fo:simple-page-master>
615 <fo:simple-page-master master-name="titlepage-even-draft"
616 page-width="{$page.width}"
617 page-height="{$page.height}"
618 margin-top="{$page.margin.top}"
619 margin-bottom="{$page.margin.bottom}"
620 margin-left="{$margin.left.outer}"
621 margin-right="{$page.margin.inner}">
622 <fo:region-body margin-bottom="{$body.margin.bottom}"
623 margin-top="{$body.margin.top}"
624 column-gap="{$column.gap.titlepage}"
625 column-count="{$column.count.titlepage}">
626 <xsl:if test="$draft.watermark.image != ''">
627 <xsl:attribute name="background-image">
628 <xsl:call-template name="fo-external-image">
629 <xsl:with-param name="filename" select="$draft.watermark.image"/>
632 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
633 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
634 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
635 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
638 <fo:region-before region-name="xsl-region-before-even"
639 extent="{$region.before.extent}"
640 display-align="before"/>
641 <fo:region-after region-name="xsl-region-after-even"
642 extent="{$region.after.extent}"
643 display-align="after"/>
644 </fo:simple-page-master>
646 <!-- draft list-of-title pages -->
647 <fo:simple-page-master master-name="lot-first-draft"
648 page-width="{$page.width}"
649 page-height="{$page.height}"
650 margin-top="{$page.margin.top}"
651 margin-bottom="{$page.margin.bottom}"
652 margin-left="{$margin.left.inner}"
653 margin-right="{$page.margin.outer}">
654 <fo:region-body margin-bottom="{$body.margin.bottom}"
655 margin-top="{$body.margin.top}"
656 column-gap="{$column.gap.lot}"
657 column-count="{$column.count.lot}">
658 <xsl:if test="$draft.watermark.image != ''">
659 <xsl:attribute name="background-image">
660 <xsl:call-template name="fo-external-image">
661 <xsl:with-param name="filename" select="$draft.watermark.image"/>
664 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
665 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
666 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
667 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
670 <fo:region-before region-name="xsl-region-before-first"
671 extent="{$region.before.extent}"
672 display-align="before"/>
673 <fo:region-after region-name="xsl-region-after-first"
674 extent="{$region.after.extent}"
675 display-align="after"/>
676 </fo:simple-page-master>
678 <fo:simple-page-master master-name="lot-odd-draft"
679 page-width="{$page.width}"
680 page-height="{$page.height}"
681 margin-top="{$page.margin.top}"
682 margin-bottom="{$page.margin.bottom}"
683 margin-left="{$margin.left.inner}"
684 margin-right="{$page.margin.outer}">
685 <fo:region-body margin-bottom="{$body.margin.bottom}"
686 margin-top="{$body.margin.top}"
687 column-gap="{$column.gap.lot}"
688 column-count="{$column.count.lot}">
689 <xsl:if test="$draft.watermark.image != ''">
690 <xsl:attribute name="background-image">
691 <xsl:call-template name="fo-external-image">
692 <xsl:with-param name="filename" select="$draft.watermark.image"/>
695 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
696 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
697 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
698 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
701 <fo:region-before region-name="xsl-region-before-odd"
702 extent="{$region.before.extent}"
703 display-align="before"/>
704 <fo:region-after region-name="xsl-region-after-odd"
705 extent="{$region.after.extent}"
706 display-align="after"/>
707 </fo:simple-page-master>
709 <fo:simple-page-master master-name="lot-even-draft"
710 page-width="{$page.width}"
711 page-height="{$page.height}"
712 margin-top="{$page.margin.top}"
713 margin-bottom="{$page.margin.bottom}"
714 margin-left="{$margin.left.outer}"
715 margin-right="{$page.margin.inner}">
716 <fo:region-body margin-bottom="{$body.margin.bottom}"
717 margin-top="{$body.margin.top}"
718 column-gap="{$column.gap.lot}"
719 column-count="{$column.count.lot}">
720 <xsl:if test="$draft.watermark.image != ''">
721 <xsl:attribute name="background-image">
722 <xsl:call-template name="fo-external-image">
723 <xsl:with-param name="filename" select="$draft.watermark.image"/>
726 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
727 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
728 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
729 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
732 <fo:region-before region-name="xsl-region-before-even"
733 extent="{$region.before.extent}"
734 display-align="before"/>
735 <fo:region-after region-name="xsl-region-after-even"
736 extent="{$region.after.extent}"
737 display-align="after"/>
738 </fo:simple-page-master>
740 <!-- draft frontmatter pages -->
741 <fo:simple-page-master master-name="front-first-draft"
742 page-width="{$page.width}"
743 page-height="{$page.height}"
744 margin-top="{$page.margin.top}"
745 margin-bottom="{$page.margin.bottom}"
746 margin-left="{$margin.left.inner}"
747 margin-right="{$page.margin.outer}">
748 <fo:region-body margin-bottom="{$body.margin.bottom}"
749 margin-top="{$body.margin.top}"
750 column-gap="{$column.gap.front}"
751 column-count="{$column.count.front}">
752 <xsl:if test="$draft.watermark.image != ''">
753 <xsl:attribute name="background-image">
754 <xsl:call-template name="fo-external-image">
755 <xsl:with-param name="filename" select="$draft.watermark.image"/>
758 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
759 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
760 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
761 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
764 <fo:region-before region-name="xsl-region-before-first"
765 extent="{$region.before.extent}"
766 display-align="before"/>
767 <fo:region-after region-name="xsl-region-after-first"
768 extent="{$region.after.extent}"
769 display-align="after"/>
770 </fo:simple-page-master>
772 <fo:simple-page-master master-name="front-odd-draft"
773 page-width="{$page.width}"
774 page-height="{$page.height}"
775 margin-top="{$page.margin.top}"
776 margin-bottom="{$page.margin.bottom}"
777 margin-left="{$margin.left.inner}"
778 margin-right="{$page.margin.outer}">
779 <fo:region-body margin-bottom="{$body.margin.bottom}"
780 margin-top="{$body.margin.top}"
781 column-gap="{$column.gap.front}"
782 column-count="{$column.count.front}">
783 <xsl:if test="$draft.watermark.image != ''">
784 <xsl:attribute name="background-image">
785 <xsl:call-template name="fo-external-image">
786 <xsl:with-param name="filename" select="$draft.watermark.image"/>
789 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
790 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
791 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
792 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
795 <fo:region-before region-name="xsl-region-before-odd"
796 extent="{$region.before.extent}"
797 display-align="before"/>
798 <fo:region-after region-name="xsl-region-after-odd"
799 extent="{$region.after.extent}"
800 display-align="after"/>
801 </fo:simple-page-master>
803 <fo:simple-page-master master-name="front-even-draft"
804 page-width="{$page.width}"
805 page-height="{$page.height}"
806 margin-top="{$page.margin.top}"
807 margin-bottom="{$page.margin.bottom}"
808 margin-left="{$margin.left.outer}"
809 margin-right="{$page.margin.inner}">
810 <fo:region-body margin-bottom="{$body.margin.bottom}"
811 margin-top="{$body.margin.top}"
812 column-gap="{$column.gap.front}"
813 column-count="{$column.count.front}">
814 <xsl:if test="$draft.watermark.image != ''">
815 <xsl:attribute name="background-image">
816 <xsl:call-template name="fo-external-image">
817 <xsl:with-param name="filename" select="$draft.watermark.image"/>
820 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
821 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
822 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
823 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
826 <fo:region-before region-name="xsl-region-before-even"
827 extent="{$region.before.extent}"
828 display-align="before"/>
829 <fo:region-after region-name="xsl-region-after-even"
830 extent="{$region.after.extent}"
831 display-align="after"/>
832 </fo:simple-page-master>
834 <!-- draft body pages -->
835 <fo:simple-page-master master-name="body-first-draft"
836 page-width="{$page.width}"
837 page-height="{$page.height}"
838 margin-top="{$page.margin.top}"
839 margin-bottom="{$page.margin.bottom}"
840 margin-left="{$margin.left.inner}"
841 margin-right="{$page.margin.outer}">
842 <fo:region-body margin-bottom="{$body.margin.bottom}"
843 margin-top="{$body.margin.top}"
844 column-gap="{$column.gap.body}"
845 column-count="{$column.count.body}">
846 <xsl:if test="$draft.watermark.image != ''">
847 <xsl:attribute name="background-image">
848 <xsl:call-template name="fo-external-image">
849 <xsl:with-param name="filename" select="$draft.watermark.image"/>
852 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
853 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
854 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
855 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
858 <fo:region-before region-name="xsl-region-before-first"
859 extent="{$region.before.extent}"
860 display-align="before"/>
861 <fo:region-after region-name="xsl-region-after-first"
862 extent="{$region.after.extent}"
863 display-align="after"/>
864 </fo:simple-page-master>
866 <fo:simple-page-master master-name="body-odd-draft"
867 page-width="{$page.width}"
868 page-height="{$page.height}"
869 margin-top="{$page.margin.top}"
870 margin-bottom="{$page.margin.bottom}"
871 margin-left="{$margin.left.inner}"
872 margin-right="{$page.margin.outer}">
873 <fo:region-body margin-bottom="{$body.margin.bottom}"
874 margin-top="{$body.margin.top}"
875 column-gap="{$column.gap.body}"
876 column-count="{$column.count.body}">
877 <xsl:if test="$draft.watermark.image != ''">
878 <xsl:attribute name="background-image">
879 <xsl:call-template name="fo-external-image">
880 <xsl:with-param name="filename" select="$draft.watermark.image"/>
883 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
884 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
885 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
886 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
889 <fo:region-before region-name="xsl-region-before-odd"
890 extent="{$region.before.extent}"
891 display-align="before"/>
892 <fo:region-after region-name="xsl-region-after-odd"
893 extent="{$region.after.extent}"
894 display-align="after"/>
895 </fo:simple-page-master>
897 <fo:simple-page-master master-name="body-even-draft"
898 page-width="{$page.width}"
899 page-height="{$page.height}"
900 margin-top="{$page.margin.top}"
901 margin-bottom="{$page.margin.bottom}"
902 margin-left="{$margin.left.outer}"
903 margin-right="{$page.margin.inner}">
904 <fo:region-body margin-bottom="{$body.margin.bottom}"
905 margin-top="{$body.margin.top}"
906 column-gap="{$column.gap.body}"
907 column-count="{$column.count.body}">
908 <xsl:if test="$draft.watermark.image != ''">
909 <xsl:attribute name="background-image">
910 <xsl:call-template name="fo-external-image">
911 <xsl:with-param name="filename" select="$draft.watermark.image"/>
914 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
915 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
916 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
917 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
920 <fo:region-before region-name="xsl-region-before-even"
921 extent="{$region.before.extent}"
922 display-align="before"/>
923 <fo:region-after region-name="xsl-region-after-even"
924 extent="{$region.after.extent}"
925 display-align="after"/>
926 </fo:simple-page-master>
928 <!-- draft backmatter pages -->
929 <fo:simple-page-master master-name="back-first-draft"
930 page-width="{$page.width}"
931 page-height="{$page.height}"
932 margin-top="{$page.margin.top}"
933 margin-bottom="{$page.margin.bottom}"
934 margin-left="{$margin.left.inner}"
935 margin-right="{$page.margin.outer}">
936 <fo:region-body margin-bottom="{$body.margin.bottom}"
937 margin-top="{$body.margin.top}"
938 column-gap="{$column.gap.back}"
939 column-count="{$column.count.back}">
940 <xsl:if test="$draft.watermark.image != ''">
941 <xsl:attribute name="background-image">
942 <xsl:call-template name="fo-external-image">
943 <xsl:with-param name="filename" select="$draft.watermark.image"/>
946 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
947 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
948 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
949 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
952 <fo:region-before region-name="xsl-region-before-first"
953 extent="{$region.before.extent}"
954 display-align="before"/>
955 <fo:region-after region-name="xsl-region-after-first"
956 extent="{$region.after.extent}"
957 display-align="after"/>
958 </fo:simple-page-master>
960 <fo:simple-page-master master-name="back-odd-draft"
961 page-width="{$page.width}"
962 page-height="{$page.height}"
963 margin-top="{$page.margin.top}"
964 margin-bottom="{$page.margin.bottom}"
965 margin-left="{$margin.left.inner}"
966 margin-right="{$page.margin.outer}">
967 <fo:region-body margin-bottom="{$body.margin.bottom}"
968 margin-top="{$body.margin.top}"
969 column-gap="{$column.gap.back}"
970 column-count="{$column.count.back}">
971 <xsl:if test="$draft.watermark.image != ''">
972 <xsl:attribute name="background-image">
973 <xsl:call-template name="fo-external-image">
974 <xsl:with-param name="filename" select="$draft.watermark.image"/>
977 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
978 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
979 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
980 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
983 <fo:region-before region-name="xsl-region-before-odd"
984 extent="{$region.before.extent}"
985 display-align="before"/>
986 <fo:region-after region-name="xsl-region-after-odd"
987 extent="{$region.after.extent}"
988 display-align="after"/>
989 </fo:simple-page-master>
991 <fo:simple-page-master master-name="back-even-draft"
992 page-width="{$page.width}"
993 page-height="{$page.height}"
994 margin-top="{$page.margin.top}"
995 margin-bottom="{$page.margin.bottom}"
996 margin-left="{$margin.left.outer}"
997 margin-right="{$page.margin.inner}">
998 <fo:region-body margin-bottom="{$body.margin.bottom}"
999 margin-top="{$body.margin.top}"
1000 column-gap="{$column.gap.back}"
1001 column-count="{$column.count.back}">
1002 <xsl:if test="$draft.watermark.image != ''">
1003 <xsl:attribute name="background-image">
1004 <xsl:call-template name="fo-external-image">
1005 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1006 </xsl:call-template>
1008 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1009 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1010 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1011 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1014 <fo:region-before region-name="xsl-region-before-even"
1015 extent="{$region.before.extent}"
1016 display-align="before"/>
1017 <fo:region-after region-name="xsl-region-after-even"
1018 extent="{$region.after.extent}"
1019 display-align="after"/>
1020 </fo:simple-page-master>
1022 <!-- draft index pages -->
1023 <fo:simple-page-master master-name="index-first-draft"
1024 page-width="{$page.width}"
1025 page-height="{$page.height}"
1026 margin-top="{$page.margin.top}"
1027 margin-bottom="{$page.margin.bottom}"
1028 margin-left="{$page.margin.inner}"
1029 margin-right="{$page.margin.outer}">
1030 <fo:region-body margin-bottom="{$body.margin.bottom}"
1031 margin-top="{$body.margin.top}"
1032 column-gap="{$column.gap.index}"
1033 column-count="{$column.count.index}">
1034 <xsl:if test="$draft.watermark.image != ''">
1035 <xsl:attribute name="background-image">
1036 <xsl:call-template name="fo-external-image">
1037 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1038 </xsl:call-template>
1040 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1041 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1042 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1043 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1046 <fo:region-before region-name="xsl-region-before-first"
1047 extent="{$region.before.extent}"
1048 display-align="before"/>
1049 <fo:region-after region-name="xsl-region-after-first"
1050 extent="{$region.after.extent}"
1051 display-align="after"/>
1052 </fo:simple-page-master>
1054 <fo:simple-page-master master-name="index-odd-draft"
1055 page-width="{$page.width}"
1056 page-height="{$page.height}"
1057 margin-top="{$page.margin.top}"
1058 margin-bottom="{$page.margin.bottom}"
1059 margin-left="{$page.margin.inner}"
1060 margin-right="{$page.margin.outer}">
1061 <fo:region-body margin-bottom="{$body.margin.bottom}"
1062 margin-top="{$body.margin.top}"
1063 column-gap="{$column.gap.index}"
1064 column-count="{$column.count.index}">
1065 <xsl:if test="$draft.watermark.image != ''">
1066 <xsl:attribute name="background-image">
1067 <xsl:call-template name="fo-external-image">
1068 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1069 </xsl:call-template>
1071 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1072 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1073 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1074 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1077 <fo:region-before region-name="xsl-region-before-odd"
1078 extent="{$region.before.extent}"
1079 display-align="before"/>
1080 <fo:region-after region-name="xsl-region-after-odd"
1081 extent="{$region.after.extent}"
1082 display-align="after"/>
1083 </fo:simple-page-master>
1085 <fo:simple-page-master master-name="index-even-draft"
1086 page-width="{$page.width}"
1087 page-height="{$page.height}"
1088 margin-top="{$page.margin.top}"
1089 margin-bottom="{$page.margin.bottom}"
1090 margin-right="{$page.margin.inner}"
1091 margin-left="{$page.margin.outer}">
1092 <fo:region-body margin-bottom="{$body.margin.bottom}"
1093 margin-top="{$body.margin.top}"
1094 column-gap="{$column.gap.index}"
1095 column-count="{$column.count.index}">
1096 <xsl:if test="$draft.watermark.image != ''">
1097 <xsl:attribute name="background-image">
1098 <xsl:call-template name="fo-external-image">
1099 <xsl:with-param name="filename" select="$draft.watermark.image"/>
1100 </xsl:call-template>
1102 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
1103 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
1104 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
1105 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
1108 <fo:region-before region-name="xsl-region-before-even"
1109 extent="{$region.before.extent}"
1110 display-align="before"/>
1111 <fo:region-after region-name="xsl-region-after-even"
1112 extent="{$region.after.extent}"
1113 display-align="after"/>
1114 </fo:simple-page-master>
1117 <!-- setup for title page(s) -->
1118 <fo:page-sequence-master master-name="titlepage">
1119 <fo:repeatable-page-master-alternatives>
1120 <fo:conditional-page-master-reference master-reference="blank"
1121 blank-or-not-blank="blank"/>
1122 <fo:conditional-page-master-reference master-reference="titlepage-first"
1123 page-position="first"/>
1124 <fo:conditional-page-master-reference master-reference="titlepage-odd"
1126 <fo:conditional-page-master-reference master-reference="titlepage-even"
1127 odd-or-even="even"/>
1128 </fo:repeatable-page-master-alternatives>
1129 </fo:page-sequence-master>
1131 <!-- setup for lots -->
1132 <fo:page-sequence-master master-name="lot">
1133 <fo:repeatable-page-master-alternatives>
1134 <fo:conditional-page-master-reference master-reference="blank"
1135 blank-or-not-blank="blank"/>
1136 <fo:conditional-page-master-reference master-reference="lot-first"
1137 page-position="first"/>
1138 <fo:conditional-page-master-reference master-reference="lot-odd"
1140 <fo:conditional-page-master-reference master-reference="lot-even"
1141 odd-or-even="even"/>
1142 </fo:repeatable-page-master-alternatives>
1143 </fo:page-sequence-master>
1145 <!-- setup front matter -->
1146 <fo:page-sequence-master master-name="front">
1147 <fo:repeatable-page-master-alternatives>
1148 <fo:conditional-page-master-reference master-reference="blank"
1149 blank-or-not-blank="blank"/>
1150 <fo:conditional-page-master-reference master-reference="front-first"
1151 page-position="first"/>
1152 <fo:conditional-page-master-reference master-reference="front-odd"
1154 <fo:conditional-page-master-reference master-reference="front-even"
1155 odd-or-even="even"/>
1156 </fo:repeatable-page-master-alternatives>
1157 </fo:page-sequence-master>
1159 <!-- setup for body pages -->
1160 <fo:page-sequence-master master-name="body">
1161 <fo:repeatable-page-master-alternatives>
1162 <fo:conditional-page-master-reference master-reference="blank"
1163 blank-or-not-blank="blank"/>
1164 <fo:conditional-page-master-reference master-reference="body-first"
1165 page-position="first"/>
1166 <fo:conditional-page-master-reference master-reference="body-odd"
1168 <fo:conditional-page-master-reference master-reference="body-even"
1169 odd-or-even="even"/>
1170 </fo:repeatable-page-master-alternatives>
1171 </fo:page-sequence-master>
1173 <!-- setup back matter -->
1174 <fo:page-sequence-master master-name="back">
1175 <fo:repeatable-page-master-alternatives>
1176 <fo:conditional-page-master-reference master-reference="blank"
1177 blank-or-not-blank="blank"/>
1178 <fo:conditional-page-master-reference master-reference="back-first"
1179 page-position="first"/>
1180 <fo:conditional-page-master-reference master-reference="back-odd"
1182 <fo:conditional-page-master-reference master-reference="back-even"
1183 odd-or-even="even"/>
1184 </fo:repeatable-page-master-alternatives>
1185 </fo:page-sequence-master>
1187 <!-- setup back matter -->
1188 <fo:page-sequence-master master-name="index">
1189 <fo:repeatable-page-master-alternatives>
1190 <fo:conditional-page-master-reference master-reference="blank"
1191 blank-or-not-blank="blank"/>
1192 <fo:conditional-page-master-reference master-reference="index-first"
1193 page-position="first"/>
1194 <fo:conditional-page-master-reference master-reference="index-odd"
1196 <fo:conditional-page-master-reference master-reference="index-even"
1197 odd-or-even="even"/>
1198 </fo:repeatable-page-master-alternatives>
1199 </fo:page-sequence-master>
1201 <xsl:if test="$draft.mode != 'no'">
1202 <!-- setup for draft title page(s) -->
1203 <fo:page-sequence-master master-name="titlepage-draft">
1204 <fo:repeatable-page-master-alternatives>
1205 <fo:conditional-page-master-reference master-reference="blank-draft"
1206 blank-or-not-blank="blank"/>
1207 <fo:conditional-page-master-reference master-reference="titlepage-first-draft"
1208 page-position="first"/>
1209 <fo:conditional-page-master-reference master-reference="titlepage-odd-draft"
1211 <fo:conditional-page-master-reference master-reference="titlepage-even-draft"
1212 odd-or-even="even"/>
1213 </fo:repeatable-page-master-alternatives>
1214 </fo:page-sequence-master>
1216 <!-- setup for draft lots -->
1217 <fo:page-sequence-master master-name="lot-draft">
1218 <fo:repeatable-page-master-alternatives>
1219 <fo:conditional-page-master-reference master-reference="blank-draft"
1220 blank-or-not-blank="blank"/>
1221 <fo:conditional-page-master-reference master-reference="lot-first-draft"
1222 page-position="first"/>
1223 <fo:conditional-page-master-reference master-reference="lot-odd-draft"
1225 <fo:conditional-page-master-reference master-reference="lot-even-draft"
1226 odd-or-even="even"/>
1227 </fo:repeatable-page-master-alternatives>
1228 </fo:page-sequence-master>
1230 <!-- setup draft front matter -->
1231 <fo:page-sequence-master master-name="front-draft">
1232 <fo:repeatable-page-master-alternatives>
1233 <fo:conditional-page-master-reference master-reference="blank-draft"
1234 blank-or-not-blank="blank"/>
1235 <fo:conditional-page-master-reference master-reference="front-first-draft"
1236 page-position="first"/>
1237 <fo:conditional-page-master-reference master-reference="front-odd-draft"
1239 <fo:conditional-page-master-reference master-reference="front-even-draft"
1240 odd-or-even="even"/>
1241 </fo:repeatable-page-master-alternatives>
1242 </fo:page-sequence-master>
1244 <!-- setup for draft body pages -->
1245 <fo:page-sequence-master master-name="body-draft">
1246 <fo:repeatable-page-master-alternatives>
1247 <fo:conditional-page-master-reference master-reference="blank-draft"
1248 blank-or-not-blank="blank"/>
1249 <fo:conditional-page-master-reference master-reference="body-first-draft"
1250 page-position="first"/>
1251 <fo:conditional-page-master-reference master-reference="body-odd-draft"
1253 <fo:conditional-page-master-reference master-reference="body-even-draft"
1254 odd-or-even="even"/>
1255 </fo:repeatable-page-master-alternatives>
1256 </fo:page-sequence-master>
1258 <!-- setup draft back matter -->
1259 <fo:page-sequence-master master-name="back-draft">
1260 <fo:repeatable-page-master-alternatives>
1261 <fo:conditional-page-master-reference master-reference="blank-draft"
1262 blank-or-not-blank="blank"/>
1263 <fo:conditional-page-master-reference master-reference="back-first-draft"
1264 page-position="first"/>
1265 <fo:conditional-page-master-reference master-reference="back-odd-draft"
1267 <fo:conditional-page-master-reference master-reference="back-even-draft"
1268 odd-or-even="even"/>
1269 </fo:repeatable-page-master-alternatives>
1270 </fo:page-sequence-master>
1272 <!-- setup draft index pages -->
1273 <fo:page-sequence-master master-name="index-draft">
1274 <fo:repeatable-page-master-alternatives>
1275 <fo:conditional-page-master-reference master-reference="blank-draft"
1276 blank-or-not-blank="blank"/>
1277 <fo:conditional-page-master-reference master-reference="index-first-draft"
1278 page-position="first"/>
1279 <fo:conditional-page-master-reference master-reference="index-odd-draft"
1281 <fo:conditional-page-master-reference master-reference="index-even-draft"
1282 odd-or-even="even"/>
1283 </fo:repeatable-page-master-alternatives>
1284 </fo:page-sequence-master>
1287 <xsl:call-template name="user.pagemasters"/>
1289 </fo:layout-master-set>
1292 <!-- ==================================================================== -->
1294 <xsl:template name="head.sep.rule">
1295 <xsl:param name="pageclass"/>
1296 <xsl:param name="sequence"/>
1297 <xsl:param name="gentext-key"/>
1299 <xsl:if test="$header.rule != 0">
1300 <xsl:attribute name="border-bottom-width">0.2pt</xsl:attribute>
1301 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
1302 <xsl:attribute name="border-bottom-color">black</xsl:attribute>
1306 <xsl:template name="foot.sep.rule">
1307 <xsl:param name="pageclass"/>
1308 <xsl:param name="sequence"/>
1309 <xsl:param name="gentext-key"/>
1311 <xsl:if test="$footer.rule != 0">
1312 <xsl:attribute name="border-top-width">0.2pt</xsl:attribute>
1313 <xsl:attribute name="border-top-style">solid</xsl:attribute>
1314 <xsl:attribute name="border-top-color">black</xsl:attribute>
1318 <!-- ==================================================================== -->
1320 <xsl:template match="*" mode="running.head.mode">
1321 <xsl:param name="master-reference" select="'unknown'"/>
1322 <xsl:param name="gentext-key" select="name(.)"/>
1324 <!-- remove -draft from reference -->
1325 <xsl:variable name="pageclass">
1327 <xsl:when test="contains($master-reference, '-draft')">
1328 <xsl:value-of select="substring-before($master-reference, '-draft')"/>
1331 <xsl:value-of select="$master-reference"/>
1336 <fo:static-content flow-name="xsl-region-start-first">
1337 <fo:block xsl:use-attribute-sets="header.content.properties">
1338 <fo:table table-layout="fixed">
1339 <fo:table-column column-number="1" column-width="{$region.side.extent} - {$region.side.margin}"/>
1342 <fo:table-cell text-align="left" display-align="after" background-color="{$sidebar.background.color}" width="{$region.side.extent} - {$region.side.margin}" height="{$page.height} - {$body.margin.bottom} - {$body.margin.top}">
1350 </fo:static-content>
1352 <fo:static-content flow-name="xsl-region-start-even">
1353 <fo:block xsl:use-attribute-sets="header.content.properties">
1355 </fo:static-content>
1357 <fo:static-content flow-name="xsl-region-end-even">
1358 <fo:block xsl:use-attribute-sets="header.content.properties">
1359 <fo:table table-layout="fixed">
1360 <fo:table-column column-number="1" column-width="{$region.side.margin}"/>
1361 <fo:table-column column-number="2" column-width="{$region.side.extent} - {$region.side.margin}"/>
1364 <fo:table-cell width="{$region.side.margin}" height="{$page.height} - {$body.margin.bottom} - {$body.margin.top}">
1368 <fo:table-cell background-color="{$sidebar.background.color}" width="{$region.side.extent} - {$region.side.margin}" height="{$page.height} - {$body.margin.bottom} - {$body.margin.top}">
1376 </fo:static-content>
1378 <fo:static-content flow-name="xsl-region-before-first">
1379 <fo:block xsl:use-attribute-sets="header.content.properties">
1380 <xsl:call-template name="header.table">
1381 <xsl:with-param name="pageclass" select="$pageclass"/>
1382 <xsl:with-param name="sequence" select="'first'"/>
1383 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1384 </xsl:call-template>
1386 </fo:static-content>
1388 <fo:static-content flow-name="xsl-region-before-odd">
1389 <fo:block xsl:use-attribute-sets="header.content.properties">
1390 <xsl:call-template name="header.table">
1391 <xsl:with-param name="pageclass" select="$pageclass"/>
1392 <xsl:with-param name="sequence" select="'odd'"/>
1393 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1394 </xsl:call-template>
1396 </fo:static-content>
1398 <fo:static-content flow-name="xsl-region-before-even">
1399 <fo:block xsl:use-attribute-sets="header.content.properties">
1400 <xsl:call-template name="header.table">
1401 <xsl:with-param name="pageclass" select="$pageclass"/>
1402 <xsl:with-param name="sequence" select="'even'"/>
1403 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1404 </xsl:call-template>
1406 </fo:static-content>
1408 <fo:static-content flow-name="xsl-region-before-blank">
1409 <fo:block xsl:use-attribute-sets="header.content.properties">
1410 <xsl:call-template name="header.table">
1411 <xsl:with-param name="pageclass" select="$pageclass"/>
1412 <xsl:with-param name="sequence" select="'blank'"/>
1413 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1414 </xsl:call-template>
1416 </fo:static-content>
1418 <xsl:if test="$fop.extensions = 0">
1419 <xsl:call-template name="footnote-separator"/>
1420 <xsl:call-template name="blank.page.content"/>
1424 <!-- ==================================================================== -->
1426 <xsl:template name="header.table">
1427 <xsl:param name="pageclass" select="''"/>
1428 <xsl:param name="sequence" select="''"/>
1429 <xsl:param name="gentext-key" select="''"/>
1431 <!-- default is a single table style for all headers -->
1432 <!-- Customize it for different page classes or sequence location -->
1435 <xsl:when test="$pageclass = 'index'">
1436 <xsl:attribute name="margin-left">0pt</xsl:attribute>
1440 <xsl:variable name="candidate">
1441 <fo:table table-layout="fixed" width="100%">
1443 <xsl:call-template name="head.sep.rule">
1444 <xsl:with-param name="pageclass" select="$pageclass"/>
1445 <xsl:with-param name="sequence" select="$sequence"/>
1446 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1447 </xsl:call-template>
1450 <xsl:when test="$sequence = 'first' or $sequence = 'odd' or $sequence = ''">
1451 <fo:table-column column-number="1" column-width="{$region.side.extent} - {$region.side.margin}"/>
1452 <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
1453 <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
1454 <fo:table-column column-number="4" column-width="proportional-column-width(1)"/>
1457 <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
1458 <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
1459 <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
1460 <fo:table-column column-number="4" column-width="{$region.side.extent} - {$region.side.margin}"/>
1465 <fo:table-row height="14pt">
1467 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">
1468 <fo:table-cell text-align="left" background-color="{$sidebar.background.color}">
1470 <fo:inline padding-bottom="2mm"><fo:external-graphic src="img/phpeclipse_header.jpg" width="23mm" height="7.45mm" text-align="center" padding-bottom="2mm"/></fo:inline>
1478 <fo:table-cell text-align="left" display-align="after" padding-start="2mm">
1479 <xsl:if test="$fop.extensions = 0">
1480 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1483 <xsl:call-template name="header.content">
1484 <xsl:with-param name="pageclass" select="$pageclass"/>
1485 <xsl:with-param name="sequence" select="$sequence"/>
1486 <xsl:with-param name="position" select="'left'"/>
1487 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1488 </xsl:call-template>
1492 <fo:table-cell text-align="center" display-align="after" padding="2mm">
1493 <xsl:if test="$fop.extensions = 0">
1494 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1497 <xsl:call-template name="header.content">
1498 <xsl:with-param name="pageclass" select="$pageclass"/>
1499 <xsl:with-param name="sequence" select="$sequence"/>
1500 <xsl:with-param name="position" select="'center'"/>
1501 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1502 </xsl:call-template>
1506 <fo:table-cell text-align="right" display-align="after" padding-end="2mm">
1507 <xsl:if test="$fop.extensions = 0">
1508 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1511 <xsl:call-template name="header.content">
1512 <xsl:with-param name="pageclass" select="$pageclass"/>
1513 <xsl:with-param name="sequence" select="$sequence"/>
1514 <xsl:with-param name="position" select="'right'"/>
1515 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1516 </xsl:call-template>
1521 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">
1524 <fo:table-cell text-align="left" background-color="{$sidebar.background.color}" >
1526 <fo:inline padding-bottom="2mm"><fo:external-graphic src="img/phpeclipse_header.jpg" width="23mm" height="7.45mm" text-align="center" padding-bottom="2mm"/></fo:inline>
1537 <!-- Really output a header? -->
1540 <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book' and $sequence='first'">
1541 - no, book titlepages have no headers at all -
1544 <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0">
1549 <xsl:copy-of select="$candidate"/>
1554 <!-- ==================================================================== -->
1556 <xsl:template name="footer.table">
1557 <xsl:param name="pageclass" select="''"/>
1558 <xsl:param name="sequence" select="''"/>
1559 <xsl:param name="gentext-key" select="''"/>
1562 <xsl:when test="$pageclass = 'index'">
1563 <xsl:attribute name="margin-left">0pt</xsl:attribute>
1567 <!-- default is a single table style for all footers -->
1568 <!-- Customize it for different page classes or sequence location -->
1570 <xsl:variable name="candidate">
1571 <fo:table table-layout="fixed" width="100%">
1572 <xsl:call-template name="foot.sep.rule">
1573 <xsl:with-param name="pageclass" select="$pageclass"/>
1574 <xsl:with-param name="sequence" select="$sequence"/>
1575 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1576 </xsl:call-template>
1579 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">
1580 <fo:table-column column-number="1" column-width="{$region.side.extent} - {$region.side.margin}"/>
1581 <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
1582 <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
1583 <fo:table-column column-number="4" column-width="proportional-column-width(1)"/>
1586 <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
1587 <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
1588 <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
1589 <fo:table-column column-number="4" column-width="{$region.side.extent} - {$region.side.margin}"/>
1594 <fo:table-row height="14pt">
1597 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">
1598 <fo:table-cell text-align="left" background-color="{$sidebar.background.color}" >
1607 <fo:table-cell text-align="left" display-align="before" padding="2mm">
1608 <xsl:if test="$fop.extensions = 0">
1609 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1612 <xsl:call-template name="footer.content">
1613 <xsl:with-param name="pageclass" select="$pageclass"/>
1614 <xsl:with-param name="sequence" select="$sequence"/>
1615 <xsl:with-param name="position" select="'left'"/>
1616 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1617 </xsl:call-template>
1621 <fo:table-cell text-align="center" display-align="before" padding="2mm">
1622 <xsl:if test="$fop.extensions = 0">
1623 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1626 <xsl:call-template name="footer.content">
1627 <xsl:with-param name="pageclass" select="$pageclass"/>
1628 <xsl:with-param name="sequence" select="$sequence"/>
1629 <xsl:with-param name="position" select="'center'"/>
1630 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1631 </xsl:call-template>
1635 <fo:table-cell text-align="right" display-align="before" padding="2mm">
1636 <xsl:if test="$fop.extensions = 0">
1637 <xsl:attribute name="relative-align">baseline</xsl:attribute>
1640 <xsl:call-template name="footer.content">
1641 <xsl:with-param name="pageclass" select="$pageclass"/>
1642 <xsl:with-param name="sequence" select="$sequence"/>
1643 <xsl:with-param name="position" select="'right'"/>
1644 <xsl:with-param name="gentext-key" select="$gentext-key"/>
1645 </xsl:call-template>
1650 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">
1653 <fo:table-cell text-align="left" background-color="{$sidebar.background.color}" >
1665 <!-- Really output a footer? -->
1668 <xsl:when test="$pageclass='titlepage' and $gentext-key='book' and $sequence='first'">
1669 - no, book titlepages have no footers at all -
1672 <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0">
1677 <xsl:copy-of select="$candidate"/>