Merge pull request #4668 from adamscott/template-pool-to-scons_pool
[scons.git] / doc / design / scons_title.xsl
blob2eb1293e97872e118a49ab5ad425825fff296fe8
1 <?xml version="1.0"?>
2 <!--
4 __COPYRIGHT__
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sublicense, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
14 The above copyright notice and this permission notice shall be included
15 in all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
18 KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
19 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 -->
26 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
27 xmlns:exsl="http://exslt.org/common"
28 xmlns:fo="http://www.w3.org/1999/XSL/Format"
29 version="1.0" exclude-result-prefixes="exsl">
31 <!-- This stylesheet was created by template/titlepage.xsl; do not edit it by hand. -->
33 <xsl:template name="article.titlepage.recto">
34 <xsl:choose>
35 <xsl:when test="articleinfo/title">
36 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
37 </xsl:when>
38 <xsl:when test="artheader/title">
39 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
40 </xsl:when>
41 <xsl:when test="info/title">
42 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
43 </xsl:when>
44 <xsl:when test="title">
45 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
46 </xsl:when>
47 </xsl:choose>
49 <xsl:choose>
50 <xsl:when test="articleinfo/subtitle">
51 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
52 </xsl:when>
53 <xsl:when test="artheader/subtitle">
54 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
55 </xsl:when>
56 <xsl:when test="info/subtitle">
57 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
58 </xsl:when>
59 <xsl:when test="subtitle">
60 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
61 </xsl:when>
62 </xsl:choose>
64 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/mediaobject"/>
65 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/mediaobject"/>
66 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/mediaobject"/>
67 </xsl:template>
69 <xsl:template name="article.titlepage.verso">
70 </xsl:template>
72 <xsl:template name="article.titlepage.separator">
73 </xsl:template>
75 <xsl:template name="article.titlepage.before.recto">
76 </xsl:template>
78 <xsl:template name="article.titlepage.before.verso">
79 </xsl:template>
81 <xsl:template name="article.titlepage">
82 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
83 <xsl:variable name="recto.content">
84 <xsl:call-template name="article.titlepage.before.recto"/>
85 <xsl:call-template name="article.titlepage.recto"/>
86 </xsl:variable>
87 <xsl:variable name="recto.elements.count">
88 <xsl:choose>
89 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
90 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
91 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
92 <xsl:otherwise>1</xsl:otherwise>
93 </xsl:choose>
94 </xsl:variable>
95 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
96 <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
97 </xsl:if>
98 <xsl:variable name="verso.content">
99 <xsl:call-template name="article.titlepage.before.verso"/>
100 <xsl:call-template name="article.titlepage.verso"/>
101 </xsl:variable>
102 <xsl:variable name="verso.elements.count">
103 <xsl:choose>
104 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
105 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
106 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
107 <xsl:otherwise>1</xsl:otherwise>
108 </xsl:choose>
109 </xsl:variable>
110 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
111 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
112 </xsl:if>
113 <xsl:call-template name="article.titlepage.separator"/>
114 </fo:block>
115 </xsl:template>
117 <xsl:template match="*" mode="article.titlepage.recto.mode">
118 <!-- if an element isn't found in this mode, -->
119 <!-- try the generic titlepage.mode -->
120 <xsl:apply-templates select="." mode="titlepage.mode"/>
121 </xsl:template>
123 <xsl:template match="*" mode="article.titlepage.verso.mode">
124 <!-- if an element isn't found in this mode, -->
125 <!-- try the generic titlepage.mode -->
126 <xsl:apply-templates select="." mode="titlepage.mode"/>
127 </xsl:template>
129 <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
130 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
131 <xsl:call-template name="component.title">
132 <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
133 </xsl:call-template>
134 </fo:block>
135 </xsl:template>
137 <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
138 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
139 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
140 </fo:block>
141 </xsl:template>
143 <xsl:template match="mediaobject" mode="article.titlepage.recto.auto.mode">
144 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
145 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
146 </fo:block>
147 </xsl:template>
149 <xsl:template name="set.titlepage.recto">
150 <xsl:choose>
151 <xsl:when test="setinfo/title">
152 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
153 </xsl:when>
154 <xsl:when test="info/title">
155 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
156 </xsl:when>
157 <xsl:when test="title">
158 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
159 </xsl:when>
160 </xsl:choose>
162 <xsl:choose>
163 <xsl:when test="setinfo/subtitle">
164 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
165 </xsl:when>
166 <xsl:when test="info/subtitle">
167 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
168 </xsl:when>
169 <xsl:when test="subtitle">
170 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
171 </xsl:when>
172 </xsl:choose>
174 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
175 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
176 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
177 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
178 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
179 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
180 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
181 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
182 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
183 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
184 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
185 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
186 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
187 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
188 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
189 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
190 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
191 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
192 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
193 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
194 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
195 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
196 </xsl:template>
198 <xsl:template name="set.titlepage.verso">
199 </xsl:template>
201 <xsl:template name="set.titlepage.separator">
202 </xsl:template>
204 <xsl:template name="set.titlepage.before.recto">
205 </xsl:template>
207 <xsl:template name="set.titlepage.before.verso">
208 </xsl:template>
210 <xsl:template name="set.titlepage">
211 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
212 <xsl:variable name="recto.content">
213 <xsl:call-template name="set.titlepage.before.recto"/>
214 <xsl:call-template name="set.titlepage.recto"/>
215 </xsl:variable>
216 <xsl:variable name="recto.elements.count">
217 <xsl:choose>
218 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
219 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
220 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
221 <xsl:otherwise>1</xsl:otherwise>
222 </xsl:choose>
223 </xsl:variable>
224 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
225 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
226 </xsl:if>
227 <xsl:variable name="verso.content">
228 <xsl:call-template name="set.titlepage.before.verso"/>
229 <xsl:call-template name="set.titlepage.verso"/>
230 </xsl:variable>
231 <xsl:variable name="verso.elements.count">
232 <xsl:choose>
233 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
234 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
235 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
236 <xsl:otherwise>1</xsl:otherwise>
237 </xsl:choose>
238 </xsl:variable>
239 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
240 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
241 </xsl:if>
242 <xsl:call-template name="set.titlepage.separator"/>
243 </fo:block>
244 </xsl:template>
246 <xsl:template match="*" mode="set.titlepage.recto.mode">
247 <!-- if an element isn't found in this mode, -->
248 <!-- try the generic titlepage.mode -->
249 <xsl:apply-templates select="." mode="titlepage.mode"/>
250 </xsl:template>
252 <xsl:template match="*" mode="set.titlepage.verso.mode">
253 <!-- if an element isn't found in this mode, -->
254 <!-- try the generic titlepage.mode -->
255 <xsl:apply-templates select="." mode="titlepage.mode"/>
256 </xsl:template>
258 <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
259 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
260 <xsl:call-template name="division.title">
261 <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
262 </xsl:call-template>
263 </fo:block>
264 </xsl:template>
266 <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
267 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
268 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
269 </fo:block>
270 </xsl:template>
272 <xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
273 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
274 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
275 </fo:block>
276 </xsl:template>
278 <xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
279 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
280 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
281 </fo:block>
282 </xsl:template>
284 <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
285 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
286 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
287 </fo:block>
288 </xsl:template>
290 <xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
291 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
292 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
293 </fo:block>
294 </xsl:template>
296 <xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
297 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
298 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
299 </fo:block>
300 </xsl:template>
302 <xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
303 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
304 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
305 </fo:block>
306 </xsl:template>
308 <xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
309 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
310 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
311 </fo:block>
312 </xsl:template>
314 <xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
315 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
316 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
317 </fo:block>
318 </xsl:template>
320 <xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
321 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
322 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
323 </fo:block>
324 </xsl:template>
326 <xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
327 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
328 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
329 </fo:block>
330 </xsl:template>
332 <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
333 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
334 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
335 </fo:block>
336 </xsl:template>
338 <xsl:param name="scons.inner.twidtha">
339 <xsl:choose>
340 <xsl:when test="$paper.type = 'A4'">200mm</xsl:when>
341 <xsl:otherwise>205.9mm</xsl:otherwise> <!-- 8.5in-10mm -->
342 </xsl:choose>
343 </xsl:param>
344 <xsl:param name="scons.inner.twidthb">
345 <xsl:choose>
346 <xsl:when test="$paper.type = 'A4'">190mm</xsl:when>
347 <xsl:otherwise>195.9mm</xsl:otherwise> <!-- 8.5in-20mm -->
348 </xsl:choose>
349 </xsl:param>
350 <xsl:param name="scons.inner.twidthc">
351 <xsl:choose>
352 <xsl:when test="$paper.type = 'A4'">180mm</xsl:when>
353 <xsl:otherwise>185.9mm</xsl:otherwise> <!-- 8.5in-30mm -->
354 </xsl:choose>
355 </xsl:param>
357 <xsl:template name="book.titlepage.recto">
359 <fo:block-container height="3mm">
360 <fo:block></fo:block>
361 </fo:block-container>
362 <fo:block>
363 <fo:table table-layout="fixed" width="100%" padding="0pt" border-width="0pt" border-style="none">
365 <fo:table-column column-width="10mm"/>
366 <fo:table-column column-width="{$scons.inner.twidtha}"/>
367 <fo:table-body>
368 <fo:table-row text-align="center">
369 <fo:table-cell>
370 <fo:block></fo:block>
371 </fo:table-cell>
372 <fo:table-cell text-align="center">
373 <fo:block line-height="0">
374 <fo:external-graphic
375 src="url(titlepage/SConsBuildBricks_path.svg)"
376 width="{$scons.inner.twidtha}" content-width="scale-to-fit"
377 scaling="uniform"/>
378 </fo:block></fo:table-cell>
379 </fo:table-row>
380 </fo:table-body>
381 </fo:table>
382 </fo:block>
385 <fo:block-container height="4cm">
386 <fo:block></fo:block>
387 </fo:block-container>
389 <fo:block>
390 <fo:table table-layout="fixed" width="100%" border-width="0pt" border-style="none">
392 <fo:table-column column-width="10mm"/>
393 <fo:table-column column-width="{$scons.inner.twidthc}"/>
394 <fo:table-column column-width="20mm"/>
396 <fo:table-body>
397 <fo:table-row text-align="center">
398 <fo:table-cell>
399 <fo:block></fo:block>
400 </fo:table-cell>
401 <fo:table-cell text-align="left" display-align="after">
402 <xsl:choose>
403 <xsl:when test="bookinfo/title">
404 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
405 </xsl:when>
406 <xsl:when test="info/title">
407 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
408 </xsl:when>
409 <xsl:when test="title">
410 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
411 </xsl:when>
412 <xsl:otherwise>
413 <fo:block><fo:inline> </fo:inline></fo:block>
414 </xsl:otherwise>
415 </xsl:choose>
416 </fo:table-cell>
417 <fo:table-cell>
418 <fo:block></fo:block>
419 </fo:table-cell>
420 </fo:table-row>
421 </fo:table-body>
422 </fo:table>
423 </fo:block>
425 <!--
426 <fo:block-container height="6mm">
427 <fo:block></fo:block>
428 </fo:block-container>
431 <xsl:choose>
432 <xsl:when test="bookinfo/edition">
433 <fo:block>
434 <fo:table table-layout="fixed" width="100%" border-width="0pt" border-style="none">
436 <fo:table-column column-width="10mm"/>
437 <fo:table-column column-width="{$scons.inner.twidthc}"/>
438 <fo:table-column column-width="20mm"/>
440 <fo:table-body>
441 <fo:table-row text-align="center">
442 <fo:table-cell>
443 <fo:block></fo:block>
444 </fo:table-cell>
445 <fo:table-cell text-align="left" display-align="after">
446 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/edition"/>
447 </fo:table-cell>
448 <fo:table-cell>
449 <fo:block></fo:block>
450 </fo:table-cell>
451 </fo:table-row>
452 </fo:table-body>
453 </fo:table>
454 </fo:block>
456 <fo:block-container height="9mm">
457 <fo:block></fo:block>
458 </fo:block-container>
459 </xsl:when>
460 <xsl:otherwise>
461 <fo:block-container height="6mm">
462 <fo:block></fo:block>
463 </fo:block-container>
464 </xsl:otherwise>
465 </xsl:choose>
468 <fo:block>
469 <fo:table table-layout="fixed" width="100%" border-width="0pt" border-style="none">
471 <fo:table-column column-width="10mm"/>
472 <fo:table-column column-width="{$scons.inner.twidthc}"/>
473 <fo:table-column column-width="20mm"/>
475 <fo:table-body>
476 <fo:table-row text-align="center">
477 <fo:table-cell>
478 <fo:block></fo:block>
479 </fo:table-cell>
480 <fo:table-cell text-align="left" display-align="after">
481 <xsl:choose>
482 <xsl:when test="bookinfo/subtitle">
483 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
484 </xsl:when>
485 <xsl:when test="info/subtitle">
486 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
487 </xsl:when>
488 <xsl:when test="subtitle">
489 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
490 </xsl:when>
491 <xsl:otherwise>
492 <fo:block><fo:inline> </fo:inline></fo:block>
493 </xsl:otherwise>
494 </xsl:choose>
495 </fo:table-cell>
496 <fo:table-cell>
497 <fo:block></fo:block>
498 </fo:table-cell>
499 </fo:table-row>
500 </fo:table-body>
501 </fo:table>
502 </fo:block>
505 <xsl:choose>
506 <xsl:when test="bookinfo/corpauthor">
507 <fo:block-container height="15mm">
508 <fo:block></fo:block>
509 </fo:block-container>
510 <fo:block>
511 <fo:table table-layout="fixed" width="100%" border-width="0pt" border-style="none">
513 <fo:table-column column-width="10mm"/>
514 <fo:table-column column-width="{$scons.inner.twidthc}"/>
515 <fo:table-column column-width="20mm"/>
517 <fo:table-body>
518 <fo:table-row text-align="center">
519 <fo:table-cell>
520 <fo:block></fo:block>
521 </fo:table-cell>
522 <fo:table-cell text-align="left" display-align="after">
523 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
524 </fo:table-cell>
525 <fo:table-cell>
526 <fo:block></fo:block>
527 </fo:table-cell>
528 </fo:table-row>
529 </fo:table-body>
530 </fo:table>
531 </fo:block>
532 </xsl:when>
533 <xsl:otherwise>
534 </xsl:otherwise>
535 </xsl:choose>
537 <fo:block-container height="9mm">
538 <fo:block></fo:block>
539 </fo:block-container>
541 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/mediaobject"/>
542 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/mediaobject"/>
543 </xsl:template>
545 <xsl:template name="book.titlepage.verso">
546 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
547 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
548 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
549 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
550 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
551 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
552 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/revision"/>
553 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/revision"/>
554 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
555 </xsl:template>
557 <xsl:template name="book.titlepage.separator">
558 </xsl:template>
560 <xsl:template name="book.titlepage.before.recto">
561 </xsl:template>
563 <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
564 </xsl:template>
566 <xsl:template name="book.titlepage">
567 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
568 <xsl:variable name="recto.content">
569 <xsl:call-template name="book.titlepage.before.recto"/>
570 <xsl:call-template name="book.titlepage.recto"/>
571 </xsl:variable>
572 <xsl:variable name="recto.elements.count">
573 <xsl:choose>
574 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
575 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
576 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
577 <xsl:otherwise>1</xsl:otherwise>
578 </xsl:choose>
579 </xsl:variable>
580 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
581 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
582 </xsl:if>
583 <xsl:variable name="verso.content">
584 <xsl:call-template name="book.titlepage.before.verso"/>
585 <xsl:call-template name="book.titlepage.verso"/>
586 </xsl:variable>
587 <xsl:variable name="verso.elements.count">
588 <xsl:choose>
589 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
590 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
591 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
592 <xsl:otherwise>1</xsl:otherwise>
593 </xsl:choose>
594 </xsl:variable>
595 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
596 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
597 </xsl:if>
598 <xsl:call-template name="book.titlepage.separator"/>
599 </fo:block>
600 </xsl:template>
602 <xsl:template match="*" mode="book.titlepage.recto.mode">
603 <!-- if an element isn't found in this mode, -->
604 <!-- try the generic titlepage.mode -->
605 <xsl:apply-templates select="." mode="titlepage.mode"/>
606 </xsl:template>
608 <xsl:template match="*" mode="book.titlepage.verso.mode">
609 <!-- if an element isn't found in this mode, -->
610 <!-- try the generic titlepage.mode -->
611 <xsl:apply-templates select="." mode="titlepage.mode"/>
612 </xsl:template>
614 <!--
615 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
616 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24pt" space-before="18pt" font-weight="bold" font-family="'serif'">
617 <xsl:call-template name="division.title">
618 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
619 </xsl:call-template>
620 </fo:block>
621 </xsl:template>
623 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
624 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" font-size="20pt" space-before="15pt" font-family="{$title.fontset}">
625 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
626 </fo:block>
627 </xsl:template>
629 <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
630 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" font-size="20pt" space-before="0pt" font-family="{$title.fontset}">
631 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
632 </fo:block>
633 </xsl:template>
635 <xsl:template match="mediaobject" mode="book.titlepage.recto.auto.mode">
636 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style">
637 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
638 </fo:block>
639 </xsl:template>
641 <xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
642 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
643 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
644 </fo:block>
645 </xsl:template>
647 <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
648 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
649 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
650 </fo:block>
651 </xsl:template>
653 <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
654 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
655 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
656 </fo:block>
657 </xsl:template>
659 <xsl:template match="revision" mode="book.titlepage.verso.auto.mode">
660 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
661 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
662 </fo:block>
663 </xsl:template>
665 <xsl:template name="part.titlepage.recto">
666 <xsl:choose>
667 <xsl:when test="partinfo/title">
668 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
669 </xsl:when>
670 <xsl:when test="docinfo/title">
671 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
672 </xsl:when>
673 <xsl:when test="info/title">
674 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
675 </xsl:when>
676 <xsl:when test="title">
677 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
678 </xsl:when>
679 </xsl:choose>
681 <xsl:choose>
682 <xsl:when test="partinfo/subtitle">
683 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
684 </xsl:when>
685 <xsl:when test="docinfo/subtitle">
686 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
687 </xsl:when>
688 <xsl:when test="info/subtitle">
689 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
690 </xsl:when>
691 <xsl:when test="subtitle">
692 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
693 </xsl:when>
694 </xsl:choose>
696 </xsl:template>
698 <xsl:template name="part.titlepage.verso">
699 </xsl:template>
701 <xsl:template name="part.titlepage.separator">
702 </xsl:template>
704 <xsl:template name="part.titlepage.before.recto">
705 </xsl:template>
707 <xsl:template name="part.titlepage.before.verso">
708 </xsl:template>
710 <xsl:template name="part.titlepage">
711 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
712 <xsl:variable name="recto.content">
713 <xsl:call-template name="part.titlepage.before.recto"/>
714 <xsl:call-template name="part.titlepage.recto"/>
715 </xsl:variable>
716 <xsl:variable name="recto.elements.count">
717 <xsl:choose>
718 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
719 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
720 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
721 <xsl:otherwise>1</xsl:otherwise>
722 </xsl:choose>
723 </xsl:variable>
724 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
725 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
726 </xsl:if>
727 <xsl:variable name="verso.content">
728 <xsl:call-template name="part.titlepage.before.verso"/>
729 <xsl:call-template name="part.titlepage.verso"/>
730 </xsl:variable>
731 <xsl:variable name="verso.elements.count">
732 <xsl:choose>
733 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
734 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
735 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
736 <xsl:otherwise>1</xsl:otherwise>
737 </xsl:choose>
738 </xsl:variable>
739 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
740 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
741 </xsl:if>
742 <xsl:call-template name="part.titlepage.separator"/>
743 </fo:block>
744 </xsl:template>
746 <xsl:template match="*" mode="part.titlepage.recto.mode">
747 <!-- if an element isn't found in this mode, -->
748 <!-- try the generic titlepage.mode -->
749 <xsl:apply-templates select="." mode="titlepage.mode"/>
750 </xsl:template>
752 <xsl:template match="*" mode="part.titlepage.verso.mode">
753 <!-- if an element isn't found in this mode, -->
754 <!-- try the generic titlepage.mode -->
755 <xsl:apply-templates select="." mode="titlepage.mode"/>
756 </xsl:template>
758 <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
759 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
760 <xsl:call-template name="division.title">
761 <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
762 </xsl:call-template>
763 </fo:block>
764 </xsl:template>
766 <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
767 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
768 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
769 </fo:block>
770 </xsl:template>
772 <xsl:template name="partintro.titlepage.recto">
773 <xsl:choose>
774 <xsl:when test="partintroinfo/title">
775 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
776 </xsl:when>
777 <xsl:when test="docinfo/title">
778 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
779 </xsl:when>
780 <xsl:when test="info/title">
781 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
782 </xsl:when>
783 <xsl:when test="title">
784 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
785 </xsl:when>
786 </xsl:choose>
788 <xsl:choose>
789 <xsl:when test="partintroinfo/subtitle">
790 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
791 </xsl:when>
792 <xsl:when test="docinfo/subtitle">
793 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
794 </xsl:when>
795 <xsl:when test="info/subtitle">
796 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
797 </xsl:when>
798 <xsl:when test="subtitle">
799 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
800 </xsl:when>
801 </xsl:choose>
803 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
804 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
805 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
806 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
807 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
808 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
809 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
810 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
811 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
812 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
813 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
814 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
815 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
816 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
817 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
818 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
819 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
820 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
821 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
822 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
823 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
824 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
825 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
826 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
827 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
828 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
829 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
830 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
831 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
832 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
833 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
834 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
835 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
836 </xsl:template>
838 <xsl:template name="partintro.titlepage.verso">
839 </xsl:template>
841 <xsl:template name="partintro.titlepage.separator">
842 </xsl:template>
844 <xsl:template name="partintro.titlepage.before.recto">
845 </xsl:template>
847 <xsl:template name="partintro.titlepage.before.verso">
848 </xsl:template>
850 <xsl:template name="partintro.titlepage">
851 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
852 <xsl:variable name="recto.content">
853 <xsl:call-template name="partintro.titlepage.before.recto"/>
854 <xsl:call-template name="partintro.titlepage.recto"/>
855 </xsl:variable>
856 <xsl:variable name="recto.elements.count">
857 <xsl:choose>
858 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
859 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
860 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
861 <xsl:otherwise>1</xsl:otherwise>
862 </xsl:choose>
863 </xsl:variable>
864 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
865 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
866 </xsl:if>
867 <xsl:variable name="verso.content">
868 <xsl:call-template name="partintro.titlepage.before.verso"/>
869 <xsl:call-template name="partintro.titlepage.verso"/>
870 </xsl:variable>
871 <xsl:variable name="verso.elements.count">
872 <xsl:choose>
873 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
874 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
875 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
876 <xsl:otherwise>1</xsl:otherwise>
877 </xsl:choose>
878 </xsl:variable>
879 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
880 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
881 </xsl:if>
882 <xsl:call-template name="partintro.titlepage.separator"/>
883 </fo:block>
884 </xsl:template>
886 <xsl:template match="*" mode="partintro.titlepage.recto.mode">
887 <!-- if an element isn't found in this mode, -->
888 <!-- try the generic titlepage.mode -->
889 <xsl:apply-templates select="." mode="titlepage.mode"/>
890 </xsl:template>
892 <xsl:template match="*" mode="partintro.titlepage.verso.mode">
893 <!-- if an element isn't found in this mode, -->
894 <!-- try the generic titlepage.mode -->
895 <xsl:apply-templates select="." mode="titlepage.mode"/>
896 </xsl:template>
898 <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
899 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}">
900 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
901 </fo:block>
902 </xsl:template>
904 <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
905 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
906 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
907 </fo:block>
908 </xsl:template>
910 <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
911 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
912 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
913 </fo:block>
914 </xsl:template>
916 <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
917 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
918 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
919 </fo:block>
920 </xsl:template>
922 <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
923 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
924 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
925 </fo:block>
926 </xsl:template>
928 <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
929 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
930 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
931 </fo:block>
932 </xsl:template>
934 <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
935 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
936 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
937 </fo:block>
938 </xsl:template>
940 <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
941 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
942 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
943 </fo:block>
944 </xsl:template>
946 <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
947 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
948 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
949 </fo:block>
950 </xsl:template>
952 <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
953 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
954 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
955 </fo:block>
956 </xsl:template>
958 <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
959 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
960 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
961 </fo:block>
962 </xsl:template>
964 <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
965 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
966 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
967 </fo:block>
968 </xsl:template>
970 <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
971 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
972 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
973 </fo:block>
974 </xsl:template>
976 <xsl:template name="reference.titlepage.recto">
977 <xsl:choose>
978 <xsl:when test="referenceinfo/title">
979 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
980 </xsl:when>
981 <xsl:when test="docinfo/title">
982 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
983 </xsl:when>
984 <xsl:when test="info/title">
985 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
986 </xsl:when>
987 <xsl:when test="title">
988 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
989 </xsl:when>
990 </xsl:choose>
992 <xsl:choose>
993 <xsl:when test="referenceinfo/subtitle">
994 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
995 </xsl:when>
996 <xsl:when test="docinfo/subtitle">
997 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
998 </xsl:when>
999 <xsl:when test="info/subtitle">
1000 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
1001 </xsl:when>
1002 <xsl:when test="subtitle">
1003 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
1004 </xsl:when>
1005 </xsl:choose>
1007 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
1008 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1009 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
1010 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
1011 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1012 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
1013 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
1014 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
1015 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
1016 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
1017 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1018 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
1019 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
1020 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1021 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1022 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
1023 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1024 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
1025 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
1026 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1027 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
1028 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
1029 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1030 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
1031 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
1032 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
1033 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
1034 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
1035 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1036 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
1037 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
1038 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1039 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
1040 </xsl:template>
1042 <xsl:template name="reference.titlepage.verso">
1043 </xsl:template>
1045 <xsl:template name="reference.titlepage.separator">
1046 </xsl:template>
1048 <xsl:template name="reference.titlepage.before.recto">
1049 </xsl:template>
1051 <xsl:template name="reference.titlepage.before.verso">
1052 </xsl:template>
1054 <xsl:template name="reference.titlepage">
1055 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1056 <xsl:variable name="recto.content">
1057 <xsl:call-template name="reference.titlepage.before.recto"/>
1058 <xsl:call-template name="reference.titlepage.recto"/>
1059 </xsl:variable>
1060 <xsl:variable name="recto.elements.count">
1061 <xsl:choose>
1062 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1063 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1064 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1065 <xsl:otherwise>1</xsl:otherwise>
1066 </xsl:choose>
1067 </xsl:variable>
1068 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1069 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1070 </xsl:if>
1071 <xsl:variable name="verso.content">
1072 <xsl:call-template name="reference.titlepage.before.verso"/>
1073 <xsl:call-template name="reference.titlepage.verso"/>
1074 </xsl:variable>
1075 <xsl:variable name="verso.elements.count">
1076 <xsl:choose>
1077 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1078 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1079 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1080 <xsl:otherwise>1</xsl:otherwise>
1081 </xsl:choose>
1082 </xsl:variable>
1083 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1084 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1085 </xsl:if>
1086 <xsl:call-template name="reference.titlepage.separator"/>
1087 </fo:block>
1088 </xsl:template>
1090 <xsl:template match="*" mode="reference.titlepage.recto.mode">
1091 <!-- if an element isn't found in this mode, -->
1092 <!-- try the generic titlepage.mode -->
1093 <xsl:apply-templates select="." mode="titlepage.mode"/>
1094 </xsl:template>
1096 <xsl:template match="*" mode="reference.titlepage.verso.mode">
1097 <!-- if an element isn't found in this mode, -->
1098 <!-- try the generic titlepage.mode -->
1099 <xsl:apply-templates select="." mode="titlepage.mode"/>
1100 </xsl:template>
1102 <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
1103 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
1104 <xsl:call-template name="division.title">
1105 <xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
1106 </xsl:call-template>
1107 </fo:block>
1108 </xsl:template>
1110 <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
1111 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
1112 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1113 </fo:block>
1114 </xsl:template>
1116 <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
1117 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1118 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1119 </fo:block>
1120 </xsl:template>
1122 <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
1123 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1124 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1125 </fo:block>
1126 </xsl:template>
1128 <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
1129 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1130 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1131 </fo:block>
1132 </xsl:template>
1134 <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
1135 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1136 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1137 </fo:block>
1138 </xsl:template>
1140 <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
1141 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1142 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1143 </fo:block>
1144 </xsl:template>
1146 <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
1147 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1148 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1149 </fo:block>
1150 </xsl:template>
1152 <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
1153 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1154 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1155 </fo:block>
1156 </xsl:template>
1158 <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
1159 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1160 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1161 </fo:block>
1162 </xsl:template>
1164 <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
1165 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1166 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1167 </fo:block>
1168 </xsl:template>
1170 <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
1171 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1172 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1173 </fo:block>
1174 </xsl:template>
1176 <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
1177 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1178 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1179 </fo:block>
1180 </xsl:template>
1182 <xsl:template name="refsynopsisdiv.titlepage.recto">
1183 <xsl:choose>
1184 <xsl:when test="refsynopsisdivinfo/title">
1185 <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
1186 </xsl:when>
1187 <xsl:when test="docinfo/title">
1188 <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
1189 </xsl:when>
1190 <xsl:when test="info/title">
1191 <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
1192 </xsl:when>
1193 <xsl:when test="title">
1194 <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
1195 </xsl:when>
1196 </xsl:choose>
1198 </xsl:template>
1200 <xsl:template name="refsynopsisdiv.titlepage.verso">
1201 </xsl:template>
1203 <xsl:template name="refsynopsisdiv.titlepage.separator">
1204 </xsl:template>
1206 <xsl:template name="refsynopsisdiv.titlepage.before.recto">
1207 </xsl:template>
1209 <xsl:template name="refsynopsisdiv.titlepage.before.verso">
1210 </xsl:template>
1212 <xsl:template name="refsynopsisdiv.titlepage">
1213 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1214 <xsl:variable name="recto.content">
1215 <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
1216 <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
1217 </xsl:variable>
1218 <xsl:variable name="recto.elements.count">
1219 <xsl:choose>
1220 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1221 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1222 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1223 <xsl:otherwise>1</xsl:otherwise>
1224 </xsl:choose>
1225 </xsl:variable>
1226 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1227 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1228 </xsl:if>
1229 <xsl:variable name="verso.content">
1230 <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
1231 <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
1232 </xsl:variable>
1233 <xsl:variable name="verso.elements.count">
1234 <xsl:choose>
1235 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1236 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1237 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1238 <xsl:otherwise>1</xsl:otherwise>
1239 </xsl:choose>
1240 </xsl:variable>
1241 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1242 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1243 </xsl:if>
1244 <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
1245 </fo:block>
1246 </xsl:template>
1248 <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
1249 <!-- if an element isn't found in this mode, -->
1250 <!-- try the generic titlepage.mode -->
1251 <xsl:apply-templates select="." mode="titlepage.mode"/>
1252 </xsl:template>
1254 <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
1255 <!-- if an element isn't found in this mode, -->
1256 <!-- try the generic titlepage.mode -->
1257 <xsl:apply-templates select="." mode="titlepage.mode"/>
1258 </xsl:template>
1260 <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
1261 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
1262 <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
1263 </fo:block>
1264 </xsl:template>
1266 <xsl:template name="refsection.titlepage.recto">
1267 <xsl:choose>
1268 <xsl:when test="refsectioninfo/title">
1269 <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
1270 </xsl:when>
1271 <xsl:when test="docinfo/title">
1272 <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
1273 </xsl:when>
1274 <xsl:when test="info/title">
1275 <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
1276 </xsl:when>
1277 <xsl:when test="title">
1278 <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
1279 </xsl:when>
1280 </xsl:choose>
1282 </xsl:template>
1284 <xsl:template name="refsection.titlepage.verso">
1285 </xsl:template>
1287 <xsl:template name="refsection.titlepage.separator">
1288 </xsl:template>
1290 <xsl:template name="refsection.titlepage.before.recto">
1291 </xsl:template>
1293 <xsl:template name="refsection.titlepage.before.verso">
1294 </xsl:template>
1296 <xsl:template name="refsection.titlepage">
1297 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1298 <xsl:variable name="recto.content">
1299 <xsl:call-template name="refsection.titlepage.before.recto"/>
1300 <xsl:call-template name="refsection.titlepage.recto"/>
1301 </xsl:variable>
1302 <xsl:variable name="recto.elements.count">
1303 <xsl:choose>
1304 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1305 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1306 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1307 <xsl:otherwise>1</xsl:otherwise>
1308 </xsl:choose>
1309 </xsl:variable>
1310 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1311 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1312 </xsl:if>
1313 <xsl:variable name="verso.content">
1314 <xsl:call-template name="refsection.titlepage.before.verso"/>
1315 <xsl:call-template name="refsection.titlepage.verso"/>
1316 </xsl:variable>
1317 <xsl:variable name="verso.elements.count">
1318 <xsl:choose>
1319 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1320 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1321 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1322 <xsl:otherwise>1</xsl:otherwise>
1323 </xsl:choose>
1324 </xsl:variable>
1325 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1326 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1327 </xsl:if>
1328 <xsl:call-template name="refsection.titlepage.separator"/>
1329 </fo:block>
1330 </xsl:template>
1332 <xsl:template match="*" mode="refsection.titlepage.recto.mode">
1333 <!-- if an element isn't found in this mode, -->
1334 <!-- try the generic titlepage.mode -->
1335 <xsl:apply-templates select="." mode="titlepage.mode"/>
1336 </xsl:template>
1338 <xsl:template match="*" mode="refsection.titlepage.verso.mode">
1339 <!-- if an element isn't found in this mode, -->
1340 <!-- try the generic titlepage.mode -->
1341 <xsl:apply-templates select="." mode="titlepage.mode"/>
1342 </xsl:template>
1344 <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
1345 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
1346 <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
1347 </fo:block>
1348 </xsl:template>
1350 <xsl:template name="refsect1.titlepage.recto">
1351 <xsl:choose>
1352 <xsl:when test="refsect1info/title">
1353 <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
1354 </xsl:when>
1355 <xsl:when test="docinfo/title">
1356 <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
1357 </xsl:when>
1358 <xsl:when test="info/title">
1359 <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
1360 </xsl:when>
1361 <xsl:when test="title">
1362 <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
1363 </xsl:when>
1364 </xsl:choose>
1366 </xsl:template>
1368 <xsl:template name="refsect1.titlepage.verso">
1369 </xsl:template>
1371 <xsl:template name="refsect1.titlepage.separator">
1372 </xsl:template>
1374 <xsl:template name="refsect1.titlepage.before.recto">
1375 </xsl:template>
1377 <xsl:template name="refsect1.titlepage.before.verso">
1378 </xsl:template>
1380 <xsl:template name="refsect1.titlepage">
1381 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1382 <xsl:variable name="recto.content">
1383 <xsl:call-template name="refsect1.titlepage.before.recto"/>
1384 <xsl:call-template name="refsect1.titlepage.recto"/>
1385 </xsl:variable>
1386 <xsl:variable name="recto.elements.count">
1387 <xsl:choose>
1388 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1389 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1390 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1391 <xsl:otherwise>1</xsl:otherwise>
1392 </xsl:choose>
1393 </xsl:variable>
1394 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1395 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1396 </xsl:if>
1397 <xsl:variable name="verso.content">
1398 <xsl:call-template name="refsect1.titlepage.before.verso"/>
1399 <xsl:call-template name="refsect1.titlepage.verso"/>
1400 </xsl:variable>
1401 <xsl:variable name="verso.elements.count">
1402 <xsl:choose>
1403 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1404 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1405 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1406 <xsl:otherwise>1</xsl:otherwise>
1407 </xsl:choose>
1408 </xsl:variable>
1409 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1410 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1411 </xsl:if>
1412 <xsl:call-template name="refsect1.titlepage.separator"/>
1413 </fo:block>
1414 </xsl:template>
1416 <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
1417 <!-- if an element isn't found in this mode, -->
1418 <!-- try the generic titlepage.mode -->
1419 <xsl:apply-templates select="." mode="titlepage.mode"/>
1420 </xsl:template>
1422 <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
1423 <!-- if an element isn't found in this mode, -->
1424 <!-- try the generic titlepage.mode -->
1425 <xsl:apply-templates select="." mode="titlepage.mode"/>
1426 </xsl:template>
1428 <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
1429 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
1430 <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
1431 </fo:block>
1432 </xsl:template>
1434 <xsl:template name="refsect2.titlepage.recto">
1435 <xsl:choose>
1436 <xsl:when test="refsect2info/title">
1437 <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
1438 </xsl:when>
1439 <xsl:when test="docinfo/title">
1440 <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
1441 </xsl:when>
1442 <xsl:when test="info/title">
1443 <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
1444 </xsl:when>
1445 <xsl:when test="title">
1446 <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
1447 </xsl:when>
1448 </xsl:choose>
1450 </xsl:template>
1452 <xsl:template name="refsect2.titlepage.verso">
1453 </xsl:template>
1455 <xsl:template name="refsect2.titlepage.separator">
1456 </xsl:template>
1458 <xsl:template name="refsect2.titlepage.before.recto">
1459 </xsl:template>
1461 <xsl:template name="refsect2.titlepage.before.verso">
1462 </xsl:template>
1464 <xsl:template name="refsect2.titlepage">
1465 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1466 <xsl:variable name="recto.content">
1467 <xsl:call-template name="refsect2.titlepage.before.recto"/>
1468 <xsl:call-template name="refsect2.titlepage.recto"/>
1469 </xsl:variable>
1470 <xsl:variable name="recto.elements.count">
1471 <xsl:choose>
1472 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1473 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1474 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1475 <xsl:otherwise>1</xsl:otherwise>
1476 </xsl:choose>
1477 </xsl:variable>
1478 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1479 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1480 </xsl:if>
1481 <xsl:variable name="verso.content">
1482 <xsl:call-template name="refsect2.titlepage.before.verso"/>
1483 <xsl:call-template name="refsect2.titlepage.verso"/>
1484 </xsl:variable>
1485 <xsl:variable name="verso.elements.count">
1486 <xsl:choose>
1487 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1488 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1489 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1490 <xsl:otherwise>1</xsl:otherwise>
1491 </xsl:choose>
1492 </xsl:variable>
1493 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1494 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1495 </xsl:if>
1496 <xsl:call-template name="refsect2.titlepage.separator"/>
1497 </fo:block>
1498 </xsl:template>
1500 <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
1501 <!-- if an element isn't found in this mode, -->
1502 <!-- try the generic titlepage.mode -->
1503 <xsl:apply-templates select="." mode="titlepage.mode"/>
1504 </xsl:template>
1506 <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
1507 <!-- if an element isn't found in this mode, -->
1508 <!-- try the generic titlepage.mode -->
1509 <xsl:apply-templates select="." mode="titlepage.mode"/>
1510 </xsl:template>
1512 <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
1513 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
1514 <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
1515 </fo:block>
1516 </xsl:template>
1518 <xsl:template name="refsect3.titlepage.recto">
1519 <xsl:choose>
1520 <xsl:when test="refsect3info/title">
1521 <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
1522 </xsl:when>
1523 <xsl:when test="docinfo/title">
1524 <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
1525 </xsl:when>
1526 <xsl:when test="info/title">
1527 <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
1528 </xsl:when>
1529 <xsl:when test="title">
1530 <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
1531 </xsl:when>
1532 </xsl:choose>
1534 </xsl:template>
1536 <xsl:template name="refsect3.titlepage.verso">
1537 </xsl:template>
1539 <xsl:template name="refsect3.titlepage.separator">
1540 </xsl:template>
1542 <xsl:template name="refsect3.titlepage.before.recto">
1543 </xsl:template>
1545 <xsl:template name="refsect3.titlepage.before.verso">
1546 </xsl:template>
1548 <xsl:template name="refsect3.titlepage">
1549 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1550 <xsl:variable name="recto.content">
1551 <xsl:call-template name="refsect3.titlepage.before.recto"/>
1552 <xsl:call-template name="refsect3.titlepage.recto"/>
1553 </xsl:variable>
1554 <xsl:variable name="recto.elements.count">
1555 <xsl:choose>
1556 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1557 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1558 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1559 <xsl:otherwise>1</xsl:otherwise>
1560 </xsl:choose>
1561 </xsl:variable>
1562 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1563 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1564 </xsl:if>
1565 <xsl:variable name="verso.content">
1566 <xsl:call-template name="refsect3.titlepage.before.verso"/>
1567 <xsl:call-template name="refsect3.titlepage.verso"/>
1568 </xsl:variable>
1569 <xsl:variable name="verso.elements.count">
1570 <xsl:choose>
1571 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1572 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1573 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1574 <xsl:otherwise>1</xsl:otherwise>
1575 </xsl:choose>
1576 </xsl:variable>
1577 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1578 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1579 </xsl:if>
1580 <xsl:call-template name="refsect3.titlepage.separator"/>
1581 </fo:block>
1582 </xsl:template>
1584 <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
1585 <!-- if an element isn't found in this mode, -->
1586 <!-- try the generic titlepage.mode -->
1587 <xsl:apply-templates select="." mode="titlepage.mode"/>
1588 </xsl:template>
1590 <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
1591 <!-- if an element isn't found in this mode, -->
1592 <!-- try the generic titlepage.mode -->
1593 <xsl:apply-templates select="." mode="titlepage.mode"/>
1594 </xsl:template>
1596 <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
1597 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
1598 <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
1599 </fo:block>
1600 </xsl:template>
1602 <xsl:template name="dedication.titlepage.recto">
1603 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1604 <xsl:call-template name="component.title">
1605 <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
1606 </xsl:call-template></fo:block>
1607 <xsl:choose>
1608 <xsl:when test="dedicationinfo/subtitle">
1609 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
1610 </xsl:when>
1611 <xsl:when test="docinfo/subtitle">
1612 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1613 </xsl:when>
1614 <xsl:when test="info/subtitle">
1615 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
1616 </xsl:when>
1617 <xsl:when test="subtitle">
1618 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
1619 </xsl:when>
1620 </xsl:choose>
1622 </xsl:template>
1624 <xsl:template name="dedication.titlepage.verso">
1625 </xsl:template>
1627 <xsl:template name="dedication.titlepage.separator">
1628 </xsl:template>
1630 <xsl:template name="dedication.titlepage.before.recto">
1631 </xsl:template>
1633 <xsl:template name="dedication.titlepage.before.verso">
1634 </xsl:template>
1636 <xsl:template name="dedication.titlepage">
1637 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1638 <xsl:variable name="recto.content">
1639 <xsl:call-template name="dedication.titlepage.before.recto"/>
1640 <xsl:call-template name="dedication.titlepage.recto"/>
1641 </xsl:variable>
1642 <xsl:variable name="recto.elements.count">
1643 <xsl:choose>
1644 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1645 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1646 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1647 <xsl:otherwise>1</xsl:otherwise>
1648 </xsl:choose>
1649 </xsl:variable>
1650 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1651 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1652 </xsl:if>
1653 <xsl:variable name="verso.content">
1654 <xsl:call-template name="dedication.titlepage.before.verso"/>
1655 <xsl:call-template name="dedication.titlepage.verso"/>
1656 </xsl:variable>
1657 <xsl:variable name="verso.elements.count">
1658 <xsl:choose>
1659 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1660 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1661 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1662 <xsl:otherwise>1</xsl:otherwise>
1663 </xsl:choose>
1664 </xsl:variable>
1665 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1666 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1667 </xsl:if>
1668 <xsl:call-template name="dedication.titlepage.separator"/>
1669 </fo:block>
1670 </xsl:template>
1672 <xsl:template match="*" mode="dedication.titlepage.recto.mode">
1673 <!-- if an element isn't found in this mode, -->
1674 <!-- try the generic titlepage.mode -->
1675 <xsl:apply-templates select="." mode="titlepage.mode"/>
1676 </xsl:template>
1678 <xsl:template match="*" mode="dedication.titlepage.verso.mode">
1679 <!-- if an element isn't found in this mode, -->
1680 <!-- try the generic titlepage.mode -->
1681 <xsl:apply-templates select="." mode="titlepage.mode"/>
1682 </xsl:template>
1684 <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
1685 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
1686 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1687 </fo:block>
1688 </xsl:template>
1690 <xsl:template name="preface.titlepage.recto">
1691 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1692 <xsl:call-template name="component.title">
1693 <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
1694 </xsl:call-template></fo:block>
1695 <xsl:choose>
1696 <xsl:when test="prefaceinfo/subtitle">
1697 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
1698 </xsl:when>
1699 <xsl:when test="docinfo/subtitle">
1700 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1701 </xsl:when>
1702 <xsl:when test="info/subtitle">
1703 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
1704 </xsl:when>
1705 <xsl:when test="subtitle">
1706 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
1707 </xsl:when>
1708 </xsl:choose>
1710 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
1711 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1712 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
1713 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
1714 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1715 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
1716 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
1717 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
1718 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
1719 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
1720 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1721 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
1722 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
1723 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1724 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1725 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
1726 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1727 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
1728 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
1729 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1730 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
1731 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
1732 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1733 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
1734 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
1735 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
1736 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
1737 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
1738 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1739 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
1740 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
1741 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1742 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
1743 </xsl:template>
1745 <xsl:template name="preface.titlepage.verso">
1746 </xsl:template>
1748 <xsl:template name="preface.titlepage.separator">
1749 </xsl:template>
1751 <xsl:template name="preface.titlepage.before.recto">
1752 </xsl:template>
1754 <xsl:template name="preface.titlepage.before.verso">
1755 </xsl:template>
1757 <xsl:template name="preface.titlepage">
1758 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1759 <xsl:variable name="recto.content">
1760 <xsl:call-template name="preface.titlepage.before.recto"/>
1761 <xsl:call-template name="preface.titlepage.recto"/>
1762 </xsl:variable>
1763 <xsl:variable name="recto.elements.count">
1764 <xsl:choose>
1765 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1766 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1767 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1768 <xsl:otherwise>1</xsl:otherwise>
1769 </xsl:choose>
1770 </xsl:variable>
1771 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1772 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1773 </xsl:if>
1774 <xsl:variable name="verso.content">
1775 <xsl:call-template name="preface.titlepage.before.verso"/>
1776 <xsl:call-template name="preface.titlepage.verso"/>
1777 </xsl:variable>
1778 <xsl:variable name="verso.elements.count">
1779 <xsl:choose>
1780 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1781 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1782 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1783 <xsl:otherwise>1</xsl:otherwise>
1784 </xsl:choose>
1785 </xsl:variable>
1786 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1787 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1788 </xsl:if>
1789 <xsl:call-template name="preface.titlepage.separator"/>
1790 </fo:block>
1791 </xsl:template>
1793 <xsl:template match="*" mode="preface.titlepage.recto.mode">
1794 <!-- if an element isn't found in this mode, -->
1795 <!-- try the generic titlepage.mode -->
1796 <xsl:apply-templates select="." mode="titlepage.mode"/>
1797 </xsl:template>
1799 <xsl:template match="*" mode="preface.titlepage.verso.mode">
1800 <!-- if an element isn't found in this mode, -->
1801 <!-- try the generic titlepage.mode -->
1802 <xsl:apply-templates select="." mode="titlepage.mode"/>
1803 </xsl:template>
1805 <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
1806 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
1807 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1808 </fo:block>
1809 </xsl:template>
1811 <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
1812 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1813 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1814 </fo:block>
1815 </xsl:template>
1817 <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
1818 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1819 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1820 </fo:block>
1821 </xsl:template>
1823 <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
1824 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1825 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1826 </fo:block>
1827 </xsl:template>
1829 <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
1830 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1831 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1832 </fo:block>
1833 </xsl:template>
1835 <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
1836 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1837 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1838 </fo:block>
1839 </xsl:template>
1841 <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
1842 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1843 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1844 </fo:block>
1845 </xsl:template>
1847 <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
1848 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1849 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1850 </fo:block>
1851 </xsl:template>
1853 <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
1854 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1855 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1856 </fo:block>
1857 </xsl:template>
1859 <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
1860 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1861 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1862 </fo:block>
1863 </xsl:template>
1865 <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
1866 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1867 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1868 </fo:block>
1869 </xsl:template>
1871 <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
1872 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1873 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1874 </fo:block>
1875 </xsl:template>
1877 <xsl:template name="chapter.titlepage.recto">
1879 <fo:block-container height="1cm">
1880 <fo:block></fo:block>
1881 </fo:block-container>
1883 <fo:block text-align="center">
1884 <fo:leader leader-length="85%" leader-pattern="rule" rule-style="solid" rule-thickness="1pt" color="#C51410"/>
1885 </fo:block>
1887 <fo:block-container height="0.7cm">
1888 <fo:block></fo:block>
1889 </fo:block-container>
1891 <xsl:choose>
1892 <xsl:when test="chapterinfo/title">
1893 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
1894 </xsl:when>
1895 <xsl:when test="docinfo/title">
1896 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
1897 </xsl:when>
1898 <xsl:when test="info/title">
1899 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
1900 </xsl:when>
1901 <xsl:when test="title">
1902 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
1903 </xsl:when>
1904 </xsl:choose>
1907 <fo:block-container height="0.7cm">
1908 <fo:block></fo:block>
1909 </fo:block-container>
1912 <fo:block text-align="center">
1913 <fo:leader leader-length="85%" leader-pattern="rule" rule-style="solid" rule-thickness="1pt" color="#C51410"/>
1914 </fo:block>
1916 <fo:block-container height="1cm">
1917 <fo:block></fo:block>
1918 </fo:block-container>
1920 </xsl:template>
1922 <xsl:template name="chapter.titlepage.verso">
1923 </xsl:template>
1925 <xsl:template name="chapter.titlepage.separator">
1926 <!--
1927 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
1929 </xsl:template>
1931 <xsl:template name="chapter.titlepage.before.recto">
1932 </xsl:template>
1934 <xsl:template name="chapter.titlepage.before.verso">
1935 </xsl:template>
1937 <xsl:template name="chapter.titlepage">
1938 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
1939 <xsl:variable name="recto.content">
1940 <xsl:call-template name="chapter.titlepage.before.recto"/>
1941 <xsl:call-template name="chapter.titlepage.recto"/>
1942 </xsl:variable>
1943 <xsl:variable name="recto.elements.count">
1944 <xsl:choose>
1945 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1946 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1947 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1948 <xsl:otherwise>1</xsl:otherwise>
1949 </xsl:choose>
1950 </xsl:variable>
1951 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1952 <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
1953 </xsl:if>
1954 <xsl:variable name="verso.content">
1955 <xsl:call-template name="chapter.titlepage.before.verso"/>
1956 <xsl:call-template name="chapter.titlepage.verso"/>
1957 </xsl:variable>
1958 <xsl:variable name="verso.elements.count">
1959 <xsl:choose>
1960 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1961 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1962 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1963 <xsl:otherwise>1</xsl:otherwise>
1964 </xsl:choose>
1965 </xsl:variable>
1966 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1967 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1968 </xsl:if>
1969 <xsl:call-template name="chapter.titlepage.separator"/>
1970 </fo:block>
1971 </xsl:template>
1973 <xsl:template match="*" mode="chapter.titlepage.recto.mode">
1974 <!-- if an element isn't found in this mode, -->
1975 <!-- try the generic titlepage.mode -->
1976 <xsl:apply-templates select="." mode="titlepage.mode"/>
1977 </xsl:template>
1979 <xsl:template match="*" mode="chapter.titlepage.verso.mode">
1980 <!-- if an element isn't found in this mode, -->
1981 <!-- try the generic titlepage.mode -->
1982 <xsl:apply-templates select="." mode="titlepage.mode"/>
1983 </xsl:template>
1985 <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
1986 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
1987 <xsl:call-template name="component.title">
1988 <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
1989 </xsl:call-template>
1990 </fo:block>
1991 </xsl:template>
1993 <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
1994 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
1995 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1996 </fo:block>
1997 </xsl:template>
1999 <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
2000 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2001 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2002 </fo:block>
2003 </xsl:template>
2005 <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
2006 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2007 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2008 </fo:block>
2009 </xsl:template>
2011 <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
2012 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2013 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2014 </fo:block>
2015 </xsl:template>
2017 <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
2018 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2019 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2020 </fo:block>
2021 </xsl:template>
2023 <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
2024 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2025 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2026 </fo:block>
2027 </xsl:template>
2029 <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
2030 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2031 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2032 </fo:block>
2033 </xsl:template>
2035 <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
2036 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2037 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2038 </fo:block>
2039 </xsl:template>
2041 <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
2042 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2043 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2044 </fo:block>
2045 </xsl:template>
2047 <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
2048 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2049 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2050 </fo:block>
2051 </xsl:template>
2053 <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
2054 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2055 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2056 </fo:block>
2057 </xsl:template>
2059 <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
2060 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2061 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2062 </fo:block>
2063 </xsl:template>
2065 <xsl:template name="appendix.titlepage.recto">
2066 <xsl:choose>
2067 <xsl:when test="appendixinfo/title">
2068 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
2069 </xsl:when>
2070 <xsl:when test="docinfo/title">
2071 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
2072 </xsl:when>
2073 <xsl:when test="info/title">
2074 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
2075 </xsl:when>
2076 <xsl:when test="title">
2077 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
2078 </xsl:when>
2079 </xsl:choose>
2081 <xsl:choose>
2082 <xsl:when test="appendixinfo/subtitle">
2083 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
2084 </xsl:when>
2085 <xsl:when test="docinfo/subtitle">
2086 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2087 </xsl:when>
2088 <xsl:when test="info/subtitle">
2089 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
2090 </xsl:when>
2091 <xsl:when test="subtitle">
2092 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
2093 </xsl:when>
2094 </xsl:choose>
2096 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
2097 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
2098 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
2099 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
2100 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
2101 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
2102 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
2103 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
2104 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
2105 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
2106 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
2107 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
2108 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
2109 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
2110 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2111 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
2112 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
2113 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
2114 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
2115 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
2116 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
2117 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
2118 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
2119 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
2120 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
2121 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
2122 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
2123 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
2124 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
2125 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
2126 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
2127 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
2128 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
2129 </xsl:template>
2131 <xsl:template name="appendix.titlepage.verso">
2132 </xsl:template>
2134 <xsl:template name="appendix.titlepage.separator">
2135 </xsl:template>
2137 <xsl:template name="appendix.titlepage.before.recto">
2138 </xsl:template>
2140 <xsl:template name="appendix.titlepage.before.verso">
2141 </xsl:template>
2143 <xsl:template name="appendix.titlepage">
2144 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2145 <xsl:variable name="recto.content">
2146 <xsl:call-template name="appendix.titlepage.before.recto"/>
2147 <xsl:call-template name="appendix.titlepage.recto"/>
2148 </xsl:variable>
2149 <xsl:variable name="recto.elements.count">
2150 <xsl:choose>
2151 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2152 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2153 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2154 <xsl:otherwise>1</xsl:otherwise>
2155 </xsl:choose>
2156 </xsl:variable>
2157 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2158 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2159 </xsl:if>
2160 <xsl:variable name="verso.content">
2161 <xsl:call-template name="appendix.titlepage.before.verso"/>
2162 <xsl:call-template name="appendix.titlepage.verso"/>
2163 </xsl:variable>
2164 <xsl:variable name="verso.elements.count">
2165 <xsl:choose>
2166 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2167 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2168 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2169 <xsl:otherwise>1</xsl:otherwise>
2170 </xsl:choose>
2171 </xsl:variable>
2172 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2173 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2174 </xsl:if>
2175 <xsl:call-template name="appendix.titlepage.separator"/>
2176 </fo:block>
2177 </xsl:template>
2179 <xsl:template match="*" mode="appendix.titlepage.recto.mode">
2180 <!-- if an element isn't found in this mode, -->
2181 <!-- try the generic titlepage.mode -->
2182 <xsl:apply-templates select="." mode="titlepage.mode"/>
2183 </xsl:template>
2185 <xsl:template match="*" mode="appendix.titlepage.verso.mode">
2186 <!-- if an element isn't found in this mode, -->
2187 <!-- try the generic titlepage.mode -->
2188 <xsl:apply-templates select="." mode="titlepage.mode"/>
2189 </xsl:template>
2191 <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
2192 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
2193 <xsl:call-template name="component.title">
2194 <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
2195 </xsl:call-template>
2196 </fo:block>
2197 </xsl:template>
2199 <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
2200 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
2201 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2202 </fo:block>
2203 </xsl:template>
2205 <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
2206 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2207 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2208 </fo:block>
2209 </xsl:template>
2211 <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
2212 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2213 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2214 </fo:block>
2215 </xsl:template>
2217 <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
2218 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2219 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2220 </fo:block>
2221 </xsl:template>
2223 <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
2224 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2225 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2226 </fo:block>
2227 </xsl:template>
2229 <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
2230 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2231 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2232 </fo:block>
2233 </xsl:template>
2235 <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
2236 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2237 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2238 </fo:block>
2239 </xsl:template>
2241 <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
2242 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2243 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2244 </fo:block>
2245 </xsl:template>
2247 <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
2248 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2249 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2250 </fo:block>
2251 </xsl:template>
2253 <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
2254 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2255 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2256 </fo:block>
2257 </xsl:template>
2259 <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
2260 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2261 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2262 </fo:block>
2263 </xsl:template>
2265 <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
2266 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2267 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2268 </fo:block>
2269 </xsl:template>
2271 <xsl:template name="section.titlepage.recto">
2272 <xsl:choose>
2273 <xsl:when test="sectioninfo/title">
2274 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
2275 </xsl:when>
2276 <xsl:when test="info/title">
2277 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
2278 </xsl:when>
2279 <xsl:when test="title">
2280 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
2281 </xsl:when>
2282 </xsl:choose>
2284 <xsl:choose>
2285 <xsl:when test="sectioninfo/subtitle">
2286 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
2287 </xsl:when>
2288 <xsl:when test="info/subtitle">
2289 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
2290 </xsl:when>
2291 <xsl:when test="subtitle">
2292 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
2293 </xsl:when>
2294 </xsl:choose>
2296 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
2297 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
2298 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
2299 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
2300 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
2301 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
2302 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
2303 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
2304 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
2305 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2306 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
2307 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
2308 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
2309 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
2310 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
2311 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
2312 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
2313 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
2314 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
2315 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
2316 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
2317 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
2318 </xsl:template>
2320 <xsl:template name="section.titlepage.verso">
2321 </xsl:template>
2323 <xsl:template name="section.titlepage.separator">
2324 </xsl:template>
2326 <xsl:template name="section.titlepage.before.recto">
2327 </xsl:template>
2329 <xsl:template name="section.titlepage.before.verso">
2330 </xsl:template>
2332 <xsl:template name="section.titlepage">
2333 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2334 <xsl:variable name="recto.content">
2335 <xsl:call-template name="section.titlepage.before.recto"/>
2336 <xsl:call-template name="section.titlepage.recto"/>
2337 </xsl:variable>
2338 <xsl:variable name="recto.elements.count">
2339 <xsl:choose>
2340 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2341 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2342 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2343 <xsl:otherwise>1</xsl:otherwise>
2344 </xsl:choose>
2345 </xsl:variable>
2346 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2347 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2348 </xsl:if>
2349 <xsl:variable name="verso.content">
2350 <xsl:call-template name="section.titlepage.before.verso"/>
2351 <xsl:call-template name="section.titlepage.verso"/>
2352 </xsl:variable>
2353 <xsl:variable name="verso.elements.count">
2354 <xsl:choose>
2355 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2356 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2357 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2358 <xsl:otherwise>1</xsl:otherwise>
2359 </xsl:choose>
2360 </xsl:variable>
2361 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2362 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2363 </xsl:if>
2364 <xsl:call-template name="section.titlepage.separator"/>
2365 </fo:block>
2366 </xsl:template>
2368 <xsl:template match="*" mode="section.titlepage.recto.mode">
2369 <!-- if an element isn't found in this mode, -->
2370 <!-- try the generic titlepage.mode -->
2371 <xsl:apply-templates select="." mode="titlepage.mode"/>
2372 </xsl:template>
2374 <xsl:template match="*" mode="section.titlepage.verso.mode">
2375 <!-- if an element isn't found in this mode, -->
2376 <!-- try the generic titlepage.mode -->
2377 <xsl:apply-templates select="." mode="titlepage.mode"/>
2378 </xsl:template>
2380 <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
2381 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2382 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2383 </fo:block>
2384 </xsl:template>
2386 <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
2387 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
2388 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2389 </fo:block>
2390 </xsl:template>
2392 <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
2393 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2394 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2395 </fo:block>
2396 </xsl:template>
2398 <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
2399 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2400 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2401 </fo:block>
2402 </xsl:template>
2404 <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
2405 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2406 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2407 </fo:block>
2408 </xsl:template>
2410 <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
2411 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2412 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2413 </fo:block>
2414 </xsl:template>
2416 <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
2417 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2418 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2419 </fo:block>
2420 </xsl:template>
2422 <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
2423 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2424 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2425 </fo:block>
2426 </xsl:template>
2428 <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
2429 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2430 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2431 </fo:block>
2432 </xsl:template>
2434 <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
2435 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2436 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2437 </fo:block>
2438 </xsl:template>
2440 <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
2441 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2442 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2443 </fo:block>
2444 </xsl:template>
2446 <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
2447 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2448 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2449 </fo:block>
2450 </xsl:template>
2452 <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
2453 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2454 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2455 </fo:block>
2456 </xsl:template>
2458 <xsl:template name="sect1.titlepage.recto">
2459 <xsl:choose>
2460 <xsl:when test="sect1info/title">
2461 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
2462 </xsl:when>
2463 <xsl:when test="info/title">
2464 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
2465 </xsl:when>
2466 <xsl:when test="title">
2467 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
2468 </xsl:when>
2469 </xsl:choose>
2471 <xsl:choose>
2472 <xsl:when test="sect1info/subtitle">
2473 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
2474 </xsl:when>
2475 <xsl:when test="info/subtitle">
2476 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
2477 </xsl:when>
2478 <xsl:when test="subtitle">
2479 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
2480 </xsl:when>
2481 </xsl:choose>
2483 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
2484 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
2485 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
2486 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
2487 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
2488 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
2489 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
2490 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
2491 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
2492 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2493 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
2494 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
2495 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
2496 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
2497 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
2498 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
2499 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
2500 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
2501 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
2502 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
2503 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
2504 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
2505 </xsl:template>
2507 <xsl:template name="sect1.titlepage.verso">
2508 </xsl:template>
2510 <xsl:template name="sect1.titlepage.separator">
2511 </xsl:template>
2513 <xsl:template name="sect1.titlepage.before.recto">
2514 </xsl:template>
2516 <xsl:template name="sect1.titlepage.before.verso">
2517 </xsl:template>
2519 <xsl:template name="sect1.titlepage">
2520 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2521 <xsl:variable name="recto.content">
2522 <xsl:call-template name="sect1.titlepage.before.recto"/>
2523 <xsl:call-template name="sect1.titlepage.recto"/>
2524 </xsl:variable>
2525 <xsl:variable name="recto.elements.count">
2526 <xsl:choose>
2527 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2528 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2529 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2530 <xsl:otherwise>1</xsl:otherwise>
2531 </xsl:choose>
2532 </xsl:variable>
2533 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2534 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2535 </xsl:if>
2536 <xsl:variable name="verso.content">
2537 <xsl:call-template name="sect1.titlepage.before.verso"/>
2538 <xsl:call-template name="sect1.titlepage.verso"/>
2539 </xsl:variable>
2540 <xsl:variable name="verso.elements.count">
2541 <xsl:choose>
2542 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2543 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2544 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2545 <xsl:otherwise>1</xsl:otherwise>
2546 </xsl:choose>
2547 </xsl:variable>
2548 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2549 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2550 </xsl:if>
2551 <xsl:call-template name="sect1.titlepage.separator"/>
2552 </fo:block>
2553 </xsl:template>
2555 <xsl:template match="*" mode="sect1.titlepage.recto.mode">
2556 <!-- if an element isn't found in this mode, -->
2557 <!-- try the generic titlepage.mode -->
2558 <xsl:apply-templates select="." mode="titlepage.mode"/>
2559 </xsl:template>
2561 <xsl:template match="*" mode="sect1.titlepage.verso.mode">
2562 <!-- if an element isn't found in this mode, -->
2563 <!-- try the generic titlepage.mode -->
2564 <xsl:apply-templates select="." mode="titlepage.mode"/>
2565 </xsl:template>
2567 <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
2568 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2569 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2570 </fo:block>
2571 </xsl:template>
2573 <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
2574 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
2575 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2576 </fo:block>
2577 </xsl:template>
2579 <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
2580 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2581 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2582 </fo:block>
2583 </xsl:template>
2585 <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
2586 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2587 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2588 </fo:block>
2589 </xsl:template>
2591 <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
2592 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2593 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2594 </fo:block>
2595 </xsl:template>
2597 <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
2598 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2599 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2600 </fo:block>
2601 </xsl:template>
2603 <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2604 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2605 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2606 </fo:block>
2607 </xsl:template>
2609 <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
2610 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2611 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2612 </fo:block>
2613 </xsl:template>
2615 <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
2616 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2617 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2618 </fo:block>
2619 </xsl:template>
2621 <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
2622 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2623 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2624 </fo:block>
2625 </xsl:template>
2627 <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
2628 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2629 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2630 </fo:block>
2631 </xsl:template>
2633 <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
2634 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2635 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2636 </fo:block>
2637 </xsl:template>
2639 <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
2640 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2641 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2642 </fo:block>
2643 </xsl:template>
2645 <xsl:template name="sect2.titlepage.recto">
2646 <xsl:choose>
2647 <xsl:when test="sect2info/title">
2648 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
2649 </xsl:when>
2650 <xsl:when test="info/title">
2651 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
2652 </xsl:when>
2653 <xsl:when test="title">
2654 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
2655 </xsl:when>
2656 </xsl:choose>
2658 <xsl:choose>
2659 <xsl:when test="sect2info/subtitle">
2660 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
2661 </xsl:when>
2662 <xsl:when test="info/subtitle">
2663 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
2664 </xsl:when>
2665 <xsl:when test="subtitle">
2666 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
2667 </xsl:when>
2668 </xsl:choose>
2670 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
2671 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
2672 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
2673 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
2674 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
2675 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
2676 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
2677 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
2678 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
2679 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2680 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
2681 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
2682 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
2683 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
2684 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
2685 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
2686 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
2687 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
2688 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
2689 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
2690 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
2691 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
2692 </xsl:template>
2694 <xsl:template name="sect2.titlepage.verso">
2695 </xsl:template>
2697 <xsl:template name="sect2.titlepage.separator">
2698 </xsl:template>
2700 <xsl:template name="sect2.titlepage.before.recto">
2701 </xsl:template>
2703 <xsl:template name="sect2.titlepage.before.verso">
2704 </xsl:template>
2706 <xsl:template name="sect2.titlepage">
2707 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2708 <xsl:variable name="recto.content">
2709 <xsl:call-template name="sect2.titlepage.before.recto"/>
2710 <xsl:call-template name="sect2.titlepage.recto"/>
2711 </xsl:variable>
2712 <xsl:variable name="recto.elements.count">
2713 <xsl:choose>
2714 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2715 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2716 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2717 <xsl:otherwise>1</xsl:otherwise>
2718 </xsl:choose>
2719 </xsl:variable>
2720 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2721 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2722 </xsl:if>
2723 <xsl:variable name="verso.content">
2724 <xsl:call-template name="sect2.titlepage.before.verso"/>
2725 <xsl:call-template name="sect2.titlepage.verso"/>
2726 </xsl:variable>
2727 <xsl:variable name="verso.elements.count">
2728 <xsl:choose>
2729 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2730 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2731 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2732 <xsl:otherwise>1</xsl:otherwise>
2733 </xsl:choose>
2734 </xsl:variable>
2735 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2736 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2737 </xsl:if>
2738 <xsl:call-template name="sect2.titlepage.separator"/>
2739 </fo:block>
2740 </xsl:template>
2742 <xsl:template match="*" mode="sect2.titlepage.recto.mode">
2743 <!-- if an element isn't found in this mode, -->
2744 <!-- try the generic titlepage.mode -->
2745 <xsl:apply-templates select="." mode="titlepage.mode"/>
2746 </xsl:template>
2748 <xsl:template match="*" mode="sect2.titlepage.verso.mode">
2749 <!-- if an element isn't found in this mode, -->
2750 <!-- try the generic titlepage.mode -->
2751 <xsl:apply-templates select="." mode="titlepage.mode"/>
2752 </xsl:template>
2754 <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
2755 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2756 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2757 </fo:block>
2758 </xsl:template>
2760 <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
2761 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
2762 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2763 </fo:block>
2764 </xsl:template>
2766 <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
2767 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2768 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2769 </fo:block>
2770 </xsl:template>
2772 <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
2773 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2774 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2775 </fo:block>
2776 </xsl:template>
2778 <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
2779 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2780 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2781 </fo:block>
2782 </xsl:template>
2784 <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
2785 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2786 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2787 </fo:block>
2788 </xsl:template>
2790 <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
2791 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2792 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2793 </fo:block>
2794 </xsl:template>
2796 <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
2797 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2798 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2799 </fo:block>
2800 </xsl:template>
2802 <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
2803 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2804 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2805 </fo:block>
2806 </xsl:template>
2808 <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
2809 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2810 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2811 </fo:block>
2812 </xsl:template>
2814 <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
2815 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2816 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2817 </fo:block>
2818 </xsl:template>
2820 <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
2821 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2822 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2823 </fo:block>
2824 </xsl:template>
2826 <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
2827 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2828 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2829 </fo:block>
2830 </xsl:template>
2832 <xsl:template name="sect3.titlepage.recto">
2833 <xsl:choose>
2834 <xsl:when test="sect3info/title">
2835 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
2836 </xsl:when>
2837 <xsl:when test="info/title">
2838 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
2839 </xsl:when>
2840 <xsl:when test="title">
2841 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
2842 </xsl:when>
2843 </xsl:choose>
2845 <xsl:choose>
2846 <xsl:when test="sect3info/subtitle">
2847 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
2848 </xsl:when>
2849 <xsl:when test="info/subtitle">
2850 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
2851 </xsl:when>
2852 <xsl:when test="subtitle">
2853 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
2854 </xsl:when>
2855 </xsl:choose>
2857 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
2858 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
2859 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
2860 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
2861 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
2862 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
2863 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
2864 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
2865 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
2866 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2867 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
2868 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
2869 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
2870 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
2871 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
2872 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
2873 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
2874 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
2875 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
2876 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
2877 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
2878 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
2879 </xsl:template>
2881 <xsl:template name="sect3.titlepage.verso">
2882 </xsl:template>
2884 <xsl:template name="sect3.titlepage.separator">
2885 </xsl:template>
2887 <xsl:template name="sect3.titlepage.before.recto">
2888 </xsl:template>
2890 <xsl:template name="sect3.titlepage.before.verso">
2891 </xsl:template>
2893 <xsl:template name="sect3.titlepage">
2894 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2895 <xsl:variable name="recto.content">
2896 <xsl:call-template name="sect3.titlepage.before.recto"/>
2897 <xsl:call-template name="sect3.titlepage.recto"/>
2898 </xsl:variable>
2899 <xsl:variable name="recto.elements.count">
2900 <xsl:choose>
2901 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2902 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2903 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2904 <xsl:otherwise>1</xsl:otherwise>
2905 </xsl:choose>
2906 </xsl:variable>
2907 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2908 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2909 </xsl:if>
2910 <xsl:variable name="verso.content">
2911 <xsl:call-template name="sect3.titlepage.before.verso"/>
2912 <xsl:call-template name="sect3.titlepage.verso"/>
2913 </xsl:variable>
2914 <xsl:variable name="verso.elements.count">
2915 <xsl:choose>
2916 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2917 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2918 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2919 <xsl:otherwise>1</xsl:otherwise>
2920 </xsl:choose>
2921 </xsl:variable>
2922 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2923 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2924 </xsl:if>
2925 <xsl:call-template name="sect3.titlepage.separator"/>
2926 </fo:block>
2927 </xsl:template>
2929 <xsl:template match="*" mode="sect3.titlepage.recto.mode">
2930 <!-- if an element isn't found in this mode, -->
2931 <!-- try the generic titlepage.mode -->
2932 <xsl:apply-templates select="." mode="titlepage.mode"/>
2933 </xsl:template>
2935 <xsl:template match="*" mode="sect3.titlepage.verso.mode">
2936 <!-- if an element isn't found in this mode, -->
2937 <!-- try the generic titlepage.mode -->
2938 <xsl:apply-templates select="." mode="titlepage.mode"/>
2939 </xsl:template>
2941 <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
2942 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2943 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2944 </fo:block>
2945 </xsl:template>
2947 <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
2948 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
2949 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2950 </fo:block>
2951 </xsl:template>
2953 <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
2954 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2955 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2956 </fo:block>
2957 </xsl:template>
2959 <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
2960 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2961 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2962 </fo:block>
2963 </xsl:template>
2965 <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
2966 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2967 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2968 </fo:block>
2969 </xsl:template>
2971 <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
2972 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2973 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2974 </fo:block>
2975 </xsl:template>
2977 <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
2978 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2979 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2980 </fo:block>
2981 </xsl:template>
2983 <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
2984 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2985 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2986 </fo:block>
2987 </xsl:template>
2989 <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
2990 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2991 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2992 </fo:block>
2993 </xsl:template>
2995 <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
2996 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
2997 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2998 </fo:block>
2999 </xsl:template>
3001 <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
3002 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3003 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3004 </fo:block>
3005 </xsl:template>
3007 <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
3008 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3009 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3010 </fo:block>
3011 </xsl:template>
3013 <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
3014 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3015 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3016 </fo:block>
3017 </xsl:template>
3019 <xsl:template name="sect4.titlepage.recto">
3020 <xsl:choose>
3021 <xsl:when test="sect4info/title">
3022 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
3023 </xsl:when>
3024 <xsl:when test="info/title">
3025 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
3026 </xsl:when>
3027 <xsl:when test="title">
3028 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
3029 </xsl:when>
3030 </xsl:choose>
3032 <xsl:choose>
3033 <xsl:when test="sect4info/subtitle">
3034 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
3035 </xsl:when>
3036 <xsl:when test="info/subtitle">
3037 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
3038 </xsl:when>
3039 <xsl:when test="subtitle">
3040 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
3041 </xsl:when>
3042 </xsl:choose>
3044 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
3045 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
3046 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
3047 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
3048 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
3049 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
3050 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
3051 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
3052 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
3053 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3054 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
3055 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
3056 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
3057 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
3058 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
3059 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
3060 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
3061 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
3062 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
3063 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
3064 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
3065 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
3066 </xsl:template>
3068 <xsl:template name="sect4.titlepage.verso">
3069 </xsl:template>
3071 <xsl:template name="sect4.titlepage.separator">
3072 </xsl:template>
3074 <xsl:template name="sect4.titlepage.before.recto">
3075 </xsl:template>
3077 <xsl:template name="sect4.titlepage.before.verso">
3078 </xsl:template>
3080 <xsl:template name="sect4.titlepage">
3081 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3082 <xsl:variable name="recto.content">
3083 <xsl:call-template name="sect4.titlepage.before.recto"/>
3084 <xsl:call-template name="sect4.titlepage.recto"/>
3085 </xsl:variable>
3086 <xsl:variable name="recto.elements.count">
3087 <xsl:choose>
3088 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3089 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3090 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3091 <xsl:otherwise>1</xsl:otherwise>
3092 </xsl:choose>
3093 </xsl:variable>
3094 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3095 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3096 </xsl:if>
3097 <xsl:variable name="verso.content">
3098 <xsl:call-template name="sect4.titlepage.before.verso"/>
3099 <xsl:call-template name="sect4.titlepage.verso"/>
3100 </xsl:variable>
3101 <xsl:variable name="verso.elements.count">
3102 <xsl:choose>
3103 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3104 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3105 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3106 <xsl:otherwise>1</xsl:otherwise>
3107 </xsl:choose>
3108 </xsl:variable>
3109 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3110 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3111 </xsl:if>
3112 <xsl:call-template name="sect4.titlepage.separator"/>
3113 </fo:block>
3114 </xsl:template>
3116 <xsl:template match="*" mode="sect4.titlepage.recto.mode">
3117 <!-- if an element isn't found in this mode, -->
3118 <!-- try the generic titlepage.mode -->
3119 <xsl:apply-templates select="." mode="titlepage.mode"/>
3120 </xsl:template>
3122 <xsl:template match="*" mode="sect4.titlepage.verso.mode">
3123 <!-- if an element isn't found in this mode, -->
3124 <!-- try the generic titlepage.mode -->
3125 <xsl:apply-templates select="." mode="titlepage.mode"/>
3126 </xsl:template>
3128 <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
3129 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3130 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3131 </fo:block>
3132 </xsl:template>
3134 <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
3135 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
3136 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3137 </fo:block>
3138 </xsl:template>
3140 <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
3141 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3142 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3143 </fo:block>
3144 </xsl:template>
3146 <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
3147 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3148 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3149 </fo:block>
3150 </xsl:template>
3152 <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
3153 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3154 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3155 </fo:block>
3156 </xsl:template>
3158 <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
3159 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3160 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3161 </fo:block>
3162 </xsl:template>
3164 <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
3165 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3166 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3167 </fo:block>
3168 </xsl:template>
3170 <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
3171 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3172 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3173 </fo:block>
3174 </xsl:template>
3176 <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
3177 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3178 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3179 </fo:block>
3180 </xsl:template>
3182 <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
3183 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3184 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3185 </fo:block>
3186 </xsl:template>
3188 <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
3189 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3190 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3191 </fo:block>
3192 </xsl:template>
3194 <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
3195 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3196 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3197 </fo:block>
3198 </xsl:template>
3200 <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
3201 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3202 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3203 </fo:block>
3204 </xsl:template>
3206 <xsl:template name="sect5.titlepage.recto">
3207 <xsl:choose>
3208 <xsl:when test="sect5info/title">
3209 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
3210 </xsl:when>
3211 <xsl:when test="info/title">
3212 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
3213 </xsl:when>
3214 <xsl:when test="title">
3215 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
3216 </xsl:when>
3217 </xsl:choose>
3219 <xsl:choose>
3220 <xsl:when test="sect5info/subtitle">
3221 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
3222 </xsl:when>
3223 <xsl:when test="info/subtitle">
3224 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
3225 </xsl:when>
3226 <xsl:when test="subtitle">
3227 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
3228 </xsl:when>
3229 </xsl:choose>
3231 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
3232 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
3233 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
3234 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
3235 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
3236 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
3237 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
3238 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
3239 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
3240 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3241 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
3242 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
3243 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
3244 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
3245 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
3246 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
3247 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
3248 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
3249 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
3250 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
3251 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
3252 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
3253 </xsl:template>
3255 <xsl:template name="sect5.titlepage.verso">
3256 </xsl:template>
3258 <xsl:template name="sect5.titlepage.separator">
3259 </xsl:template>
3261 <xsl:template name="sect5.titlepage.before.recto">
3262 </xsl:template>
3264 <xsl:template name="sect5.titlepage.before.verso">
3265 </xsl:template>
3267 <xsl:template name="sect5.titlepage">
3268 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3269 <xsl:variable name="recto.content">
3270 <xsl:call-template name="sect5.titlepage.before.recto"/>
3271 <xsl:call-template name="sect5.titlepage.recto"/>
3272 </xsl:variable>
3273 <xsl:variable name="recto.elements.count">
3274 <xsl:choose>
3275 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3276 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3277 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3278 <xsl:otherwise>1</xsl:otherwise>
3279 </xsl:choose>
3280 </xsl:variable>
3281 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3282 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3283 </xsl:if>
3284 <xsl:variable name="verso.content">
3285 <xsl:call-template name="sect5.titlepage.before.verso"/>
3286 <xsl:call-template name="sect5.titlepage.verso"/>
3287 </xsl:variable>
3288 <xsl:variable name="verso.elements.count">
3289 <xsl:choose>
3290 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3291 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3292 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3293 <xsl:otherwise>1</xsl:otherwise>
3294 </xsl:choose>
3295 </xsl:variable>
3296 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3297 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3298 </xsl:if>
3299 <xsl:call-template name="sect5.titlepage.separator"/>
3300 </fo:block>
3301 </xsl:template>
3303 <xsl:template match="*" mode="sect5.titlepage.recto.mode">
3304 <!-- if an element isn't found in this mode, -->
3305 <!-- try the generic titlepage.mode -->
3306 <xsl:apply-templates select="." mode="titlepage.mode"/>
3307 </xsl:template>
3309 <xsl:template match="*" mode="sect5.titlepage.verso.mode">
3310 <!-- if an element isn't found in this mode, -->
3311 <!-- try the generic titlepage.mode -->
3312 <xsl:apply-templates select="." mode="titlepage.mode"/>
3313 </xsl:template>
3315 <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
3316 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3317 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3318 </fo:block>
3319 </xsl:template>
3321 <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
3322 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
3323 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3324 </fo:block>
3325 </xsl:template>
3327 <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
3328 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3329 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3330 </fo:block>
3331 </xsl:template>
3333 <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
3334 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3335 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3336 </fo:block>
3337 </xsl:template>
3339 <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
3340 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3341 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3342 </fo:block>
3343 </xsl:template>
3345 <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
3346 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3347 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3348 </fo:block>
3349 </xsl:template>
3351 <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3352 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3353 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3354 </fo:block>
3355 </xsl:template>
3357 <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
3358 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3359 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3360 </fo:block>
3361 </xsl:template>
3363 <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
3364 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3365 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3366 </fo:block>
3367 </xsl:template>
3369 <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
3370 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3371 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3372 </fo:block>
3373 </xsl:template>
3375 <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
3376 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3377 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3378 </fo:block>
3379 </xsl:template>
3381 <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
3382 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3383 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3384 </fo:block>
3385 </xsl:template>
3387 <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
3388 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3389 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3390 </fo:block>
3391 </xsl:template>
3393 <xsl:template name="simplesect.titlepage.recto">
3394 <xsl:choose>
3395 <xsl:when test="simplesectinfo/title">
3396 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
3397 </xsl:when>
3398 <xsl:when test="docinfo/title">
3399 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
3400 </xsl:when>
3401 <xsl:when test="info/title">
3402 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
3403 </xsl:when>
3404 <xsl:when test="title">
3405 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
3406 </xsl:when>
3407 </xsl:choose>
3409 <xsl:choose>
3410 <xsl:when test="simplesectinfo/subtitle">
3411 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
3412 </xsl:when>
3413 <xsl:when test="docinfo/subtitle">
3414 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3415 </xsl:when>
3416 <xsl:when test="info/subtitle">
3417 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
3418 </xsl:when>
3419 <xsl:when test="subtitle">
3420 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
3421 </xsl:when>
3422 </xsl:choose>
3424 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
3425 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3426 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
3427 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
3428 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3429 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
3430 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
3431 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
3432 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
3433 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
3434 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3435 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
3436 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
3437 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3438 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3439 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
3440 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3441 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
3442 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
3443 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3444 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
3445 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
3446 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3447 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
3448 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
3449 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
3450 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
3451 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
3452 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3453 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
3454 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
3455 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3456 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
3457 </xsl:template>
3459 <xsl:template name="simplesect.titlepage.verso">
3460 </xsl:template>
3462 <xsl:template name="simplesect.titlepage.separator">
3463 </xsl:template>
3465 <xsl:template name="simplesect.titlepage.before.recto">
3466 </xsl:template>
3468 <xsl:template name="simplesect.titlepage.before.verso">
3469 </xsl:template>
3471 <xsl:template name="simplesect.titlepage">
3472 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3473 <xsl:variable name="recto.content">
3474 <xsl:call-template name="simplesect.titlepage.before.recto"/>
3475 <xsl:call-template name="simplesect.titlepage.recto"/>
3476 </xsl:variable>
3477 <xsl:variable name="recto.elements.count">
3478 <xsl:choose>
3479 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3480 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3481 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3482 <xsl:otherwise>1</xsl:otherwise>
3483 </xsl:choose>
3484 </xsl:variable>
3485 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3486 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3487 </xsl:if>
3488 <xsl:variable name="verso.content">
3489 <xsl:call-template name="simplesect.titlepage.before.verso"/>
3490 <xsl:call-template name="simplesect.titlepage.verso"/>
3491 </xsl:variable>
3492 <xsl:variable name="verso.elements.count">
3493 <xsl:choose>
3494 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3495 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3496 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3497 <xsl:otherwise>1</xsl:otherwise>
3498 </xsl:choose>
3499 </xsl:variable>
3500 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3501 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3502 </xsl:if>
3503 <xsl:call-template name="simplesect.titlepage.separator"/>
3504 </fo:block>
3505 </xsl:template>
3507 <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
3508 <!-- if an element isn't found in this mode, -->
3509 <!-- try the generic titlepage.mode -->
3510 <xsl:apply-templates select="." mode="titlepage.mode"/>
3511 </xsl:template>
3513 <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
3514 <!-- if an element isn't found in this mode, -->
3515 <!-- try the generic titlepage.mode -->
3516 <xsl:apply-templates select="." mode="titlepage.mode"/>
3517 </xsl:template>
3519 <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
3520 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3521 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3522 </fo:block>
3523 </xsl:template>
3525 <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
3526 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
3527 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3528 </fo:block>
3529 </xsl:template>
3531 <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3532 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3533 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3534 </fo:block>
3535 </xsl:template>
3537 <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3538 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3539 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3540 </fo:block>
3541 </xsl:template>
3543 <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
3544 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3545 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3546 </fo:block>
3547 </xsl:template>
3549 <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
3550 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3551 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3552 </fo:block>
3553 </xsl:template>
3555 <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3556 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3557 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3558 </fo:block>
3559 </xsl:template>
3561 <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
3562 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3563 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3564 </fo:block>
3565 </xsl:template>
3567 <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3568 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3569 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3570 </fo:block>
3571 </xsl:template>
3573 <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
3574 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3575 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3576 </fo:block>
3577 </xsl:template>
3579 <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
3580 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3581 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3582 </fo:block>
3583 </xsl:template>
3585 <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
3586 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3587 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3588 </fo:block>
3589 </xsl:template>
3591 <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
3592 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3593 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3594 </fo:block>
3595 </xsl:template>
3597 <xsl:template name="bibliography.titlepage.recto">
3598 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
3599 <xsl:call-template name="component.title">
3600 <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
3601 </xsl:call-template></fo:block>
3602 <xsl:choose>
3603 <xsl:when test="bibliographyinfo/subtitle">
3604 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
3605 </xsl:when>
3606 <xsl:when test="docinfo/subtitle">
3607 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3608 </xsl:when>
3609 <xsl:when test="info/subtitle">
3610 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
3611 </xsl:when>
3612 <xsl:when test="subtitle">
3613 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
3614 </xsl:when>
3615 </xsl:choose>
3617 </xsl:template>
3619 <xsl:template name="bibliography.titlepage.verso">
3620 </xsl:template>
3622 <xsl:template name="bibliography.titlepage.separator">
3623 </xsl:template>
3625 <xsl:template name="bibliography.titlepage.before.recto">
3626 </xsl:template>
3628 <xsl:template name="bibliography.titlepage.before.verso">
3629 </xsl:template>
3631 <xsl:template name="bibliography.titlepage">
3632 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3633 <xsl:variable name="recto.content">
3634 <xsl:call-template name="bibliography.titlepage.before.recto"/>
3635 <xsl:call-template name="bibliography.titlepage.recto"/>
3636 </xsl:variable>
3637 <xsl:variable name="recto.elements.count">
3638 <xsl:choose>
3639 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3640 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3641 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3642 <xsl:otherwise>1</xsl:otherwise>
3643 </xsl:choose>
3644 </xsl:variable>
3645 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3646 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3647 </xsl:if>
3648 <xsl:variable name="verso.content">
3649 <xsl:call-template name="bibliography.titlepage.before.verso"/>
3650 <xsl:call-template name="bibliography.titlepage.verso"/>
3651 </xsl:variable>
3652 <xsl:variable name="verso.elements.count">
3653 <xsl:choose>
3654 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3655 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3656 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3657 <xsl:otherwise>1</xsl:otherwise>
3658 </xsl:choose>
3659 </xsl:variable>
3660 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3661 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3662 </xsl:if>
3663 <xsl:call-template name="bibliography.titlepage.separator"/>
3664 </fo:block>
3665 </xsl:template>
3667 <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
3668 <!-- if an element isn't found in this mode, -->
3669 <!-- try the generic titlepage.mode -->
3670 <xsl:apply-templates select="." mode="titlepage.mode"/>
3671 </xsl:template>
3673 <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
3674 <!-- if an element isn't found in this mode, -->
3675 <!-- try the generic titlepage.mode -->
3676 <xsl:apply-templates select="." mode="titlepage.mode"/>
3677 </xsl:template>
3679 <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
3680 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
3681 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
3682 </fo:block>
3683 </xsl:template>
3685 <xsl:template name="bibliodiv.titlepage.recto">
3686 <xsl:choose>
3687 <xsl:when test="bibliodivinfo/title">
3688 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
3689 </xsl:when>
3690 <xsl:when test="docinfo/title">
3691 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
3692 </xsl:when>
3693 <xsl:when test="info/title">
3694 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
3695 </xsl:when>
3696 <xsl:when test="title">
3697 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
3698 </xsl:when>
3699 </xsl:choose>
3701 <xsl:choose>
3702 <xsl:when test="bibliodivinfo/subtitle">
3703 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
3704 </xsl:when>
3705 <xsl:when test="docinfo/subtitle">
3706 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3707 </xsl:when>
3708 <xsl:when test="info/subtitle">
3709 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
3710 </xsl:when>
3711 <xsl:when test="subtitle">
3712 <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
3713 </xsl:when>
3714 </xsl:choose>
3716 </xsl:template>
3718 <xsl:template name="bibliodiv.titlepage.verso">
3719 </xsl:template>
3721 <xsl:template name="bibliodiv.titlepage.separator">
3722 </xsl:template>
3724 <xsl:template name="bibliodiv.titlepage.before.recto">
3725 </xsl:template>
3727 <xsl:template name="bibliodiv.titlepage.before.verso">
3728 </xsl:template>
3730 <xsl:template name="bibliodiv.titlepage">
3731 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3732 <xsl:variable name="recto.content">
3733 <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
3734 <xsl:call-template name="bibliodiv.titlepage.recto"/>
3735 </xsl:variable>
3736 <xsl:variable name="recto.elements.count">
3737 <xsl:choose>
3738 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3739 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3740 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3741 <xsl:otherwise>1</xsl:otherwise>
3742 </xsl:choose>
3743 </xsl:variable>
3744 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3745 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3746 </xsl:if>
3747 <xsl:variable name="verso.content">
3748 <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
3749 <xsl:call-template name="bibliodiv.titlepage.verso"/>
3750 </xsl:variable>
3751 <xsl:variable name="verso.elements.count">
3752 <xsl:choose>
3753 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3754 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3755 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3756 <xsl:otherwise>1</xsl:otherwise>
3757 </xsl:choose>
3758 </xsl:variable>
3759 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3760 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3761 </xsl:if>
3762 <xsl:call-template name="bibliodiv.titlepage.separator"/>
3763 </fo:block>
3764 </xsl:template>
3766 <xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
3767 <!-- if an element isn't found in this mode, -->
3768 <!-- try the generic titlepage.mode -->
3769 <xsl:apply-templates select="." mode="titlepage.mode"/>
3770 </xsl:template>
3772 <xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
3773 <!-- if an element isn't found in this mode, -->
3774 <!-- try the generic titlepage.mode -->
3775 <xsl:apply-templates select="." mode="titlepage.mode"/>
3776 </xsl:template>
3778 <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
3779 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
3780 <xsl:call-template name="component.title">
3781 <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
3782 </xsl:call-template>
3783 </fo:block>
3784 </xsl:template>
3786 <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
3787 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
3788 <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
3789 </fo:block>
3790 </xsl:template>
3792 <xsl:template name="glossary.titlepage.recto">
3793 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
3794 <xsl:call-template name="component.title">
3795 <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
3796 </xsl:call-template></fo:block>
3797 <xsl:choose>
3798 <xsl:when test="glossaryinfo/subtitle">
3799 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
3800 </xsl:when>
3801 <xsl:when test="docinfo/subtitle">
3802 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3803 </xsl:when>
3804 <xsl:when test="info/subtitle">
3805 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
3806 </xsl:when>
3807 <xsl:when test="subtitle">
3808 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
3809 </xsl:when>
3810 </xsl:choose>
3812 </xsl:template>
3814 <xsl:template name="glossary.titlepage.verso">
3815 </xsl:template>
3817 <xsl:template name="glossary.titlepage.separator">
3818 </xsl:template>
3820 <xsl:template name="glossary.titlepage.before.recto">
3821 </xsl:template>
3823 <xsl:template name="glossary.titlepage.before.verso">
3824 </xsl:template>
3826 <xsl:template name="glossary.titlepage">
3827 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3828 <xsl:variable name="recto.content">
3829 <xsl:call-template name="glossary.titlepage.before.recto"/>
3830 <xsl:call-template name="glossary.titlepage.recto"/>
3831 </xsl:variable>
3832 <xsl:variable name="recto.elements.count">
3833 <xsl:choose>
3834 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3835 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3836 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3837 <xsl:otherwise>1</xsl:otherwise>
3838 </xsl:choose>
3839 </xsl:variable>
3840 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3841 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3842 </xsl:if>
3843 <xsl:variable name="verso.content">
3844 <xsl:call-template name="glossary.titlepage.before.verso"/>
3845 <xsl:call-template name="glossary.titlepage.verso"/>
3846 </xsl:variable>
3847 <xsl:variable name="verso.elements.count">
3848 <xsl:choose>
3849 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3850 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3851 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3852 <xsl:otherwise>1</xsl:otherwise>
3853 </xsl:choose>
3854 </xsl:variable>
3855 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3856 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3857 </xsl:if>
3858 <xsl:call-template name="glossary.titlepage.separator"/>
3859 </fo:block>
3860 </xsl:template>
3862 <xsl:template match="*" mode="glossary.titlepage.recto.mode">
3863 <!-- if an element isn't found in this mode, -->
3864 <!-- try the generic titlepage.mode -->
3865 <xsl:apply-templates select="." mode="titlepage.mode"/>
3866 </xsl:template>
3868 <xsl:template match="*" mode="glossary.titlepage.verso.mode">
3869 <!-- if an element isn't found in this mode, -->
3870 <!-- try the generic titlepage.mode -->
3871 <xsl:apply-templates select="." mode="titlepage.mode"/>
3872 </xsl:template>
3874 <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
3875 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
3876 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
3877 </fo:block>
3878 </xsl:template>
3880 <xsl:template name="glossdiv.titlepage.recto">
3881 <xsl:choose>
3882 <xsl:when test="glossdivinfo/title">
3883 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
3884 </xsl:when>
3885 <xsl:when test="docinfo/title">
3886 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
3887 </xsl:when>
3888 <xsl:when test="info/title">
3889 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
3890 </xsl:when>
3891 <xsl:when test="title">
3892 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
3893 </xsl:when>
3894 </xsl:choose>
3896 <xsl:choose>
3897 <xsl:when test="glossdivinfo/subtitle">
3898 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
3899 </xsl:when>
3900 <xsl:when test="docinfo/subtitle">
3901 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3902 </xsl:when>
3903 <xsl:when test="info/subtitle">
3904 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
3905 </xsl:when>
3906 <xsl:when test="subtitle">
3907 <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
3908 </xsl:when>
3909 </xsl:choose>
3911 </xsl:template>
3913 <xsl:template name="glossdiv.titlepage.verso">
3914 </xsl:template>
3916 <xsl:template name="glossdiv.titlepage.separator">
3917 </xsl:template>
3919 <xsl:template name="glossdiv.titlepage.before.recto">
3920 </xsl:template>
3922 <xsl:template name="glossdiv.titlepage.before.verso">
3923 </xsl:template>
3925 <xsl:template name="glossdiv.titlepage">
3926 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3927 <xsl:variable name="recto.content">
3928 <xsl:call-template name="glossdiv.titlepage.before.recto"/>
3929 <xsl:call-template name="glossdiv.titlepage.recto"/>
3930 </xsl:variable>
3931 <xsl:variable name="recto.elements.count">
3932 <xsl:choose>
3933 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3934 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3935 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3936 <xsl:otherwise>1</xsl:otherwise>
3937 </xsl:choose>
3938 </xsl:variable>
3939 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3940 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3941 </xsl:if>
3942 <xsl:variable name="verso.content">
3943 <xsl:call-template name="glossdiv.titlepage.before.verso"/>
3944 <xsl:call-template name="glossdiv.titlepage.verso"/>
3945 </xsl:variable>
3946 <xsl:variable name="verso.elements.count">
3947 <xsl:choose>
3948 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3949 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3950 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3951 <xsl:otherwise>1</xsl:otherwise>
3952 </xsl:choose>
3953 </xsl:variable>
3954 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3955 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3956 </xsl:if>
3957 <xsl:call-template name="glossdiv.titlepage.separator"/>
3958 </fo:block>
3959 </xsl:template>
3961 <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
3962 <!-- if an element isn't found in this mode, -->
3963 <!-- try the generic titlepage.mode -->
3964 <xsl:apply-templates select="." mode="titlepage.mode"/>
3965 </xsl:template>
3967 <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
3968 <!-- if an element isn't found in this mode, -->
3969 <!-- try the generic titlepage.mode -->
3970 <xsl:apply-templates select="." mode="titlepage.mode"/>
3971 </xsl:template>
3973 <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
3974 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
3975 <xsl:call-template name="component.title">
3976 <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
3977 </xsl:call-template>
3978 </fo:block>
3979 </xsl:template>
3981 <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
3982 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
3983 <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
3984 </fo:block>
3985 </xsl:template>
3987 <xsl:template name="index.titlepage.recto">
3988 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
3989 <xsl:call-template name="component.title">
3990 <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
3991 <xsl:with-param name="pagewide" select="1"/>
3992 </xsl:call-template></fo:block>
3993 <xsl:choose>
3994 <xsl:when test="indexinfo/subtitle">
3995 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
3996 </xsl:when>
3997 <xsl:when test="docinfo/subtitle">
3998 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3999 </xsl:when>
4000 <xsl:when test="info/subtitle">
4001 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
4002 </xsl:when>
4003 <xsl:when test="subtitle">
4004 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
4005 </xsl:when>
4006 </xsl:choose>
4008 </xsl:template>
4010 <xsl:template name="index.titlepage.verso">
4011 </xsl:template>
4013 <xsl:template name="index.titlepage.separator">
4014 </xsl:template>
4016 <xsl:template name="index.titlepage.before.recto">
4017 </xsl:template>
4019 <xsl:template name="index.titlepage.before.verso">
4020 </xsl:template>
4022 <xsl:template name="index.titlepage">
4023 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4024 <xsl:variable name="recto.content">
4025 <xsl:call-template name="index.titlepage.before.recto"/>
4026 <xsl:call-template name="index.titlepage.recto"/>
4027 </xsl:variable>
4028 <xsl:variable name="recto.elements.count">
4029 <xsl:choose>
4030 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4031 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4032 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4033 <xsl:otherwise>1</xsl:otherwise>
4034 </xsl:choose>
4035 </xsl:variable>
4036 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4037 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4038 </xsl:if>
4039 <xsl:variable name="verso.content">
4040 <xsl:call-template name="index.titlepage.before.verso"/>
4041 <xsl:call-template name="index.titlepage.verso"/>
4042 </xsl:variable>
4043 <xsl:variable name="verso.elements.count">
4044 <xsl:choose>
4045 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4046 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4047 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4048 <xsl:otherwise>1</xsl:otherwise>
4049 </xsl:choose>
4050 </xsl:variable>
4051 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4052 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4053 </xsl:if>
4054 <xsl:call-template name="index.titlepage.separator"/>
4055 </fo:block>
4056 </xsl:template>
4058 <xsl:template match="*" mode="index.titlepage.recto.mode">
4059 <!-- if an element isn't found in this mode, -->
4060 <!-- try the generic titlepage.mode -->
4061 <xsl:apply-templates select="." mode="titlepage.mode"/>
4062 </xsl:template>
4064 <xsl:template match="*" mode="index.titlepage.verso.mode">
4065 <!-- if an element isn't found in this mode, -->
4066 <!-- try the generic titlepage.mode -->
4067 <xsl:apply-templates select="." mode="titlepage.mode"/>
4068 </xsl:template>
4070 <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
4071 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
4072 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
4073 </fo:block>
4074 </xsl:template>
4076 <xsl:template name="indexdiv.titlepage.recto">
4077 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
4078 <xsl:call-template name="indexdiv.title">
4079 <xsl:with-param name="title" select="title"/>
4080 </xsl:call-template></fo:block>
4081 <xsl:choose>
4082 <xsl:when test="indexdivinfo/subtitle">
4083 <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
4084 </xsl:when>
4085 <xsl:when test="docinfo/subtitle">
4086 <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4087 </xsl:when>
4088 <xsl:when test="info/subtitle">
4089 <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4090 </xsl:when>
4091 <xsl:when test="subtitle">
4092 <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
4093 </xsl:when>
4094 </xsl:choose>
4096 </xsl:template>
4098 <xsl:template name="indexdiv.titlepage.verso">
4099 </xsl:template>
4101 <xsl:template name="indexdiv.titlepage.separator">
4102 </xsl:template>
4104 <xsl:template name="indexdiv.titlepage.before.recto">
4105 </xsl:template>
4107 <xsl:template name="indexdiv.titlepage.before.verso">
4108 </xsl:template>
4110 <xsl:template name="indexdiv.titlepage">
4111 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4112 <xsl:variable name="recto.content">
4113 <xsl:call-template name="indexdiv.titlepage.before.recto"/>
4114 <xsl:call-template name="indexdiv.titlepage.recto"/>
4115 </xsl:variable>
4116 <xsl:variable name="recto.elements.count">
4117 <xsl:choose>
4118 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4119 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4120 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4121 <xsl:otherwise>1</xsl:otherwise>
4122 </xsl:choose>
4123 </xsl:variable>
4124 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4125 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4126 </xsl:if>
4127 <xsl:variable name="verso.content">
4128 <xsl:call-template name="indexdiv.titlepage.before.verso"/>
4129 <xsl:call-template name="indexdiv.titlepage.verso"/>
4130 </xsl:variable>
4131 <xsl:variable name="verso.elements.count">
4132 <xsl:choose>
4133 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4134 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4135 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4136 <xsl:otherwise>1</xsl:otherwise>
4137 </xsl:choose>
4138 </xsl:variable>
4139 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4140 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4141 </xsl:if>
4142 <xsl:call-template name="indexdiv.titlepage.separator"/>
4143 </fo:block>
4144 </xsl:template>
4146 <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
4147 <!-- if an element isn't found in this mode, -->
4148 <!-- try the generic titlepage.mode -->
4149 <xsl:apply-templates select="." mode="titlepage.mode"/>
4150 </xsl:template>
4152 <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
4153 <!-- if an element isn't found in this mode, -->
4154 <!-- try the generic titlepage.mode -->
4155 <xsl:apply-templates select="." mode="titlepage.mode"/>
4156 </xsl:template>
4158 <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
4159 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
4160 <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
4161 </fo:block>
4162 </xsl:template>
4164 <xsl:template name="setindex.titlepage.recto">
4165 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4166 <xsl:call-template name="component.title">
4167 <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
4168 <xsl:with-param name="pagewide" select="1"/>
4169 </xsl:call-template></fo:block>
4170 <xsl:choose>
4171 <xsl:when test="setindexinfo/subtitle">
4172 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
4173 </xsl:when>
4174 <xsl:when test="docinfo/subtitle">
4175 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4176 </xsl:when>
4177 <xsl:when test="info/subtitle">
4178 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
4179 </xsl:when>
4180 <xsl:when test="subtitle">
4181 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
4182 </xsl:when>
4183 </xsl:choose>
4185 </xsl:template>
4187 <xsl:template name="setindex.titlepage.verso">
4188 </xsl:template>
4190 <xsl:template name="setindex.titlepage.separator">
4191 </xsl:template>
4193 <xsl:template name="setindex.titlepage.before.recto">
4194 </xsl:template>
4196 <xsl:template name="setindex.titlepage.before.verso">
4197 </xsl:template>
4199 <xsl:template name="setindex.titlepage">
4200 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4201 <xsl:variable name="recto.content">
4202 <xsl:call-template name="setindex.titlepage.before.recto"/>
4203 <xsl:call-template name="setindex.titlepage.recto"/>
4204 </xsl:variable>
4205 <xsl:variable name="recto.elements.count">
4206 <xsl:choose>
4207 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4208 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4209 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4210 <xsl:otherwise>1</xsl:otherwise>
4211 </xsl:choose>
4212 </xsl:variable>
4213 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4214 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4215 </xsl:if>
4216 <xsl:variable name="verso.content">
4217 <xsl:call-template name="setindex.titlepage.before.verso"/>
4218 <xsl:call-template name="setindex.titlepage.verso"/>
4219 </xsl:variable>
4220 <xsl:variable name="verso.elements.count">
4221 <xsl:choose>
4222 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4223 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4224 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4225 <xsl:otherwise>1</xsl:otherwise>
4226 </xsl:choose>
4227 </xsl:variable>
4228 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4229 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4230 </xsl:if>
4231 <xsl:call-template name="setindex.titlepage.separator"/>
4232 </fo:block>
4233 </xsl:template>
4235 <xsl:template match="*" mode="setindex.titlepage.recto.mode">
4236 <!-- if an element isn't found in this mode, -->
4237 <!-- try the generic titlepage.mode -->
4238 <xsl:apply-templates select="." mode="titlepage.mode"/>
4239 </xsl:template>
4241 <xsl:template match="*" mode="setindex.titlepage.verso.mode">
4242 <!-- if an element isn't found in this mode, -->
4243 <!-- try the generic titlepage.mode -->
4244 <xsl:apply-templates select="." mode="titlepage.mode"/>
4245 </xsl:template>
4247 <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
4248 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
4249 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
4250 </fo:block>
4251 </xsl:template>
4253 <xsl:template name="colophon.titlepage.recto">
4254 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4255 <xsl:call-template name="component.title">
4256 <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
4257 </xsl:call-template></fo:block>
4258 <xsl:choose>
4259 <xsl:when test="colophoninfo/subtitle">
4260 <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
4261 </xsl:when>
4262 <xsl:when test="docinfo/subtitle">
4263 <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4264 </xsl:when>
4265 <xsl:when test="info/subtitle">
4266 <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
4267 </xsl:when>
4268 <xsl:when test="subtitle">
4269 <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
4270 </xsl:when>
4271 </xsl:choose>
4273 </xsl:template>
4275 <xsl:template name="colophon.titlepage.verso">
4276 </xsl:template>
4278 <xsl:template name="colophon.titlepage.separator">
4279 </xsl:template>
4281 <xsl:template name="colophon.titlepage.before.recto">
4282 </xsl:template>
4284 <xsl:template name="colophon.titlepage.before.verso">
4285 </xsl:template>
4287 <xsl:template name="colophon.titlepage">
4288 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4289 <xsl:variable name="recto.content">
4290 <xsl:call-template name="colophon.titlepage.before.recto"/>
4291 <xsl:call-template name="colophon.titlepage.recto"/>
4292 </xsl:variable>
4293 <xsl:variable name="recto.elements.count">
4294 <xsl:choose>
4295 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4296 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4297 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4298 <xsl:otherwise>1</xsl:otherwise>
4299 </xsl:choose>
4300 </xsl:variable>
4301 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4302 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4303 </xsl:if>
4304 <xsl:variable name="verso.content">
4305 <xsl:call-template name="colophon.titlepage.before.verso"/>
4306 <xsl:call-template name="colophon.titlepage.verso"/>
4307 </xsl:variable>
4308 <xsl:variable name="verso.elements.count">
4309 <xsl:choose>
4310 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4311 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4312 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4313 <xsl:otherwise>1</xsl:otherwise>
4314 </xsl:choose>
4315 </xsl:variable>
4316 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4317 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4318 </xsl:if>
4319 <xsl:call-template name="colophon.titlepage.separator"/>
4320 </fo:block>
4321 </xsl:template>
4323 <xsl:template match="*" mode="colophon.titlepage.recto.mode">
4324 <!-- if an element isn't found in this mode, -->
4325 <!-- try the generic titlepage.mode -->
4326 <xsl:apply-templates select="." mode="titlepage.mode"/>
4327 </xsl:template>
4329 <xsl:template match="*" mode="colophon.titlepage.verso.mode">
4330 <!-- if an element isn't found in this mode, -->
4331 <!-- try the generic titlepage.mode -->
4332 <xsl:apply-templates select="." mode="titlepage.mode"/>
4333 </xsl:template>
4335 <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
4336 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
4337 <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
4338 </fo:block>
4339 </xsl:template>
4341 <xsl:template name="sidebar.titlepage.recto">
4342 <xsl:choose>
4343 <xsl:when test="sidebarinfo/title">
4344 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
4345 </xsl:when>
4346 <xsl:when test="docinfo/title">
4347 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
4348 </xsl:when>
4349 <xsl:when test="info/title">
4350 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
4351 </xsl:when>
4352 <xsl:when test="title">
4353 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
4354 </xsl:when>
4355 </xsl:choose>
4357 <xsl:choose>
4358 <xsl:when test="sidebarinfo/subtitle">
4359 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
4360 </xsl:when>
4361 <xsl:when test="docinfo/subtitle">
4362 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4363 </xsl:when>
4364 <xsl:when test="info/subtitle">
4365 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
4366 </xsl:when>
4367 <xsl:when test="subtitle">
4368 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
4369 </xsl:when>
4370 </xsl:choose>
4372 </xsl:template>
4374 <xsl:template name="sidebar.titlepage.verso">
4375 </xsl:template>
4377 <xsl:template name="sidebar.titlepage.separator">
4378 </xsl:template>
4380 <xsl:template name="sidebar.titlepage.before.recto">
4381 </xsl:template>
4383 <xsl:template name="sidebar.titlepage.before.verso">
4384 </xsl:template>
4386 <xsl:template name="sidebar.titlepage">
4387 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4388 <xsl:variable name="recto.content">
4389 <xsl:call-template name="sidebar.titlepage.before.recto"/>
4390 <xsl:call-template name="sidebar.titlepage.recto"/>
4391 </xsl:variable>
4392 <xsl:variable name="recto.elements.count">
4393 <xsl:choose>
4394 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4395 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4396 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4397 <xsl:otherwise>1</xsl:otherwise>
4398 </xsl:choose>
4399 </xsl:variable>
4400 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4401 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4402 </xsl:if>
4403 <xsl:variable name="verso.content">
4404 <xsl:call-template name="sidebar.titlepage.before.verso"/>
4405 <xsl:call-template name="sidebar.titlepage.verso"/>
4406 </xsl:variable>
4407 <xsl:variable name="verso.elements.count">
4408 <xsl:choose>
4409 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4410 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4411 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4412 <xsl:otherwise>1</xsl:otherwise>
4413 </xsl:choose>
4414 </xsl:variable>
4415 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4416 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4417 </xsl:if>
4418 <xsl:call-template name="sidebar.titlepage.separator"/>
4419 </fo:block>
4420 </xsl:template>
4422 <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
4423 <!-- if an element isn't found in this mode, -->
4424 <!-- try the generic titlepage.mode -->
4425 <xsl:apply-templates select="." mode="titlepage.mode"/>
4426 </xsl:template>
4428 <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
4429 <!-- if an element isn't found in this mode, -->
4430 <!-- try the generic titlepage.mode -->
4431 <xsl:apply-templates select="." mode="titlepage.mode"/>
4432 </xsl:template>
4434 <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
4435 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold">
4436 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4437 </fo:block>
4438 </xsl:template>
4440 <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
4441 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
4442 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4443 </fo:block>
4444 </xsl:template>
4446 <xsl:template name="qandaset.titlepage.recto">
4447 <xsl:choose>
4448 <xsl:when test="qandasetinfo/title">
4449 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
4450 </xsl:when>
4451 <xsl:when test="blockinfo/title">
4452 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
4453 </xsl:when>
4454 <xsl:when test="info/title">
4455 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
4456 </xsl:when>
4457 <xsl:when test="title">
4458 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
4459 </xsl:when>
4460 </xsl:choose>
4462 <xsl:choose>
4463 <xsl:when test="qandasetinfo/subtitle">
4464 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
4465 </xsl:when>
4466 <xsl:when test="blockinfo/subtitle">
4467 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
4468 </xsl:when>
4469 <xsl:when test="info/subtitle">
4470 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
4471 </xsl:when>
4472 <xsl:when test="subtitle">
4473 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
4474 </xsl:when>
4475 </xsl:choose>
4477 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
4478 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
4479 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
4480 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
4481 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
4482 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
4483 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
4484 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
4485 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
4486 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
4487 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
4488 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
4489 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
4490 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
4491 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
4492 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
4493 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
4494 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
4495 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
4496 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
4497 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
4498 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
4499 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
4500 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
4501 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
4502 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
4503 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
4504 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
4505 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
4506 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
4507 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
4508 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
4509 <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
4510 </xsl:template>
4512 <xsl:template name="qandaset.titlepage.verso">
4513 </xsl:template>
4515 <xsl:template name="qandaset.titlepage.separator">
4516 </xsl:template>
4518 <xsl:template name="qandaset.titlepage.before.recto">
4519 </xsl:template>
4521 <xsl:template name="qandaset.titlepage.before.verso">
4522 </xsl:template>
4524 <xsl:template name="qandaset.titlepage">
4525 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
4526 <xsl:variable name="recto.content">
4527 <xsl:call-template name="qandaset.titlepage.before.recto"/>
4528 <xsl:call-template name="qandaset.titlepage.recto"/>
4529 </xsl:variable>
4530 <xsl:variable name="recto.elements.count">
4531 <xsl:choose>
4532 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4533 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4534 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4535 <xsl:otherwise>1</xsl:otherwise>
4536 </xsl:choose>
4537 </xsl:variable>
4538 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4539 <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
4540 </xsl:if>
4541 <xsl:variable name="verso.content">
4542 <xsl:call-template name="qandaset.titlepage.before.verso"/>
4543 <xsl:call-template name="qandaset.titlepage.verso"/>
4544 </xsl:variable>
4545 <xsl:variable name="verso.elements.count">
4546 <xsl:choose>
4547 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4548 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4549 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4550 <xsl:otherwise>1</xsl:otherwise>
4551 </xsl:choose>
4552 </xsl:variable>
4553 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4554 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4555 </xsl:if>
4556 <xsl:call-template name="qandaset.titlepage.separator"/>
4557 </fo:block>
4558 </xsl:template>
4560 <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
4561 <!-- if an element isn't found in this mode, -->
4562 <!-- try the generic titlepage.mode -->
4563 <xsl:apply-templates select="." mode="titlepage.mode"/>
4564 </xsl:template>
4566 <xsl:template match="*" mode="qandaset.titlepage.verso.mode">
4567 <!-- if an element isn't found in this mode, -->
4568 <!-- try the generic titlepage.mode -->
4569 <xsl:apply-templates select="." mode="titlepage.mode"/>
4570 </xsl:template>
4572 <xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
4573 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
4574 <xsl:call-template name="component.title">
4575 <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
4576 </xsl:call-template>
4577 </fo:block>
4578 </xsl:template>
4580 <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
4581 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
4582 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4583 </fo:block>
4584 </xsl:template>
4586 <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
4587 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
4588 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4589 </fo:block>
4590 </xsl:template>
4592 <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
4593 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
4594 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4595 </fo:block>
4596 </xsl:template>
4598 <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
4599 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
4600 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4601 </fo:block>
4602 </xsl:template>
4604 <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
4605 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4606 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4607 </fo:block>
4608 </xsl:template>
4610 <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
4611 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4612 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4613 </fo:block>
4614 </xsl:template>
4616 <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
4617 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4618 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4619 </fo:block>
4620 </xsl:template>
4622 <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
4623 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
4624 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4625 </fo:block>
4626 </xsl:template>
4628 <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
4629 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4630 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4631 </fo:block>
4632 </xsl:template>
4634 <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
4635 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4636 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4637 </fo:block>
4638 </xsl:template>
4640 <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
4641 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4642 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4643 </fo:block>
4644 </xsl:template>
4646 <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
4647 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
4648 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4649 </fo:block>
4650 </xsl:template>
4652 <xsl:template name="table.of.contents.titlepage.recto">
4653 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4654 <xsl:call-template name="gentext">
4655 <xsl:with-param name="key" select="'TableofContents'"/>
4656 </xsl:call-template></fo:block>
4657 </xsl:template>
4659 <xsl:template name="table.of.contents.titlepage.verso">
4660 </xsl:template>
4662 <xsl:template name="table.of.contents.titlepage.separator">
4663 </xsl:template>
4665 <xsl:template name="table.of.contents.titlepage.before.recto">
4666 </xsl:template>
4668 <xsl:template name="table.of.contents.titlepage.before.verso">
4669 </xsl:template>
4671 <xsl:template name="table.of.contents.titlepage">
4672 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4673 <xsl:variable name="recto.content">
4674 <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
4675 <xsl:call-template name="table.of.contents.titlepage.recto"/>
4676 </xsl:variable>
4677 <xsl:variable name="recto.elements.count">
4678 <xsl:choose>
4679 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4680 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4681 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4682 <xsl:otherwise>1</xsl:otherwise>
4683 </xsl:choose>
4684 </xsl:variable>
4685 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4686 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4687 </xsl:if>
4688 <xsl:variable name="verso.content">
4689 <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
4690 <xsl:call-template name="table.of.contents.titlepage.verso"/>
4691 </xsl:variable>
4692 <xsl:variable name="verso.elements.count">
4693 <xsl:choose>
4694 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4695 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4696 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4697 <xsl:otherwise>1</xsl:otherwise>
4698 </xsl:choose>
4699 </xsl:variable>
4700 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4701 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4702 </xsl:if>
4703 <xsl:call-template name="table.of.contents.titlepage.separator"/>
4704 </fo:block>
4706 </xsl:template>
4708 <xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
4709 <!-- if an element isn't found in this mode, -->
4710 <!-- try the generic titlepage.mode -->
4711 <xsl:apply-templates select="." mode="titlepage.mode"/>
4712 </xsl:template>
4714 <xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
4715 <!-- if an element isn't found in this mode, -->
4716 <!-- try the generic titlepage.mode -->
4717 <xsl:apply-templates select="." mode="titlepage.mode"/>
4718 </xsl:template>
4720 <xsl:template name="list.of.tables.titlepage.recto">
4721 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4722 <xsl:call-template name="gentext">
4723 <xsl:with-param name="key" select="'ListofTables'"/>
4724 </xsl:call-template></fo:block>
4725 </xsl:template>
4727 <xsl:template name="list.of.tables.titlepage.verso">
4728 </xsl:template>
4730 <xsl:template name="list.of.tables.titlepage.separator">
4731 </xsl:template>
4733 <xsl:template name="list.of.tables.titlepage.before.recto">
4734 </xsl:template>
4736 <xsl:template name="list.of.tables.titlepage.before.verso">
4737 </xsl:template>
4739 <xsl:template name="list.of.tables.titlepage">
4740 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4741 <xsl:variable name="recto.content">
4742 <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
4743 <xsl:call-template name="list.of.tables.titlepage.recto"/>
4744 </xsl:variable>
4745 <xsl:variable name="recto.elements.count">
4746 <xsl:choose>
4747 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4748 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4749 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4750 <xsl:otherwise>1</xsl:otherwise>
4751 </xsl:choose>
4752 </xsl:variable>
4753 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4754 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4755 </xsl:if>
4756 <xsl:variable name="verso.content">
4757 <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
4758 <xsl:call-template name="list.of.tables.titlepage.verso"/>
4759 </xsl:variable>
4760 <xsl:variable name="verso.elements.count">
4761 <xsl:choose>
4762 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4763 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4764 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4765 <xsl:otherwise>1</xsl:otherwise>
4766 </xsl:choose>
4767 </xsl:variable>
4768 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4769 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4770 </xsl:if>
4771 <xsl:call-template name="list.of.tables.titlepage.separator"/>
4772 </fo:block>
4773 </xsl:template>
4775 <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
4776 <!-- if an element isn't found in this mode, -->
4777 <!-- try the generic titlepage.mode -->
4778 <xsl:apply-templates select="." mode="titlepage.mode"/>
4779 </xsl:template>
4781 <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
4782 <!-- if an element isn't found in this mode, -->
4783 <!-- try the generic titlepage.mode -->
4784 <xsl:apply-templates select="." mode="titlepage.mode"/>
4785 </xsl:template>
4787 <xsl:template name="list.of.figures.titlepage.recto">
4788 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4789 <xsl:call-template name="gentext">
4790 <xsl:with-param name="key" select="'ListofFigures'"/>
4791 </xsl:call-template></fo:block>
4792 </xsl:template>
4794 <xsl:template name="list.of.figures.titlepage.verso">
4795 </xsl:template>
4797 <xsl:template name="list.of.figures.titlepage.separator">
4798 </xsl:template>
4800 <xsl:template name="list.of.figures.titlepage.before.recto">
4801 </xsl:template>
4803 <xsl:template name="list.of.figures.titlepage.before.verso">
4804 </xsl:template>
4806 <xsl:template name="list.of.figures.titlepage">
4807 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4808 <xsl:variable name="recto.content">
4809 <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
4810 <xsl:call-template name="list.of.figures.titlepage.recto"/>
4811 </xsl:variable>
4812 <xsl:variable name="recto.elements.count">
4813 <xsl:choose>
4814 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4815 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4816 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4817 <xsl:otherwise>1</xsl:otherwise>
4818 </xsl:choose>
4819 </xsl:variable>
4820 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4821 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4822 </xsl:if>
4823 <xsl:variable name="verso.content">
4824 <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
4825 <xsl:call-template name="list.of.figures.titlepage.verso"/>
4826 </xsl:variable>
4827 <xsl:variable name="verso.elements.count">
4828 <xsl:choose>
4829 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4830 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4831 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4832 <xsl:otherwise>1</xsl:otherwise>
4833 </xsl:choose>
4834 </xsl:variable>
4835 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4836 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4837 </xsl:if>
4838 <xsl:call-template name="list.of.figures.titlepage.separator"/>
4839 </fo:block>
4840 </xsl:template>
4842 <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
4843 <!-- if an element isn't found in this mode, -->
4844 <!-- try the generic titlepage.mode -->
4845 <xsl:apply-templates select="." mode="titlepage.mode"/>
4846 </xsl:template>
4848 <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
4849 <!-- if an element isn't found in this mode, -->
4850 <!-- try the generic titlepage.mode -->
4851 <xsl:apply-templates select="." mode="titlepage.mode"/>
4852 </xsl:template>
4854 <xsl:template name="list.of.examples.titlepage.recto">
4855 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4856 <xsl:call-template name="gentext">
4857 <xsl:with-param name="key" select="'ListofExamples'"/>
4858 </xsl:call-template></fo:block>
4859 </xsl:template>
4861 <xsl:template name="list.of.examples.titlepage.verso">
4862 </xsl:template>
4864 <xsl:template name="list.of.examples.titlepage.separator">
4865 </xsl:template>
4867 <xsl:template name="list.of.examples.titlepage.before.recto">
4868 </xsl:template>
4870 <xsl:template name="list.of.examples.titlepage.before.verso">
4871 </xsl:template>
4873 <xsl:template name="list.of.examples.titlepage">
4874 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4875 <xsl:variable name="recto.content">
4876 <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
4877 <xsl:call-template name="list.of.examples.titlepage.recto"/>
4878 </xsl:variable>
4879 <xsl:variable name="recto.elements.count">
4880 <xsl:choose>
4881 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4882 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4883 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4884 <xsl:otherwise>1</xsl:otherwise>
4885 </xsl:choose>
4886 </xsl:variable>
4887 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4888 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4889 </xsl:if>
4890 <xsl:variable name="verso.content">
4891 <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
4892 <xsl:call-template name="list.of.examples.titlepage.verso"/>
4893 </xsl:variable>
4894 <xsl:variable name="verso.elements.count">
4895 <xsl:choose>
4896 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4897 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4898 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4899 <xsl:otherwise>1</xsl:otherwise>
4900 </xsl:choose>
4901 </xsl:variable>
4902 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4903 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4904 </xsl:if>
4905 <xsl:call-template name="list.of.examples.titlepage.separator"/>
4906 </fo:block>
4907 </xsl:template>
4909 <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
4910 <!-- if an element isn't found in this mode, -->
4911 <!-- try the generic titlepage.mode -->
4912 <xsl:apply-templates select="." mode="titlepage.mode"/>
4913 </xsl:template>
4915 <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
4916 <!-- if an element isn't found in this mode, -->
4917 <!-- try the generic titlepage.mode -->
4918 <xsl:apply-templates select="." mode="titlepage.mode"/>
4919 </xsl:template>
4921 <xsl:template name="list.of.equations.titlepage.recto">
4922 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4923 <xsl:call-template name="gentext">
4924 <xsl:with-param name="key" select="'ListofEquations'"/>
4925 </xsl:call-template></fo:block>
4926 </xsl:template>
4928 <xsl:template name="list.of.equations.titlepage.verso">
4929 </xsl:template>
4931 <xsl:template name="list.of.equations.titlepage.separator">
4932 </xsl:template>
4934 <xsl:template name="list.of.equations.titlepage.before.recto">
4935 </xsl:template>
4937 <xsl:template name="list.of.equations.titlepage.before.verso">
4938 </xsl:template>
4940 <xsl:template name="list.of.equations.titlepage">
4941 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4942 <xsl:variable name="recto.content">
4943 <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
4944 <xsl:call-template name="list.of.equations.titlepage.recto"/>
4945 </xsl:variable>
4946 <xsl:variable name="recto.elements.count">
4947 <xsl:choose>
4948 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4949 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4950 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4951 <xsl:otherwise>1</xsl:otherwise>
4952 </xsl:choose>
4953 </xsl:variable>
4954 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4955 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4956 </xsl:if>
4957 <xsl:variable name="verso.content">
4958 <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
4959 <xsl:call-template name="list.of.equations.titlepage.verso"/>
4960 </xsl:variable>
4961 <xsl:variable name="verso.elements.count">
4962 <xsl:choose>
4963 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4964 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4965 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4966 <xsl:otherwise>1</xsl:otherwise>
4967 </xsl:choose>
4968 </xsl:variable>
4969 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4970 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4971 </xsl:if>
4972 <xsl:call-template name="list.of.equations.titlepage.separator"/>
4973 </fo:block>
4974 </xsl:template>
4976 <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
4977 <!-- if an element isn't found in this mode, -->
4978 <!-- try the generic titlepage.mode -->
4979 <xsl:apply-templates select="." mode="titlepage.mode"/>
4980 </xsl:template>
4982 <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
4983 <!-- if an element isn't found in this mode, -->
4984 <!-- try the generic titlepage.mode -->
4985 <xsl:apply-templates select="." mode="titlepage.mode"/>
4986 </xsl:template>
4988 <xsl:template name="list.of.procedures.titlepage.recto">
4989 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4990 <xsl:call-template name="gentext">
4991 <xsl:with-param name="key" select="'ListofProcedures'"/>
4992 </xsl:call-template></fo:block>
4993 </xsl:template>
4995 <xsl:template name="list.of.procedures.titlepage.verso">
4996 </xsl:template>
4998 <xsl:template name="list.of.procedures.titlepage.separator">
4999 </xsl:template>
5001 <xsl:template name="list.of.procedures.titlepage.before.recto">
5002 </xsl:template>
5004 <xsl:template name="list.of.procedures.titlepage.before.verso">
5005 </xsl:template>
5007 <xsl:template name="list.of.procedures.titlepage">
5008 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5009 <xsl:variable name="recto.content">
5010 <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
5011 <xsl:call-template name="list.of.procedures.titlepage.recto"/>
5012 </xsl:variable>
5013 <xsl:variable name="recto.elements.count">
5014 <xsl:choose>
5015 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5016 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5017 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5018 <xsl:otherwise>1</xsl:otherwise>
5019 </xsl:choose>
5020 </xsl:variable>
5021 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5022 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5023 </xsl:if>
5024 <xsl:variable name="verso.content">
5025 <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
5026 <xsl:call-template name="list.of.procedures.titlepage.verso"/>
5027 </xsl:variable>
5028 <xsl:variable name="verso.elements.count">
5029 <xsl:choose>
5030 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5031 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5032 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5033 <xsl:otherwise>1</xsl:otherwise>
5034 </xsl:choose>
5035 </xsl:variable>
5036 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5037 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5038 </xsl:if>
5039 <xsl:call-template name="list.of.procedures.titlepage.separator"/>
5040 </fo:block>
5041 </xsl:template>
5043 <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
5044 <!-- if an element isn't found in this mode, -->
5045 <!-- try the generic titlepage.mode -->
5046 <xsl:apply-templates select="." mode="titlepage.mode"/>
5047 </xsl:template>
5049 <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
5050 <!-- if an element isn't found in this mode, -->
5051 <!-- try the generic titlepage.mode -->
5052 <xsl:apply-templates select="." mode="titlepage.mode"/>
5053 </xsl:template>
5055 <xsl:template name="list.of.unknowns.titlepage.recto">
5056 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5057 <xsl:call-template name="gentext">
5058 <xsl:with-param name="key" select="'ListofUnknown'"/>
5059 </xsl:call-template></fo:block>
5060 </xsl:template>
5062 <xsl:template name="list.of.unknowns.titlepage.verso">
5063 </xsl:template>
5065 <xsl:template name="list.of.unknowns.titlepage.separator">
5066 </xsl:template>
5068 <xsl:template name="list.of.unknowns.titlepage.before.recto">
5069 </xsl:template>
5071 <xsl:template name="list.of.unknowns.titlepage.before.verso">
5072 </xsl:template>
5074 <xsl:template name="list.of.unknowns.titlepage">
5075 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5076 <xsl:variable name="recto.content">
5077 <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
5078 <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
5079 </xsl:variable>
5080 <xsl:variable name="recto.elements.count">
5081 <xsl:choose>
5082 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5083 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5084 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5085 <xsl:otherwise>1</xsl:otherwise>
5086 </xsl:choose>
5087 </xsl:variable>
5088 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5089 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5090 </xsl:if>
5091 <xsl:variable name="verso.content">
5092 <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
5093 <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
5094 </xsl:variable>
5095 <xsl:variable name="verso.elements.count">
5096 <xsl:choose>
5097 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5098 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5099 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5100 <xsl:otherwise>1</xsl:otherwise>
5101 </xsl:choose>
5102 </xsl:variable>
5103 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5104 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5105 </xsl:if>
5106 <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
5107 </fo:block>
5108 </xsl:template>
5110 <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
5111 <!-- if an element isn't found in this mode, -->
5112 <!-- try the generic titlepage.mode -->
5113 <xsl:apply-templates select="." mode="titlepage.mode"/>
5114 </xsl:template>
5116 <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
5117 <!-- if an element isn't found in this mode, -->
5118 <!-- try the generic titlepage.mode -->
5119 <xsl:apply-templates select="." mode="titlepage.mode"/>
5120 </xsl:template>
5123 <!-- special titlepage masters for SCons Titlepage style in books -->
5124 <xsl:template name="user.pagemasters">
5125 <!-- title pages -->
5126 <fo:simple-page-master master-name="scons-titlepage-first"
5127 page-width="{$page.width}"
5128 page-height="{$page.height}"
5129 margin-top="0mm"
5130 margin-bottom="0mm"
5131 margin-left="0mm"
5132 margin-right="0mm">
5133 <xsl:attribute name="margin-{$direction.align.start}" select="0mm"/>
5134 <xsl:attribute name="margin-{$direction.align.end}" select="0mm"/>
5135 <xsl:if test="$axf.extensions != 0">
5136 <xsl:call-template name="axf-page-master-properties">
5137 <xsl:with-param name="page.master">scons-titlepage-first</xsl:with-param>
5138 </xsl:call-template>
5139 </xsl:if>
5140 <fo:region-body margin-bottom="0mm"
5141 margin-top="0mm"
5142 column-gap="0mm"
5143 column-count="{$column.count.titlepage}"
5144 background-repeat="no-repeat"
5145 background-image="url(titlepage/mapnik_final_colors.svg)"
5146 background-position-vertical="center"
5147 background-position-horizontal="center">
5148 </fo:region-body>
5149 <fo:region-before region-name="xsl-region-before-first"
5150 extent="{$region.before.extent}"
5151 display-align="before"/>
5152 <fo:region-after region-name="xsl-region-after-first"
5153 extent="{$region.after.extent}"
5154 display-align="after"/>
5155 </fo:simple-page-master>
5157 <fo:simple-page-master master-name="scons-titlepage-odd"
5158 page-width="{$page.width}"
5159 page-height="{$page.height}"
5160 margin-top="{$page.margin.top}"
5161 margin-bottom="{$page.margin.bottom}">
5162 <xsl:attribute name="margin-{$direction.align.start}">
5163 <xsl:value-of select="$page.margin.outer"/>
5164 <xsl:if test="$fop.extensions != 0">
5165 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5166 </xsl:if>
5167 </xsl:attribute>
5168 <xsl:attribute name="margin-{$direction.align.end}">
5169 <xsl:value-of select="$page.margin.inner"/>
5170 </xsl:attribute>
5171 <xsl:if test="$axf.extensions != 0">
5172 <xsl:call-template name="axf-page-master-properties">
5173 <xsl:with-param name="page.master">scons-titlepage-odd</xsl:with-param>
5174 </xsl:call-template>
5175 </xsl:if>
5176 <fo:region-body margin-bottom="{$body.margin.bottom}"
5177 margin-top="{$body.margin.top}"
5178 column-gap="{$column.gap.titlepage}"
5179 column-count="{$column.count.titlepage}">
5180 </fo:region-body>
5181 <fo:region-before region-name="xsl-region-before-odd"
5182 extent="{$region.before.extent}"
5183 display-align="before"/>
5184 <fo:region-after region-name="xsl-region-after-odd"
5185 extent="{$region.after.extent}"
5186 display-align="after"/>
5187 </fo:simple-page-master>
5189 <fo:simple-page-master master-name="scons-titlepage-even"
5190 page-width="{$page.width}"
5191 page-height="{$page.height}"
5192 margin-top="{$page.margin.top}"
5193 margin-bottom="{$page.margin.bottom}">
5194 <xsl:attribute name="margin-{$direction.align.start}">
5195 <xsl:value-of select="$page.margin.outer"/>
5196 <xsl:if test="$fop.extensions != 0">
5197 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5198 </xsl:if>
5199 </xsl:attribute>
5200 <xsl:attribute name="margin-{$direction.align.end}">
5201 <xsl:value-of select="$page.margin.inner"/>
5202 </xsl:attribute>
5203 <xsl:if test="$axf.extensions != 0">
5204 <xsl:call-template name="axf-page-master-properties">
5205 <xsl:with-param name="page.master">scons-titlepage-even</xsl:with-param>
5206 </xsl:call-template>
5207 </xsl:if>
5208 <fo:region-body margin-bottom="{$body.margin.bottom}"
5209 margin-top="{$body.margin.top}"
5210 column-gap="{$column.gap.titlepage}"
5211 column-count="{$column.count.titlepage}">
5212 </fo:region-body>
5213 <fo:region-before region-name="xsl-region-before-even"
5214 extent="{$region.before.extent}"
5215 display-align="before"/>
5216 <fo:region-after region-name="xsl-region-after-even"
5217 extent="{$region.after.extent}"
5218 display-align="after"/>
5219 </fo:simple-page-master>
5221 <!-- chapter pages -->
5222 <fo:simple-page-master master-name="scons-chapter-first"
5223 page-width="{$page.width}"
5224 page-height="{$page.height}"
5225 margin-top="{$page.margin.top}"
5226 margin-bottom="{$page.margin.bottom}">
5227 <xsl:attribute name="margin-{$direction.align.start}">
5228 <xsl:value-of select="$page.margin.outer"/>
5229 <xsl:if test="$fop.extensions != 0">
5230 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5231 </xsl:if>
5232 </xsl:attribute>
5233 <xsl:attribute name="margin-{$direction.align.end}">
5234 <xsl:value-of select="$page.margin.inner"/>
5235 </xsl:attribute>
5236 <xsl:if test="$axf.extensions != 0">
5237 <xsl:call-template name="axf-page-master-properties">
5238 <xsl:with-param name="page.master">scons-chapter-first</xsl:with-param>
5239 </xsl:call-template>
5240 </xsl:if>
5241 <fo:region-body margin-bottom="{$body.margin.bottom}"
5242 margin-top="{$body.margin.top}"
5243 column-gap="{$column.gap.titlepage}"
5244 column-count="{$column.count.titlepage}">
5245 </fo:region-body>
5246 <fo:region-before region-name="xsl-region-before-first"
5247 extent="{$region.before.extent}"
5248 display-align="before"/>
5249 <fo:region-after region-name="xsl-region-after-first"
5250 extent="{$region.after.extent}"
5251 display-align="after"/>
5252 </fo:simple-page-master>
5254 <fo:simple-page-master master-name="scons-chapter-odd"
5255 page-width="{$page.width}"
5256 page-height="{$page.height}"
5257 margin-top="{$page.margin.top}"
5258 margin-bottom="{$page.margin.bottom}">
5259 <xsl:attribute name="margin-{$direction.align.start}">
5260 <xsl:value-of select="$page.margin.outer"/>
5261 <xsl:if test="$fop.extensions != 0">
5262 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5263 </xsl:if>
5264 </xsl:attribute>
5265 <xsl:attribute name="margin-{$direction.align.end}">
5266 <xsl:value-of select="$page.margin.inner"/>
5267 </xsl:attribute>
5268 <xsl:if test="$axf.extensions != 0">
5269 <xsl:call-template name="axf-page-master-properties">
5270 <xsl:with-param name="page.master">scons-chapter-odd</xsl:with-param>
5271 </xsl:call-template>
5272 </xsl:if>
5273 <fo:region-body margin-bottom="{$body.margin.bottom}"
5274 margin-top="{$body.margin.top}"
5275 column-gap="{$column.gap.body}"
5276 column-count="{$column.count.body}">
5277 </fo:region-body>
5278 <fo:region-before region-name="xsl-region-before-odd"
5279 extent="{$region.before.extent}"
5280 display-align="before"/>
5281 <fo:region-after region-name="xsl-region-after-odd"
5282 extent="{$region.after.extent}"
5283 display-align="after"/>
5284 </fo:simple-page-master>
5286 <fo:simple-page-master master-name="scons-chapter-even"
5287 page-width="{$page.width}"
5288 page-height="{$page.height}"
5289 margin-top="{$page.margin.top}"
5290 margin-bottom="{$page.margin.bottom}">
5291 <xsl:attribute name="margin-{$direction.align.start}">
5292 <xsl:value-of select="$page.margin.outer"/>
5293 <xsl:if test="$fop.extensions != 0">
5294 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5295 </xsl:if>
5296 </xsl:attribute>
5297 <xsl:attribute name="margin-{$direction.align.end}">
5298 <xsl:value-of select="$page.margin.inner"/>
5299 </xsl:attribute>
5300 <xsl:if test="$axf.extensions != 0">
5301 <xsl:call-template name="axf-page-master-properties">
5302 <xsl:with-param name="page.master">scons-chapter-even</xsl:with-param>
5303 </xsl:call-template>
5304 </xsl:if>
5305 <fo:region-body margin-bottom="{$body.margin.bottom}"
5306 margin-top="{$body.margin.top}"
5307 column-gap="{$column.gap.body}"
5308 column-count="{$column.count.body}">
5309 </fo:region-body>
5310 <fo:region-before region-name="xsl-region-before-even"
5311 extent="{$region.before.extent}"
5312 display-align="before"/>
5313 <fo:region-after region-name="xsl-region-after-even"
5314 extent="{$region.after.extent}"
5315 display-align="after"/>
5316 </fo:simple-page-master>
5318 <!-- definition of pagemasters for draft mode -->
5319 <xsl:if test="$draft.mode != 'no'">
5320 <!-- draft title pages -->
5321 <fo:simple-page-master master-name="scons-titlepage-first-draft"
5322 page-width="{$page.width}"
5323 page-height="{$page.height}"
5324 margin-top="{$page.margin.top}"
5325 margin-bottom="{$page.margin.bottom}">
5326 <xsl:attribute name="margin-{$direction.align.start}">
5327 <xsl:value-of select="$page.margin.outer"/>
5328 <xsl:if test="$fop.extensions != 0">
5329 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5330 </xsl:if>
5331 </xsl:attribute>
5332 <xsl:attribute name="margin-{$direction.align.end}">
5333 <xsl:value-of select="$page.margin.inner"/>
5334 </xsl:attribute>
5335 <xsl:if test="$axf.extensions != 0">
5336 <xsl:call-template name="axf-page-master-properties">
5337 <xsl:with-param name="page.master">scons-titlepage-first-draft</xsl:with-param>
5338 </xsl:call-template>
5339 </xsl:if>
5340 <fo:region-body margin-bottom="{$body.margin.bottom}"
5341 margin-top="{$body.margin.top}"
5342 column-gap="{$column.gap.titlepage}"
5343 column-count="{$column.count.titlepage}">
5344 <xsl:if test="$draft.watermark.image != ''">
5345 <xsl:attribute name="background-image">
5346 <xsl:call-template name="fo-external-image">
5347 <xsl:with-param name="filename" select="$draft.watermark.image"/>
5348 </xsl:call-template>
5349 </xsl:attribute>
5350 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
5351 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
5352 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
5353 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
5354 </xsl:if>
5355 </fo:region-body>
5356 <fo:region-before region-name="xsl-region-before-first"
5357 extent="{$region.before.extent}"
5358 display-align="before"/>
5359 <fo:region-after region-name="xsl-region-after-first"
5360 extent="{$region.after.extent}"
5361 display-align="after"/>
5362 </fo:simple-page-master>
5364 <fo:simple-page-master master-name="scons-titlepage-odd-draft"
5365 page-width="{$page.width}"
5366 page-height="{$page.height}"
5367 margin-top="{$page.margin.top}"
5368 margin-bottom="{$page.margin.bottom}">
5369 <xsl:attribute name="margin-{$direction.align.start}">
5370 <xsl:value-of select="$page.margin.outer"/>
5371 <xsl:if test="$fop.extensions != 0">
5372 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5373 </xsl:if>
5374 </xsl:attribute>
5375 <xsl:attribute name="margin-{$direction.align.end}">
5376 <xsl:value-of select="$page.margin.inner"/>
5377 </xsl:attribute>
5378 <xsl:if test="$axf.extensions != 0">
5379 <xsl:call-template name="axf-page-master-properties">
5380 <xsl:with-param name="page.master">scons-titlepage-odd-draft</xsl:with-param>
5381 </xsl:call-template>
5382 </xsl:if>
5383 <fo:region-body margin-bottom="{$body.margin.bottom}"
5384 margin-top="{$body.margin.top}"
5385 column-gap="{$column.gap.titlepage}"
5386 column-count="{$column.count.titlepage}">
5387 <xsl:if test="$draft.watermark.image != ''">
5388 <xsl:attribute name="background-image">
5389 <xsl:call-template name="fo-external-image">
5390 <xsl:with-param name="filename" select="$draft.watermark.image"/>
5391 </xsl:call-template>
5392 </xsl:attribute>
5393 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
5394 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
5395 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
5396 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
5397 </xsl:if>
5398 </fo:region-body>
5399 <fo:region-before region-name="xsl-region-before-odd"
5400 extent="{$region.before.extent}"
5401 display-align="before"/>
5402 <fo:region-after region-name="xsl-region-after-odd"
5403 extent="{$region.after.extent}"
5404 display-align="after"/>
5405 </fo:simple-page-master>
5407 <fo:simple-page-master master-name="scons-titlepage-even-draft"
5408 page-width="{$page.width}"
5409 page-height="{$page.height}"
5410 margin-top="{$page.margin.top}"
5411 margin-bottom="{$page.margin.bottom}">
5412 <xsl:attribute name="margin-{$direction.align.start}">
5413 <xsl:value-of select="$page.margin.outer"/>
5414 <xsl:if test="$fop.extensions != 0">
5415 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5416 </xsl:if>
5417 </xsl:attribute>
5418 <xsl:attribute name="margin-{$direction.align.end}">
5419 <xsl:value-of select="$page.margin.inner"/>
5420 </xsl:attribute>
5421 <xsl:if test="$axf.extensions != 0">
5422 <xsl:call-template name="axf-page-master-properties">
5423 <xsl:with-param name="page.master">scons-titlepage-even-draft</xsl:with-param>
5424 </xsl:call-template>
5425 </xsl:if>
5426 <fo:region-body margin-bottom="{$body.margin.bottom}"
5427 margin-top="{$body.margin.top}"
5428 column-gap="{$column.gap.titlepage}"
5429 column-count="{$column.count.titlepage}">
5430 <xsl:if test="$draft.watermark.image != ''">
5431 <xsl:attribute name="background-image">
5432 <xsl:call-template name="fo-external-image">
5433 <xsl:with-param name="filename" select="$draft.watermark.image"/>
5434 </xsl:call-template>
5435 </xsl:attribute>
5436 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
5437 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
5438 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
5439 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
5440 </xsl:if>
5441 </fo:region-body>
5442 <fo:region-before region-name="xsl-region-before-even"
5443 extent="{$region.before.extent}"
5444 display-align="before"/>
5445 <fo:region-after region-name="xsl-region-after-even"
5446 extent="{$region.after.extent}"
5447 display-align="after"/>
5448 </fo:simple-page-master>
5450 <!-- draft chapter pages -->
5451 <fo:simple-page-master master-name="scons-chapter-first-draft"
5452 page-width="{$page.width}"
5453 page-height="{$page.height}"
5454 margin-top="{$page.margin.top}"
5455 margin-bottom="{$page.margin.bottom}">
5456 <xsl:attribute name="margin-{$direction.align.start}">
5457 <xsl:value-of select="$page.margin.outer"/>
5458 <xsl:if test="$fop.extensions != 0">
5459 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5460 </xsl:if>
5461 </xsl:attribute>
5462 <xsl:attribute name="margin-{$direction.align.end}">
5463 <xsl:value-of select="$page.margin.inner"/>
5464 </xsl:attribute>
5465 <xsl:if test="$axf.extensions != 0">
5466 <xsl:call-template name="axf-page-master-properties">
5467 <xsl:with-param name="page.master">scons-chapter-first-draft</xsl:with-param>
5468 </xsl:call-template>
5469 </xsl:if>
5470 <fo:region-body margin-bottom="{$body.margin.bottom}"
5471 margin-top="{$body.margin.top}"
5472 column-gap="{$column.gap.titlepage}"
5473 column-count="{$column.count.titlepage}">
5474 <xsl:if test="$draft.watermark.image != ''">
5475 <xsl:attribute name="background-image">
5476 <xsl:call-template name="fo-external-image">
5477 <xsl:with-param name="filename" select="$draft.watermark.image"/>
5478 </xsl:call-template>
5479 </xsl:attribute>
5480 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
5481 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
5482 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
5483 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
5484 </xsl:if>
5485 </fo:region-body>
5486 <fo:region-before region-name="xsl-region-before-first"
5487 extent="{$region.before.extent}"
5488 display-align="before"/>
5489 <fo:region-after region-name="xsl-region-after-first"
5490 extent="{$region.after.extent}"
5491 display-align="after"/>
5492 </fo:simple-page-master>
5494 <fo:simple-page-master master-name="scons-chapter-odd-draft"
5495 page-width="{$page.width}"
5496 page-height="{$page.height}"
5497 margin-top="{$page.margin.top}"
5498 margin-bottom="{$page.margin.bottom}">
5499 <xsl:attribute name="margin-{$direction.align.start}">
5500 <xsl:value-of select="$page.margin.outer"/>
5501 <xsl:if test="$fop.extensions != 0">
5502 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5503 </xsl:if>
5504 </xsl:attribute>
5505 <xsl:attribute name="margin-{$direction.align.end}">
5506 <xsl:value-of select="$page.margin.inner"/>
5507 </xsl:attribute>
5508 <xsl:if test="$axf.extensions != 0">
5509 <xsl:call-template name="axf-page-master-properties">
5510 <xsl:with-param name="page.master">scons-chapter-odd-draft</xsl:with-param>
5511 </xsl:call-template>
5512 </xsl:if>
5513 <fo:region-body margin-bottom="{$body.margin.bottom}"
5514 margin-top="{$body.margin.top}"
5515 column-gap="{$column.gap.body}"
5516 column-count="{$column.count.body}">
5517 <xsl:if test="$draft.watermark.image != ''">
5518 <xsl:attribute name="background-image">
5519 <xsl:call-template name="fo-external-image">
5520 <xsl:with-param name="filename" select="$draft.watermark.image"/>
5521 </xsl:call-template>
5522 </xsl:attribute>
5523 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
5524 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
5525 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
5526 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
5527 </xsl:if>
5528 </fo:region-body>
5529 <fo:region-before region-name="xsl-region-before-odd"
5530 extent="{$region.before.extent}"
5531 display-align="before"/>
5532 <fo:region-after region-name="xsl-region-after-odd"
5533 extent="{$region.after.extent}"
5534 display-align="after"/>
5535 </fo:simple-page-master>
5537 <fo:simple-page-master master-name="scons-chapter-even-draft"
5538 page-width="{$page.width}"
5539 page-height="{$page.height}"
5540 margin-top="{$page.margin.top}"
5541 margin-bottom="{$page.margin.bottom}">
5542 <xsl:attribute name="margin-{$direction.align.start}">
5543 <xsl:value-of select="$page.margin.outer"/>
5544 <xsl:if test="$fop.extensions != 0">
5545 <xsl:value-of select="concat(' - (',$title.margin.left,')')"/>
5546 </xsl:if>
5547 </xsl:attribute>
5548 <xsl:attribute name="margin-{$direction.align.end}">
5549 <xsl:value-of select="$page.margin.inner"/>
5550 </xsl:attribute>
5551 <xsl:if test="$axf.extensions != 0">
5552 <xsl:call-template name="axf-page-master-properties">
5553 <xsl:with-param name="page.master">scons-chapter-even-draft</xsl:with-param>
5554 </xsl:call-template>
5555 </xsl:if>
5556 <fo:region-body margin-bottom="{$body.margin.bottom}"
5557 margin-top="{$body.margin.top}"
5558 column-gap="{$column.gap.body}"
5559 column-count="{$column.count.body}">
5560 <xsl:if test="$draft.watermark.image != ''">
5561 <xsl:attribute name="background-image">
5562 <xsl:call-template name="fo-external-image">
5563 <xsl:with-param name="filename" select="$draft.watermark.image"/>
5564 </xsl:call-template>
5565 </xsl:attribute>
5566 <xsl:attribute name="background-attachment">fixed</xsl:attribute>
5567 <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
5568 <xsl:attribute name="background-position-horizontal">center</xsl:attribute>
5569 <xsl:attribute name="background-position-vertical">center</xsl:attribute>
5570 </xsl:if>
5571 </fo:region-body>
5572 <fo:region-before region-name="xsl-region-before-even"
5573 extent="{$region.before.extent}"
5574 display-align="before"/>
5575 <fo:region-after region-name="xsl-region-after-even"
5576 extent="{$region.after.extent}"
5577 display-align="after"/>
5578 </fo:simple-page-master>
5579 </xsl:if>
5581 <!-- setup for title page(s) -->
5582 <fo:page-sequence-master master-name="scons-titlepage">
5583 <fo:repeatable-page-master-alternatives>
5584 <fo:conditional-page-master-reference master-reference="scons-titlepage-first"
5585 page-position="first"/>
5586 <fo:conditional-page-master-reference master-reference="scons-titlepage-odd"
5587 odd-or-even="odd"/>
5588 <fo:conditional-page-master-reference
5589 odd-or-even="even">
5590 <xsl:attribute name="master-reference">
5591 <xsl:choose>
5592 <xsl:when test="$double.sided != 0">scons-titlepage-even</xsl:when>
5593 <xsl:otherwise>scons-titlepage-odd</xsl:otherwise>
5594 </xsl:choose>
5595 </xsl:attribute>
5596 </fo:conditional-page-master-reference>
5597 </fo:repeatable-page-master-alternatives>
5598 </fo:page-sequence-master>
5600 <!-- definition of pagemasters for draft mode -->
5601 <xsl:if test="$draft.mode != 'no'">
5602 <!-- draft title pages -->
5604 <fo:page-sequence-master master-name="scons-titlepage-draft">
5605 <fo:repeatable-page-master-alternatives>
5606 <fo:conditional-page-master-reference master-reference="scons-titlepage-first-draft"
5607 page-position="first"/>
5608 <fo:conditional-page-master-reference master-reference="body-odd-draft"
5609 odd-or-even="odd"/>
5610 <fo:conditional-page-master-reference
5611 odd-or-even="even">
5612 <xsl:attribute name="master-reference">
5613 <xsl:choose>
5614 <xsl:when test="$double.sided != 0">body-even-draft</xsl:when>
5615 <xsl:otherwise>body-odd-draft</xsl:otherwise>
5616 </xsl:choose>
5617 </xsl:attribute>
5618 </fo:conditional-page-master-reference>
5619 </fo:repeatable-page-master-alternatives>
5620 </fo:page-sequence-master>
5621 </xsl:if>
5623 <!-- setup for chapter pages -->
5624 <fo:page-sequence-master master-name="scons-chapter">
5625 <fo:repeatable-page-master-alternatives>
5626 <fo:conditional-page-master-reference master-reference="scons-chapter-first"
5627 page-position="first"/>
5628 <fo:conditional-page-master-reference master-reference="scons-chapter-odd"
5629 odd-or-even="odd"/>
5630 <fo:conditional-page-master-reference
5631 odd-or-even="even">
5632 <xsl:attribute name="master-reference">
5633 <xsl:choose>
5634 <xsl:when test="$double.sided != 0">scons-chapter-even</xsl:when>
5635 <xsl:otherwise>scons-chapter-odd</xsl:otherwise>
5636 </xsl:choose>
5637 </xsl:attribute>
5638 </fo:conditional-page-master-reference>
5639 </fo:repeatable-page-master-alternatives>
5640 </fo:page-sequence-master>
5641 <!-- setup for draft chapter pages -->
5642 <xsl:if test="$draft.mode != 'no'">
5643 <!-- draft chapter pages -->
5644 <fo:page-sequence-master master-name="scons-chapter-draft">
5645 <fo:repeatable-page-master-alternatives>
5646 <fo:conditional-page-master-reference master-reference="scons-chapter-first-draft"
5647 page-position="first"/>
5648 <fo:conditional-page-master-reference master-reference="scons-chapter-odd-draft"
5649 odd-or-even="odd"/>
5650 <fo:conditional-page-master-reference
5651 odd-or-even="even">
5652 <xsl:attribute name="master-reference">
5653 <xsl:choose>
5654 <xsl:when test="$double.sided != 0">scons-chapter-even-draft</xsl:when>
5655 <xsl:otherwise>scons-chapter-odd-draft</xsl:otherwise>
5656 </xsl:choose>
5657 </xsl:attribute>
5658 </fo:conditional-page-master-reference>
5659 </fo:repeatable-page-master-alternatives>
5660 </fo:page-sequence-master>
5661 </xsl:if>
5663 </xsl:template>
5665 <!-- selecting our SCons pagemasters -->
5666 <xsl:template name="select.user.pagemaster">
5667 <xsl:param name="element"/>
5668 <xsl:param name="pageclass"/>
5669 <xsl:param name="default-pagemaster"/>
5671 <xsl:choose>
5672 <xsl:when test="$default-pagemaster = 'titlepage'">
5673 <xsl:value-of select="'scons-titlepage'" />
5674 </xsl:when>
5675 <xsl:when test="$element = 'chapter' and
5676 $default-pagemaster = 'body-draft'">
5677 <xsl:value-of select="'scons-chapter-draft'" />
5678 </xsl:when>
5679 <xsl:when test="$element = 'chapter'">
5680 <xsl:value-of select="'scons-chapter'" />
5681 </xsl:when>
5682 <xsl:when test="$default-pagemaster = 'titlepage-draft'">
5683 <xsl:value-of select="'scons-titlepage-draft'" />
5684 </xsl:when>
5685 <xsl:otherwise>
5686 <xsl:value-of select="$default-pagemaster"/>
5687 </xsl:otherwise>
5688 </xsl:choose>
5689 </xsl:template>
5693 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
5694 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" display-align="after" color="#C51410" font-size="75pt" space-before="0pt" space-after="0pt" font-weight="bold" font-family="'serif'">
5695 <xsl:call-template name="division.title">
5696 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
5697 </xsl:call-template>
5698 </fo:block>
5699 </xsl:template>
5701 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
5702 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" display-align="after" font-size="28pt" space-before="0pt" space-after="0pt" font-family="{$title.fontset}" font-weight="normal">
5703 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
5704 </fo:block>
5705 </xsl:template>
5707 <xsl:template match="edition" mode="book.titlepage.recto.auto.mode">
5708 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" display-align="after" color="#C51410" font-size="56pt" space-before="0pt" space-after="0pt" font-family="'serif'" font-weight="normal">
5709 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
5710 </fo:block>
5711 </xsl:template>
5714 <xsl:attribute-set name="chap.label.properties">
5715 <xsl:attribute name="font-family">
5716 <xsl:value-of select="$title.fontset"/>
5717 </xsl:attribute>
5718 <xsl:attribute name="font-weight">bold</xsl:attribute>
5719 <xsl:attribute name="color">#C51410</xsl:attribute>
5720 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
5721 <xsl:attribute name="text-align">center</xsl:attribute>
5722 <xsl:attribute name="display-align">after</xsl:attribute>
5723 <xsl:attribute name="space-before">0pt</xsl:attribute>
5724 <xsl:attribute name="space-after">0pt</xsl:attribute>
5725 </xsl:attribute-set>
5727 <xsl:attribute-set name="chap.title.properties">
5728 <xsl:attribute name="font-family">
5729 <xsl:value-of select="$title.fontset"/>
5730 </xsl:attribute>
5731 <xsl:attribute name="font-size">24pt</xsl:attribute>
5732 <xsl:attribute name="color">#C51410</xsl:attribute>
5733 <xsl:attribute name="font-weight">bold</xsl:attribute>
5734 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
5735 <xsl:attribute name="text-align">left</xsl:attribute>
5736 <xsl:attribute name="display-align">after</xsl:attribute>
5737 <xsl:attribute name="space-before">0pt</xsl:attribute>
5738 <xsl:attribute name="space-after">0pt</xsl:attribute>
5739 <xsl:attribute name="space-start">0.7em</xsl:attribute>
5740 </xsl:attribute-set>
5743 <!-- customization of chapter titles -->
5744 <xsl:template name="chap.title">
5745 <xsl:param name="node" select="."/>
5746 <xsl:param name="pagewide" select="0"/>
5748 <xsl:variable name="id">
5749 <xsl:call-template name="object.id">
5750 <xsl:with-param name="object" select="$node"/>
5751 </xsl:call-template>
5752 </xsl:variable>
5754 <xsl:variable name="title">
5755 <xsl:apply-templates select="$node" mode="object.title.markup">
5756 <xsl:with-param name="allow-anchors" select="1"/>
5757 </xsl:apply-templates>
5758 </xsl:variable>
5760 <xsl:variable name="titleabbrev">
5761 <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
5762 </xsl:variable>
5764 <xsl:variable name="level">
5765 <xsl:choose>
5766 <xsl:when test="ancestor::section">
5767 <xsl:value-of select="count(ancestor::section)+1"/>
5768 </xsl:when>
5769 <xsl:when test="ancestor::sect5">6</xsl:when>
5770 <xsl:when test="ancestor::sect4">5</xsl:when>
5771 <xsl:when test="ancestor::sect3">4</xsl:when>
5772 <xsl:when test="ancestor::sect2">3</xsl:when>
5773 <xsl:when test="ancestor::sect1">2</xsl:when>
5774 <xsl:otherwise>1</xsl:otherwise>
5775 </xsl:choose>
5776 </xsl:variable>
5778 <xsl:if test="$passivetex.extensions != 0">
5779 <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
5780 fotex-bookmark-level="2"
5781 fotex-bookmark-label="{$id}">
5782 <xsl:value-of select="$titleabbrev"/>
5783 </fotex:bookmark>
5784 </xsl:if>
5786 <fo:table table-layout="fixed" width="100%" border-width="0pt" border-style="none">
5788 <fo:table-column column-width="17mm"/>
5789 <fo:table-column/>
5790 <fo:table-column column-width="17mm"/>
5792 <fo:table-body>
5793 <fo:table-row text-align="center">
5794 <fo:table-cell>
5795 <fo:block></fo:block>
5796 </fo:table-cell>
5797 <fo:table-cell xsl:use-attribute-sets="chap.title.properties">
5798 <fo:block>
5800 <fo:inline xsl:use-attribute-sets="chap.label.properties" font-size="57pt"><xsl:apply-templates select="$node"
5801 mode="label.markup"/></fo:inline>
5803 <fo:inline xsl:use-attribute-sets="chap.title.properties"><xsl:apply-templates select="$node"
5804 mode="title.markup"/></fo:inline>
5805 </fo:block>
5806 </fo:table-cell>
5807 <fo:table-cell>
5808 <fo:block></fo:block>
5809 </fo:table-cell>
5810 </fo:table-row>
5811 </fo:table-body>
5812 </fo:table>
5813 </xsl:template>
5815 <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
5816 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5817 <xsl:call-template name="chap.title">
5818 <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
5819 </xsl:call-template>
5820 </fo:block>
5821 </xsl:template>
5824 <xsl:template match="title" mode="header.content">
5825 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="0pt" space-after="0pt">
5826 <xsl:apply-templates select="."/>
5827 </fo:block>
5828 </xsl:template>
5830 <xsl:template match="subtitle" mode="header.content">
5831 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="0pt" space-after="0pt">
5832 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
5833 </fo:block>
5834 </xsl:template>
5836 <xsl:template match="edition" mode="header.content">
5837 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="0pt" space-after="0pt">
5838 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
5839 </fo:block>
5840 </xsl:template>
5843 <xsl:template name="header.table">
5844 <xsl:param name="pageclass" select="''"/>
5845 <xsl:param name="sequence" select="''"/>
5846 <xsl:param name="element" select="''"/>
5847 <xsl:param name="gentext-key" select="''"/>
5849 <!-- default is a single table style for all headers -->
5850 <!-- Customize it for different page classes or sequence location -->
5852 <xsl:choose>
5853 <xsl:when test="$pageclass = 'index'">
5854 <xsl:attribute name="margin-left">0pt</xsl:attribute>
5855 </xsl:when>
5856 </xsl:choose>
5858 <xsl:variable name="column1">
5859 <xsl:choose>
5860 <xsl:when test="$double.sided = 0">1</xsl:when>
5861 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
5862 <xsl:otherwise>3</xsl:otherwise>
5863 </xsl:choose>
5864 </xsl:variable>
5866 <xsl:variable name="column3">
5867 <xsl:choose>
5868 <xsl:when test="$double.sided = 0">3</xsl:when>
5869 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
5870 <xsl:otherwise>1</xsl:otherwise>
5871 </xsl:choose>
5872 </xsl:variable>
5874 <xsl:variable name="candidate">
5875 <fo:table table-layout="fixed" width="100%">
5876 <xsl:call-template name="head.sep.rule">
5877 <xsl:with-param name="pageclass" select="$pageclass"/>
5878 <xsl:with-param name="sequence" select="$sequence"/>
5879 <xsl:with-param name="gentext-key" select="$gentext-key"/>
5880 </xsl:call-template>
5882 <fo:table-column column-number="1">
5883 <xsl:attribute name="column-width">
5884 <xsl:text>proportional-column-width(</xsl:text>
5885 <xsl:call-template name="header.footer.width">
5886 <xsl:with-param name="location">header</xsl:with-param>
5887 <xsl:with-param name="position" select="$column1"/>
5888 </xsl:call-template>
5889 <xsl:text>)</xsl:text>
5890 </xsl:attribute>
5891 </fo:table-column>
5892 <fo:table-column column-number="2">
5893 <xsl:attribute name="column-width">
5894 <xsl:text>proportional-column-width(</xsl:text>
5895 <xsl:call-template name="header.footer.width">
5896 <xsl:with-param name="location">header</xsl:with-param>
5897 <xsl:with-param name="position" select="2"/>
5898 </xsl:call-template>
5899 <xsl:text>)</xsl:text>
5900 </xsl:attribute>
5901 </fo:table-column>
5902 <fo:table-column column-number="3">
5903 <xsl:attribute name="column-width">
5904 <xsl:text>proportional-column-width(</xsl:text>
5905 <xsl:call-template name="header.footer.width">
5906 <xsl:with-param name="location">header</xsl:with-param>
5907 <xsl:with-param name="position" select="$column3"/>
5908 </xsl:call-template>
5909 <xsl:text>)</xsl:text>
5910 </xsl:attribute>
5911 </fo:table-column>
5913 <fo:table-body>
5914 <fo:table-row>
5915 <xsl:attribute name="block-progression-dimension.minimum">
5916 <xsl:value-of select="$header.table.height"/>
5917 </xsl:attribute>
5918 <fo:table-cell text-align="left"
5919 display-align="before">
5920 <xsl:if test="$fop.extensions = 0">
5921 <xsl:attribute name="relative-align">baseline</xsl:attribute>
5922 </xsl:if>
5923 <fo:block>
5924 <xsl:call-template name="header.content">
5925 <xsl:with-param name="pageclass" select="$pageclass"/>
5926 <xsl:with-param name="sequence" select="$sequence"/>
5927 <xsl:with-param name="position" select="'left'"/>
5928 <xsl:with-param name="gentext-key" select="$gentext-key"/>
5929 </xsl:call-template>
5930 </fo:block>
5931 </fo:table-cell>
5932 <fo:table-cell text-align="center"
5933 display-align="before">
5934 <xsl:if test="$fop.extensions = 0">
5935 <xsl:attribute name="relative-align">baseline</xsl:attribute>
5936 </xsl:if>
5937 <fo:block>
5938 <xsl:call-template name="header.content">
5939 <xsl:with-param name="pageclass" select="$pageclass"/>
5940 <xsl:with-param name="sequence" select="$sequence"/>
5941 <xsl:with-param name="position" select="'center'"/>
5942 <xsl:with-param name="gentext-key" select="$gentext-key"/>
5943 </xsl:call-template>
5944 </fo:block>
5945 </fo:table-cell>
5946 <fo:table-cell text-align="right"
5947 display-align="before">
5948 <xsl:if test="$fop.extensions = 0">
5949 <xsl:attribute name="relative-align">baseline</xsl:attribute>
5950 </xsl:if>
5951 <fo:block>
5952 <xsl:call-template name="header.content">
5953 <xsl:with-param name="pageclass" select="$pageclass"/>
5954 <xsl:with-param name="sequence" select="$sequence"/>
5955 <xsl:with-param name="position" select="'right'"/>
5956 <xsl:with-param name="gentext-key" select="$gentext-key"/>
5957 </xsl:call-template>
5958 </fo:block>
5959 </fo:table-cell>
5960 </fo:table-row>
5961 </fo:table-body>
5962 </fo:table>
5963 </xsl:variable>
5965 <!-- Really output a header? -->
5966 <xsl:choose>
5967 <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book'
5968 and $sequence='first'">
5969 <!-- no, book titlepages have no headers at all -->
5970 </xsl:when>
5971 <xsl:when test="$pageclass = 'scons-titlepage'">
5972 <!-- no, book titlepages have no headers at all -->
5973 </xsl:when>
5974 <xsl:when test="$pageclass = 'scons-chapter' and
5975 $sequence = 'first'">
5976 <!-- no, book chapters have no headers at all -->
5977 </xsl:when>
5978 <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0">
5979 <!-- no output -->
5980 </xsl:when>
5981 <xsl:otherwise>
5982 <xsl:copy-of select="$candidate"/>
5983 </xsl:otherwise>
5984 </xsl:choose>
5985 </xsl:template>
5988 <xsl:template name="header.content">
5989 <xsl:param name="pageclass" select="''"/>
5990 <xsl:param name="sequence" select="''"/>
5991 <xsl:param name="position" select="''"/>
5992 <xsl:param name="gentext-key" select="''"/>
5994 <fo:block>
5996 <!-- sequence can be odd, even, first, blank -->
5997 <!-- position can be left, center, right -->
5998 <xsl:choose>
6000 <xsl:when test="$pageclass = 'titlepage'">
6001 <!-- nop; no footer on title pages -->
6002 </xsl:when>
6004 <xsl:when test="$double.sided != 0 and $sequence = 'even'
6005 and $position='left'">
6006 <fo:retrieve-marker
6007 retrieve-class-name="section.head.marker"
6008 retrieve-position="first-including-carryover"
6009 retrieve-boundary="page-sequence"/>
6010 </xsl:when>
6012 <xsl:when test="$double.sided != 0 and
6013 ($sequence = 'odd' or $sequence = 'first' or $sequence = 'blank')
6014 and $position='right'">
6015 <fo:retrieve-marker
6016 retrieve-class-name="section.head.marker"
6017 retrieve-position="first-including-carryover"
6018 retrieve-boundary="page-sequence"/>
6019 </xsl:when>
6021 <xsl:when test="$double.sided != 0 and
6022 ($sequence = 'odd' or $sequence = 'first' or $sequence = 'blank')
6023 and $position='left'">
6024 <xsl:value-of select="/book/title"/>
6025 </xsl:when>
6027 <xsl:when test="$double.sided != 0 and $sequence = 'even'
6028 and $position='right'">
6029 <xsl:value-of select="/book/title"/>
6030 </xsl:when>
6033 <xsl:when test="$double.sided = 0 and $sequence = 'even'
6034 and $position='right'">
6035 <xsl:value-of select="/book/title"/>
6036 </xsl:when>
6038 <xsl:when test="$double.sided = 0 and $sequence = 'even'
6039 and $position='left'">
6040 <xsl:value-of select="/book/title"/>
6041 </xsl:when>
6043 <xsl:when test="$double.sided = 0 and ($sequence = 'odd' or $sequence = 'first')
6044 and $position='right'">
6045 <fo:retrieve-marker
6046 retrieve-class-name="section.head.marker"
6047 retrieve-position="first-including-carryover"
6048 retrieve-boundary="page-sequence"/>
6049 </xsl:when>
6051 <xsl:when test="$double.sided = 0 and ($sequence = 'odd' or $sequence = 'first')
6052 and $position='left'">
6053 <xsl:value-of select="/book/title"/>
6054 </xsl:when>
6056 <xsl:when test="$double.sided = 0 and $sequence = 'even'
6057 and $position='right'">
6058 <fo:retrieve-marker
6059 retrieve-class-name="section.head.marker"
6060 retrieve-position="first-including-carryover"
6061 retrieve-boundary="page-sequence"/>
6062 </xsl:when>
6065 <xsl:when test="$position='center'">
6066 <!-- <xsl:apply-templates select="."
6067 mode="titleabbrev.markup"/>
6069 </xsl:when>
6071 <xsl:when test="$sequence='blank'">
6072 <!-- nop -->
6073 </xsl:when>
6075 <xsl:otherwise>
6076 <!-- nop -->
6077 </xsl:otherwise>
6079 </xsl:choose>
6080 </fo:block>
6081 </xsl:template>
6084 <xsl:template name="footer.table">
6085 <xsl:param name="pageclass" select="''"/>
6086 <xsl:param name="sequence" select="''"/>
6087 <xsl:param name="gentext-key" select="''"/>
6089 <!-- default is a single table style for all footers -->
6090 <!-- Customize it for different page classes or sequence location -->
6092 <xsl:choose>
6093 <xsl:when test="$pageclass = 'index'">
6094 <xsl:attribute name="margin-left">0pt</xsl:attribute>
6095 </xsl:when>
6096 </xsl:choose>
6098 <xsl:variable name="column1">
6099 <xsl:choose>
6100 <xsl:when test="$double.sided = 0">1</xsl:when>
6101 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">1</xsl:when>
6102 <xsl:otherwise>3</xsl:otherwise>
6103 </xsl:choose>
6104 </xsl:variable>
6106 <xsl:variable name="column3">
6107 <xsl:choose>
6108 <xsl:when test="$double.sided = 0">3</xsl:when>
6109 <xsl:when test="$sequence = 'first' or $sequence = 'odd'">3</xsl:when>
6110 <xsl:otherwise>1</xsl:otherwise>
6111 </xsl:choose>
6112 </xsl:variable>
6114 <xsl:variable name="candidate">
6115 <fo:table table-layout="fixed" width="100%">
6116 <xsl:call-template name="foot.sep.rule">
6117 <xsl:with-param name="pageclass" select="$pageclass"/>
6118 <xsl:with-param name="sequence" select="$sequence"/>
6119 <xsl:with-param name="gentext-key" select="$gentext-key"/>
6120 </xsl:call-template>
6121 <fo:table-column column-number="1">
6122 <xsl:attribute name="column-width">
6123 <xsl:text>proportional-column-width(</xsl:text>
6124 <xsl:call-template name="header.footer.width">
6125 <xsl:with-param name="location">footer</xsl:with-param>
6126 <xsl:with-param name="position" select="$column1"/>
6127 </xsl:call-template>
6128 <xsl:text>)</xsl:text>
6129 </xsl:attribute>
6130 </fo:table-column>
6131 <fo:table-column column-number="2">
6132 <xsl:attribute name="column-width">
6133 <xsl:text>proportional-column-width(</xsl:text>
6134 <xsl:call-template name="header.footer.width">
6135 <xsl:with-param name="location">footer</xsl:with-param>
6136 <xsl:with-param name="position" select="2"/>
6137 </xsl:call-template>
6138 <xsl:text>)</xsl:text>
6139 </xsl:attribute>
6140 </fo:table-column>
6141 <fo:table-column column-number="3">
6142 <xsl:attribute name="column-width">
6143 <xsl:text>proportional-column-width(</xsl:text>
6144 <xsl:call-template name="header.footer.width">
6145 <xsl:with-param name="location">footer</xsl:with-param>
6146 <xsl:with-param name="position" select="$column3"/>
6147 </xsl:call-template>
6148 <xsl:text>)</xsl:text>
6149 </xsl:attribute>
6150 </fo:table-column>
6152 <fo:table-body>
6153 <fo:table-row>
6154 <xsl:attribute name="block-progression-dimension.minimum">
6155 <xsl:value-of select="$footer.table.height"/>
6156 </xsl:attribute>
6157 <fo:table-cell text-align="left"
6158 display-align="after">
6159 <xsl:if test="$fop.extensions = 0">
6160 <xsl:attribute name="relative-align">baseline</xsl:attribute>
6161 </xsl:if>
6162 <fo:block>
6163 <xsl:call-template name="footer.content">
6164 <xsl:with-param name="pageclass" select="$pageclass"/>
6165 <xsl:with-param name="sequence" select="$sequence"/>
6166 <xsl:with-param name="position" select="'left'"/>
6167 <xsl:with-param name="gentext-key" select="$gentext-key"/>
6168 </xsl:call-template>
6169 </fo:block>
6170 </fo:table-cell>
6171 <fo:table-cell text-align="center"
6172 display-align="after">
6173 <xsl:if test="$fop.extensions = 0">
6174 <xsl:attribute name="relative-align">baseline</xsl:attribute>
6175 </xsl:if>
6176 <fo:block>
6177 <xsl:call-template name="footer.content">
6178 <xsl:with-param name="pageclass" select="$pageclass"/>
6179 <xsl:with-param name="sequence" select="$sequence"/>
6180 <xsl:with-param name="position" select="'center'"/>
6181 <xsl:with-param name="gentext-key" select="$gentext-key"/>
6182 </xsl:call-template>
6183 </fo:block>
6184 </fo:table-cell>
6185 <fo:table-cell text-align="right"
6186 display-align="after">
6187 <xsl:if test="$fop.extensions = 0">
6188 <xsl:attribute name="relative-align">baseline</xsl:attribute>
6189 </xsl:if>
6190 <fo:block>
6191 <xsl:call-template name="footer.content">
6192 <xsl:with-param name="pageclass" select="$pageclass"/>
6193 <xsl:with-param name="sequence" select="$sequence"/>
6194 <xsl:with-param name="position" select="'right'"/>
6195 <xsl:with-param name="gentext-key" select="$gentext-key"/>
6196 </xsl:call-template>
6197 </fo:block>
6198 </fo:table-cell>
6199 </fo:table-row>
6200 </fo:table-body>
6201 </fo:table>
6202 </xsl:variable>
6204 <!-- Really output a footer? -->
6205 <xsl:choose>
6206 <xsl:when test="$pageclass='titlepage' and $gentext-key='book'
6207 and $sequence='first'">
6208 <!-- no, book titlepages have no footers at all -->
6209 </xsl:when>
6210 <xsl:when test="$pageclass = 'scons-titlepage'">
6211 <!-- no, book titlepages have no footers at all -->
6212 </xsl:when>
6213 <xsl:when test="$pageclass = 'scons-chapter' and
6214 $sequence='first'">
6215 <!-- no, book chapters have no footers on first page -->
6216 </xsl:when>
6217 <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0">
6218 <!-- no output -->
6219 </xsl:when>
6220 <xsl:otherwise>
6221 <xsl:copy-of select="$candidate"/>
6222 </xsl:otherwise>
6223 </xsl:choose>
6224 </xsl:template>
6227 <xsl:template name="footer.content">
6228 <xsl:param name="pageclass" select="''"/>
6229 <xsl:param name="sequence" select="''"/>
6230 <xsl:param name="position" select="''"/>
6231 <xsl:param name="gentext-key" select="''"/>
6233 <fo:block>
6234 <!-- pageclass can be front, body, back -->
6235 <!-- sequence can be odd, even, first, blank -->
6236 <!-- position can be left, center, right -->
6237 <xsl:choose>
6238 <xsl:when test="$pageclass = 'titlepage'">
6239 <!-- nop; no footer on title pages -->
6240 </xsl:when>
6242 <xsl:when test="$double.sided != 0 and $sequence = 'even'
6243 and $position='left'">
6244 <fo:page-number/>
6245 </xsl:when>
6247 <xsl:when test="$double.sided != 0 and
6248 ($sequence = 'odd' or $sequence = 'first' or $sequence = 'blank')
6249 and $position='right'">
6250 <fo:page-number/>
6251 </xsl:when>
6253 <xsl:when test="$double.sided != 0 and
6254 ($sequence = 'odd' or $sequence = 'first' or $sequence = 'blank')
6255 and $position='left'">
6256 <fo:external-graphic
6257 src="url(titlepage/SCons_path.svg)"
6258 width="20mm" content-width="scale-to-fit"
6259 scaling="uniform"/>
6260 </xsl:when>
6262 <xsl:when test="$double.sided != 0 and $sequence = 'even'
6263 and $position='right'">
6264 <fo:external-graphic
6265 src="url(titlepage/SCons_path.svg)"
6266 width="20mm" content-width="scale-to-fit"
6267 scaling="uniform"/>
6268 </xsl:when>
6271 <xsl:when test="$double.sided = 0 and $sequence = 'even'
6272 and $position='right'">
6273 <fo:external-graphic
6274 src="url(titlepage/SCons_path.svg)"
6275 width="20mm" content-width="scale-to-fit"
6276 scaling="uniform"/>
6277 </xsl:when>
6279 <xsl:when test="$double.sided = 0 and $sequence = 'even'
6280 and $position='left'">
6281 <fo:external-graphic
6282 src="url(titlepage/SCons_path.svg)"
6283 width="20mm" content-width="scale-to-fit"
6284 scaling="uniform"/>
6285 </xsl:when>
6287 <xsl:when test="$double.sided = 0 and ($sequence = 'odd' or $sequence = 'first')
6288 and $position='right'">
6289 <fo:page-number/>
6290 </xsl:when>
6292 <xsl:when test="$double.sided = 0 and ($sequence = 'odd' or $sequence = 'first')
6293 and $position='left'">
6294 <fo:external-graphic
6295 src="url(titlepage/SCons_path.svg)"
6296 width="20mm" content-width="scale-to-fit"
6297 scaling="uniform"/>
6298 </xsl:when>
6300 <xsl:when test="$double.sided = 0 and $sequence = 'even'
6301 and $position='right'">
6302 <fo:page-number/>
6303 </xsl:when>
6306 <xsl:when test="$position='center'">
6307 </xsl:when>
6309 <xsl:when test="$sequence='blank'">
6310 <!-- nop -->
6311 </xsl:when>
6314 <xsl:otherwise>
6315 <!-- nop -->
6316 </xsl:otherwise>
6317 </xsl:choose>
6318 </fo:block>
6319 </xsl:template>
6321 <xsl:template name="head.sep.rule">
6322 <xsl:param name="pageclass"/>
6323 <xsl:param name="sequence"/>
6324 <xsl:param name="gentext-key"/>
6326 <xsl:if test="$header.rule != 0">
6327 <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
6328 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
6329 <xsl:attribute name="border-bottom-color">#C51410</xsl:attribute>
6330 </xsl:if>
6331 </xsl:template>
6334 <xsl:template name="foot.sep.rule">
6335 <xsl:param name="pageclass"/>
6336 <xsl:param name="sequence"/>
6337 <xsl:param name="gentext-key"/>
6339 <xsl:if test="$footer.rule != 0">
6340 <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
6341 <xsl:attribute name="border-top-style">solid</xsl:attribute>
6342 <xsl:attribute name="border-top-color">#C51410</xsl:attribute>
6343 </xsl:if>
6344 </xsl:template>
6346 <xsl:param name="header.column.widths">1 0 1</xsl:param>
6347 <xsl:param name="footer.column.widths">1 0 1</xsl:param>
6348 <xsl:param name="headers.on.blank.pages" select="1"/>
6349 <xsl:param name="footers.on.blank.pages" select="1"/>
6351 </xsl:stylesheet>