Imported Upstream version 1.79.0
[platform/upstream/docbook-xsl-stylesheets.git] / fo / titlepage.templates.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" exclude-result-prefixes="exsl">
4
5 <!-- This stylesheet was created by template/titlepage.xsl-->
6
7 <xsl:template name="article.titlepage.recto">
8   <xsl:choose>
9     <xsl:when test="articleinfo/title">
10       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
11     </xsl:when>
12     <xsl:when test="artheader/title">
13       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
14     </xsl:when>
15     <xsl:when test="info/title">
16       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
17     </xsl:when>
18     <xsl:when test="title">
19       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
20     </xsl:when>
21   </xsl:choose>
22
23   <xsl:choose>
24     <xsl:when test="articleinfo/subtitle">
25       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
26     </xsl:when>
27     <xsl:when test="artheader/subtitle">
28       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
29     </xsl:when>
30     <xsl:when test="info/subtitle">
31       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
32     </xsl:when>
33     <xsl:when test="subtitle">
34       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
35     </xsl:when>
36   </xsl:choose>
37
38   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
39   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
40   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
41   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
42   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
43   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
44   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
45   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
46   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
47   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
48   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
49   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
50   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
51   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
52   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
53   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
54   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
55   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
56   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
57   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
58   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
59   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
60   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
61   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
62   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
63   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
64   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
65   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
66   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
67   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
68   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
69   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
70   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
71   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/itermset"/>
72   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/itermset"/>
73   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/itermset"/>
74 </xsl:template>
75
76 <xsl:template name="article.titlepage.verso">
77 </xsl:template>
78
79 <xsl:template name="article.titlepage.separator">
80 </xsl:template>
81
82 <xsl:template name="article.titlepage.before.recto">
83 </xsl:template>
84
85 <xsl:template name="article.titlepage.before.verso">
86 </xsl:template>
87
88 <xsl:template name="article.titlepage">
89   <fo:block font-family="{$title.fontset}">
90     <xsl:variable name="recto.content">
91       <xsl:call-template name="article.titlepage.before.recto"/>
92       <xsl:call-template name="article.titlepage.recto"/>
93     </xsl:variable>
94     <xsl:variable name="recto.elements.count">
95       <xsl:choose>
96         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
97         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
98           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
99         <xsl:otherwise>1</xsl:otherwise>
100       </xsl:choose>
101     </xsl:variable>
102     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
103       <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
104     </xsl:if>
105     <xsl:variable name="verso.content">
106       <xsl:call-template name="article.titlepage.before.verso"/>
107       <xsl:call-template name="article.titlepage.verso"/>
108     </xsl:variable>
109     <xsl:variable name="verso.elements.count">
110       <xsl:choose>
111         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
112         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
113           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
114         <xsl:otherwise>1</xsl:otherwise>
115       </xsl:choose>
116     </xsl:variable>
117     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
118       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
119     </xsl:if>
120     <xsl:call-template name="article.titlepage.separator"/>
121   </fo:block>
122 </xsl:template>
123
124 <xsl:template match="*" mode="article.titlepage.recto.mode">
125   <!-- if an element isn't found in this mode, -->
126   <!-- try the generic titlepage.mode -->
127   <xsl:apply-templates select="." mode="titlepage.mode"/>
128 </xsl:template>
129
130 <xsl:template match="*" mode="article.titlepage.verso.mode">
131   <!-- if an element isn't found in this mode, -->
132   <!-- try the generic titlepage.mode -->
133   <xsl:apply-templates select="." mode="titlepage.mode"/>
134 </xsl:template>
135
136 <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
137 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
138 <xsl:call-template name="component.title">
139 <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
140 </xsl:call-template>
141 </fo:block>
142 </xsl:template>
143
144 <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
145 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style">
146 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
147 </fo:block>
148 </xsl:template>
149
150 <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
151 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
152 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
153 </fo:block>
154 </xsl:template>
155
156 <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
157 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
158 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
159 </fo:block>
160 </xsl:template>
161
162 <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
163 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
164 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
165 </fo:block>
166 </xsl:template>
167
168 <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
169 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
170 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
171 </fo:block>
172 </xsl:template>
173
174 <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
175 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
176 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
177 </fo:block>
178 </xsl:template>
179
180 <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
181 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
182 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
183 </fo:block>
184 </xsl:template>
185
186 <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
187 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
188 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
189 </fo:block>
190 </xsl:template>
191
192 <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
193 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
194 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
195 </fo:block>
196 </xsl:template>
197
198 <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
199 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
200 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
201 </fo:block>
202 </xsl:template>
203
204 <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
205 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
206 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
207 </fo:block>
208 </xsl:template>
209
210 <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
211 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
212 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
213 </fo:block>
214 </xsl:template>
215
216 <xsl:template match="itermset" mode="article.titlepage.recto.auto.mode">
217 <fo:block xsl:use-attribute-sets="article.titlepage.recto.style">
218 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
219 </fo:block>
220 </xsl:template>
221
222 <xsl:template name="set.titlepage.recto">
223   <xsl:choose>
224     <xsl:when test="setinfo/title">
225       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
226     </xsl:when>
227     <xsl:when test="info/title">
228       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
229     </xsl:when>
230     <xsl:when test="title">
231       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
232     </xsl:when>
233   </xsl:choose>
234
235   <xsl:choose>
236     <xsl:when test="setinfo/subtitle">
237       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
238     </xsl:when>
239     <xsl:when test="info/subtitle">
240       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
241     </xsl:when>
242     <xsl:when test="subtitle">
243       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
244     </xsl:when>
245   </xsl:choose>
246
247   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
248   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
249   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
250   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
251   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
252   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
253   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
254   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
255   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
256   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
257   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
258   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
259   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
260   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
261   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
262   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
263   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
264   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
265   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
266   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
267   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
268   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
269   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/itermset"/>
270   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/itermset"/>
271 </xsl:template>
272
273 <xsl:template name="set.titlepage.verso">
274 </xsl:template>
275
276 <xsl:template name="set.titlepage.separator">
277 </xsl:template>
278
279 <xsl:template name="set.titlepage.before.recto">
280 </xsl:template>
281
282 <xsl:template name="set.titlepage.before.verso">
283 </xsl:template>
284
285 <xsl:template name="set.titlepage">
286   <fo:block>
287     <xsl:variable name="recto.content">
288       <xsl:call-template name="set.titlepage.before.recto"/>
289       <xsl:call-template name="set.titlepage.recto"/>
290     </xsl:variable>
291     <xsl:variable name="recto.elements.count">
292       <xsl:choose>
293         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
294         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
295           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
296         <xsl:otherwise>1</xsl:otherwise>
297       </xsl:choose>
298     </xsl:variable>
299     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
300       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
301     </xsl:if>
302     <xsl:variable name="verso.content">
303       <xsl:call-template name="set.titlepage.before.verso"/>
304       <xsl:call-template name="set.titlepage.verso"/>
305     </xsl:variable>
306     <xsl:variable name="verso.elements.count">
307       <xsl:choose>
308         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
309         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
310           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
311         <xsl:otherwise>1</xsl:otherwise>
312       </xsl:choose>
313     </xsl:variable>
314     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
315       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
316     </xsl:if>
317     <xsl:call-template name="set.titlepage.separator"/>
318   </fo:block>
319 </xsl:template>
320
321 <xsl:template match="*" mode="set.titlepage.recto.mode">
322   <!-- if an element isn't found in this mode, -->
323   <!-- try the generic titlepage.mode -->
324   <xsl:apply-templates select="." mode="titlepage.mode"/>
325 </xsl:template>
326
327 <xsl:template match="*" mode="set.titlepage.verso.mode">
328   <!-- if an element isn't found in this mode, -->
329   <!-- try the generic titlepage.mode -->
330   <xsl:apply-templates select="." mode="titlepage.mode"/>
331 </xsl:template>
332
333 <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
334 <fo:block 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}">
335 <xsl:call-template name="division.title">
336 <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
337 </xsl:call-template>
338 </fo:block>
339 </xsl:template>
340
341 <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
342 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
343 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
344 </fo:block>
345 </xsl:template>
346
347 <xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
348 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
349 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
350 </fo:block>
351 </xsl:template>
352
353 <xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
354 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
355 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
356 </fo:block>
357 </xsl:template>
358
359 <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
360 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
361 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
362 </fo:block>
363 </xsl:template>
364
365 <xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
366 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
367 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
368 </fo:block>
369 </xsl:template>
370
371 <xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
372 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
373 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
374 </fo:block>
375 </xsl:template>
376
377 <xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
378 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
379 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
380 </fo:block>
381 </xsl:template>
382
383 <xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
384 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
385 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
386 </fo:block>
387 </xsl:template>
388
389 <xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
390 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
391 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
392 </fo:block>
393 </xsl:template>
394
395 <xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
396 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
397 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
398 </fo:block>
399 </xsl:template>
400
401 <xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
402 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
403 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
404 </fo:block>
405 </xsl:template>
406
407 <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
408 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
409 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
410 </fo:block>
411 </xsl:template>
412
413 <xsl:template match="itermset" mode="set.titlepage.recto.auto.mode">
414 <fo:block xsl:use-attribute-sets="set.titlepage.recto.style">
415 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
416 </fo:block>
417 </xsl:template>
418
419 <xsl:template name="book.titlepage.recto">
420   <xsl:choose>
421     <xsl:when test="bookinfo/title">
422       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
423     </xsl:when>
424     <xsl:when test="info/title">
425       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
426     </xsl:when>
427     <xsl:when test="title">
428       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
429     </xsl:when>
430   </xsl:choose>
431
432   <xsl:choose>
433     <xsl:when test="bookinfo/subtitle">
434       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
435     </xsl:when>
436     <xsl:when test="info/subtitle">
437       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
438     </xsl:when>
439     <xsl:when test="subtitle">
440       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
441     </xsl:when>
442   </xsl:choose>
443
444   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
445   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
446   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
447   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
448   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
449   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
450   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/itermset"/>
451   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/itermset"/>
452 </xsl:template>
453
454 <xsl:template name="book.titlepage.verso">
455   <xsl:choose>
456     <xsl:when test="bookinfo/title">
457       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
458     </xsl:when>
459     <xsl:when test="info/title">
460       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
461     </xsl:when>
462     <xsl:when test="title">
463       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
464     </xsl:when>
465   </xsl:choose>
466
467   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
468   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
469   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
470   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
471   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
472   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
473   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
474   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
475   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
476   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
477   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
478   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
479   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
480   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
481   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
482   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
483   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
484   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
485 </xsl:template>
486
487 <xsl:template name="book.titlepage.separator"><fo:block break-after="page"/>
488 </xsl:template>
489
490 <xsl:template name="book.titlepage.before.recto">
491 </xsl:template>
492
493 <xsl:template name="book.titlepage.before.verso"><fo:block break-after="page"/>
494 </xsl:template>
495
496 <xsl:template name="book.titlepage">
497   <fo:block>
498     <xsl:variable name="recto.content">
499       <xsl:call-template name="book.titlepage.before.recto"/>
500       <xsl:call-template name="book.titlepage.recto"/>
501     </xsl:variable>
502     <xsl:variable name="recto.elements.count">
503       <xsl:choose>
504         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
505         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
506           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
507         <xsl:otherwise>1</xsl:otherwise>
508       </xsl:choose>
509     </xsl:variable>
510     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
511       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
512     </xsl:if>
513     <xsl:variable name="verso.content">
514       <xsl:call-template name="book.titlepage.before.verso"/>
515       <xsl:call-template name="book.titlepage.verso"/>
516     </xsl:variable>
517     <xsl:variable name="verso.elements.count">
518       <xsl:choose>
519         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
520         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
521           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
522         <xsl:otherwise>1</xsl:otherwise>
523       </xsl:choose>
524     </xsl:variable>
525     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
526       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
527     </xsl:if>
528     <xsl:call-template name="book.titlepage.separator"/>
529   </fo:block>
530 </xsl:template>
531
532 <xsl:template match="*" mode="book.titlepage.recto.mode">
533   <!-- if an element isn't found in this mode, -->
534   <!-- try the generic titlepage.mode -->
535   <xsl:apply-templates select="." mode="titlepage.mode"/>
536 </xsl:template>
537
538 <xsl:template match="*" mode="book.titlepage.verso.mode">
539   <!-- if an element isn't found in this mode, -->
540   <!-- try the generic titlepage.mode -->
541   <xsl:apply-templates select="." mode="titlepage.mode"/>
542 </xsl:template>
543
544 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
545 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
546 <xsl:call-template name="division.title">
547 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
548 </xsl:call-template>
549 </fo:block>
550 </xsl:template>
551
552 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
553 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}">
554 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
555 </fo:block>
556 </xsl:template>
557
558 <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
559 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next.within-column="always" space-before="2in">
560 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
561 </fo:block>
562 </xsl:template>
563
564 <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
565 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
566 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
567 </fo:block>
568 </xsl:template>
569
570 <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
571 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next.within-column="always">
572 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
573 </fo:block>
574 </xsl:template>
575
576 <xsl:template match="itermset" mode="book.titlepage.recto.auto.mode">
577 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style">
578 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
579 </fo:block>
580 </xsl:template>
581
582 <xsl:template match="title" mode="book.titlepage.verso.auto.mode">
583 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
584 <xsl:call-template name="book.verso.title">
585 </xsl:call-template>
586 </fo:block>
587 </xsl:template>
588
589 <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
590 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style">
591 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
592 </fo:block>
593 </xsl:template>
594
595 <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
596 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style">
597 <xsl:call-template name="verso.authorgroup">
598 </xsl:call-template>
599 </fo:block>
600 </xsl:template>
601
602 <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
603 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style">
604 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
605 </fo:block>
606 </xsl:template>
607
608 <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
609 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style">
610 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
611 </fo:block>
612 </xsl:template>
613
614 <xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
615 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
616 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
617 </fo:block>
618 </xsl:template>
619
620 <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
621 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
622 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
623 </fo:block>
624 </xsl:template>
625
626 <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
627 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style">
628 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
629 </fo:block>
630 </xsl:template>
631
632 <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
633 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style">
634 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
635 </fo:block>
636 </xsl:template>
637
638 <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
639 <fo:block xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
640 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
641 </fo:block>
642 </xsl:template>
643
644 <xsl:template name="part.titlepage.recto">
645   <xsl:choose>
646     <xsl:when test="partinfo/title">
647       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
648     </xsl:when>
649     <xsl:when test="docinfo/title">
650       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
651     </xsl:when>
652     <xsl:when test="info/title">
653       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
654     </xsl:when>
655     <xsl:when test="title">
656       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
657     </xsl:when>
658   </xsl:choose>
659
660   <xsl:choose>
661     <xsl:when test="partinfo/subtitle">
662       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
663     </xsl:when>
664     <xsl:when test="docinfo/subtitle">
665       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
666     </xsl:when>
667     <xsl:when test="info/subtitle">
668       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
669     </xsl:when>
670     <xsl:when test="subtitle">
671       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
672     </xsl:when>
673   </xsl:choose>
674
675   <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/itermset"/>
676   <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/itermset"/>
677   <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/itermset"/>
678 </xsl:template>
679
680 <xsl:template name="part.titlepage.verso">
681 </xsl:template>
682
683 <xsl:template name="part.titlepage.separator">
684 </xsl:template>
685
686 <xsl:template name="part.titlepage.before.recto">
687 </xsl:template>
688
689 <xsl:template name="part.titlepage.before.verso">
690 </xsl:template>
691
692 <xsl:template name="part.titlepage">
693   <fo:block>
694     <xsl:variable name="recto.content">
695       <xsl:call-template name="part.titlepage.before.recto"/>
696       <xsl:call-template name="part.titlepage.recto"/>
697     </xsl:variable>
698     <xsl:variable name="recto.elements.count">
699       <xsl:choose>
700         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
701         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
702           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
703         <xsl:otherwise>1</xsl:otherwise>
704       </xsl:choose>
705     </xsl:variable>
706     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
707       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
708     </xsl:if>
709     <xsl:variable name="verso.content">
710       <xsl:call-template name="part.titlepage.before.verso"/>
711       <xsl:call-template name="part.titlepage.verso"/>
712     </xsl:variable>
713     <xsl:variable name="verso.elements.count">
714       <xsl:choose>
715         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
716         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
717           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
718         <xsl:otherwise>1</xsl:otherwise>
719       </xsl:choose>
720     </xsl:variable>
721     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
722       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
723     </xsl:if>
724     <xsl:call-template name="part.titlepage.separator"/>
725   </fo:block>
726 </xsl:template>
727
728 <xsl:template match="*" mode="part.titlepage.recto.mode">
729   <!-- if an element isn't found in this mode, -->
730   <!-- try the generic titlepage.mode -->
731   <xsl:apply-templates select="." mode="titlepage.mode"/>
732 </xsl:template>
733
734 <xsl:template match="*" mode="part.titlepage.verso.mode">
735   <!-- if an element isn't found in this mode, -->
736   <!-- try the generic titlepage.mode -->
737   <xsl:apply-templates select="." mode="titlepage.mode"/>
738 </xsl:template>
739
740 <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
741 <fo:block 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}">
742 <xsl:call-template name="division.title">
743 <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
744 </xsl:call-template>
745 </fo:block>
746 </xsl:template>
747
748 <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
749 <fo:block 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}">
750 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
751 </fo:block>
752 </xsl:template>
753
754 <xsl:template match="itermset" mode="part.titlepage.recto.auto.mode">
755 <fo:block xsl:use-attribute-sets="part.titlepage.recto.style">
756 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
757 </fo:block>
758 </xsl:template>
759
760 <xsl:template name="partintro.titlepage.recto">
761   <xsl:choose>
762     <xsl:when test="partintroinfo/title">
763       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
764     </xsl:when>
765     <xsl:when test="docinfo/title">
766       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
767     </xsl:when>
768     <xsl:when test="info/title">
769       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
770     </xsl:when>
771     <xsl:when test="title">
772       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
773     </xsl:when>
774   </xsl:choose>
775
776   <xsl:choose>
777     <xsl:when test="partintroinfo/subtitle">
778       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
779     </xsl:when>
780     <xsl:when test="docinfo/subtitle">
781       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
782     </xsl:when>
783     <xsl:when test="info/subtitle">
784       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
785     </xsl:when>
786     <xsl:when test="subtitle">
787       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
788     </xsl:when>
789   </xsl:choose>
790
791   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
792   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
793   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
794   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
795   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
796   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
797   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
798   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
799   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
800   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
801   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
802   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
803   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
804   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
805   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
806   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
807   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
808   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
809   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
810   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
811   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
812   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
813   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
814   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
815   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
816   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
817   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
818   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
819   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
820   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
821   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
822   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
823   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
824   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/itermset"/>
825   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/itermset"/>
826   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/itermset"/>
827 </xsl:template>
828
829 <xsl:template name="partintro.titlepage.verso">
830 </xsl:template>
831
832 <xsl:template name="partintro.titlepage.separator">
833 </xsl:template>
834
835 <xsl:template name="partintro.titlepage.before.recto">
836 </xsl:template>
837
838 <xsl:template name="partintro.titlepage.before.verso">
839 </xsl:template>
840
841 <xsl:template name="partintro.titlepage">
842   <fo:block>
843     <xsl:variable name="recto.content">
844       <xsl:call-template name="partintro.titlepage.before.recto"/>
845       <xsl:call-template name="partintro.titlepage.recto"/>
846     </xsl:variable>
847     <xsl:variable name="recto.elements.count">
848       <xsl:choose>
849         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
850         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
851           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
852         <xsl:otherwise>1</xsl:otherwise>
853       </xsl:choose>
854     </xsl:variable>
855     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
856       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
857     </xsl:if>
858     <xsl:variable name="verso.content">
859       <xsl:call-template name="partintro.titlepage.before.verso"/>
860       <xsl:call-template name="partintro.titlepage.verso"/>
861     </xsl:variable>
862     <xsl:variable name="verso.elements.count">
863       <xsl:choose>
864         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
865         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
866           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
867         <xsl:otherwise>1</xsl:otherwise>
868       </xsl:choose>
869     </xsl:variable>
870     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
871       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
872     </xsl:if>
873     <xsl:call-template name="partintro.titlepage.separator"/>
874   </fo:block>
875 </xsl:template>
876
877 <xsl:template match="*" mode="partintro.titlepage.recto.mode">
878   <!-- if an element isn't found in this mode, -->
879   <!-- try the generic titlepage.mode -->
880   <xsl:apply-templates select="." mode="titlepage.mode"/>
881 </xsl:template>
882
883 <xsl:template match="*" mode="partintro.titlepage.verso.mode">
884   <!-- if an element isn't found in this mode, -->
885   <!-- try the generic titlepage.mode -->
886   <xsl:apply-templates select="." mode="titlepage.mode"/>
887 </xsl:template>
888
889 <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
890 <fo:block 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}">
891 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
892 </fo:block>
893 </xsl:template>
894
895 <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
896 <fo:block 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}">
897 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
898 </fo:block>
899 </xsl:template>
900
901 <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
902 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
903 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
904 </fo:block>
905 </xsl:template>
906
907 <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
908 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
909 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
910 </fo:block>
911 </xsl:template>
912
913 <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
914 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
915 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
916 </fo:block>
917 </xsl:template>
918
919 <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
920 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
921 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
922 </fo:block>
923 </xsl:template>
924
925 <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
926 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
927 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
928 </fo:block>
929 </xsl:template>
930
931 <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
932 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
933 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
934 </fo:block>
935 </xsl:template>
936
937 <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
938 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
939 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
940 </fo:block>
941 </xsl:template>
942
943 <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
944 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
945 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
946 </fo:block>
947 </xsl:template>
948
949 <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
950 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
951 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
952 </fo:block>
953 </xsl:template>
954
955 <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
956 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
957 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
958 </fo:block>
959 </xsl:template>
960
961 <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
962 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
963 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
964 </fo:block>
965 </xsl:template>
966
967 <xsl:template match="itermset" mode="partintro.titlepage.recto.auto.mode">
968 <fo:block xsl:use-attribute-sets="partintro.titlepage.recto.style">
969 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
970 </fo:block>
971 </xsl:template>
972
973 <xsl:template name="reference.titlepage.recto">
974   <xsl:choose>
975     <xsl:when test="referenceinfo/title">
976       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
977     </xsl:when>
978     <xsl:when test="docinfo/title">
979       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
980     </xsl:when>
981     <xsl:when test="info/title">
982       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
983     </xsl:when>
984     <xsl:when test="title">
985       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
986     </xsl:when>
987   </xsl:choose>
988
989   <xsl:choose>
990     <xsl:when test="referenceinfo/subtitle">
991       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
992     </xsl:when>
993     <xsl:when test="docinfo/subtitle">
994       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
995     </xsl:when>
996     <xsl:when test="info/subtitle">
997       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
998     </xsl:when>
999     <xsl:when test="subtitle">
1000       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
1001     </xsl:when>
1002   </xsl:choose>
1003
1004   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
1005   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1006   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
1007   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
1008   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1009   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
1010   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
1011   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
1012   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
1013   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
1014   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1015   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
1016   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
1017   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1018   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1019   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
1020   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1021   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
1022   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
1023   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1024   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
1025   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
1026   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1027   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
1028   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
1029   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
1030   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
1031   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
1032   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1033   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
1034   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
1035   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1036   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
1037   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/itermset"/>
1038   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1039   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/itermset"/>
1040 </xsl:template>
1041
1042 <xsl:template name="reference.titlepage.verso">
1043 </xsl:template>
1044
1045 <xsl:template name="reference.titlepage.separator">
1046 </xsl:template>
1047
1048 <xsl:template name="reference.titlepage.before.recto">
1049 </xsl:template>
1050
1051 <xsl:template name="reference.titlepage.before.verso">
1052 </xsl:template>
1053
1054 <xsl:template name="reference.titlepage">
1055   <fo:block>
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>
1089
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>
1095
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>
1101
1102 <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
1103 <fo:block 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>
1109
1110 <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
1111 <fo:block 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>
1115
1116 <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
1117 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1118 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1119 </fo:block>
1120 </xsl:template>
1121
1122 <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
1123 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1124 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1125 </fo:block>
1126 </xsl:template>
1127
1128 <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
1129 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1130 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1131 </fo:block>
1132 </xsl:template>
1133
1134 <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
1135 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1136 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1137 </fo:block>
1138 </xsl:template>
1139
1140 <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
1141 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1142 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1143 </fo:block>
1144 </xsl:template>
1145
1146 <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
1147 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1148 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1149 </fo:block>
1150 </xsl:template>
1151
1152 <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
1153 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1154 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1155 </fo:block>
1156 </xsl:template>
1157
1158 <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
1159 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1160 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1161 </fo:block>
1162 </xsl:template>
1163
1164 <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
1165 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1166 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1167 </fo:block>
1168 </xsl:template>
1169
1170 <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
1171 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1172 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1173 </fo:block>
1174 </xsl:template>
1175
1176 <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
1177 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1178 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1179 </fo:block>
1180 </xsl:template>
1181
1182 <xsl:template match="itermset" mode="reference.titlepage.recto.auto.mode">
1183 <fo:block xsl:use-attribute-sets="reference.titlepage.recto.style">
1184 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1185 </fo:block>
1186 </xsl:template>
1187
1188 <xsl:template name="refsynopsisdiv.titlepage.recto">
1189   <xsl:choose>
1190     <xsl:when test="refsynopsisdivinfo/title">
1191       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
1192     </xsl:when>
1193     <xsl:when test="docinfo/title">
1194       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
1195     </xsl:when>
1196     <xsl:when test="info/title">
1197       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
1198     </xsl:when>
1199     <xsl:when test="title">
1200       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
1201     </xsl:when>
1202   </xsl:choose>
1203
1204   <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/itermset"/>
1205   <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1206   <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/itermset"/>
1207 </xsl:template>
1208
1209 <xsl:template name="refsynopsisdiv.titlepage.verso">
1210 </xsl:template>
1211
1212 <xsl:template name="refsynopsisdiv.titlepage.separator">
1213 </xsl:template>
1214
1215 <xsl:template name="refsynopsisdiv.titlepage.before.recto">
1216 </xsl:template>
1217
1218 <xsl:template name="refsynopsisdiv.titlepage.before.verso">
1219 </xsl:template>
1220
1221 <xsl:template name="refsynopsisdiv.titlepage">
1222   <fo:block>
1223     <xsl:variable name="recto.content">
1224       <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
1225       <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
1226     </xsl:variable>
1227     <xsl:variable name="recto.elements.count">
1228       <xsl:choose>
1229         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1230         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1231           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1232         <xsl:otherwise>1</xsl:otherwise>
1233       </xsl:choose>
1234     </xsl:variable>
1235     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1236       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1237     </xsl:if>
1238     <xsl:variable name="verso.content">
1239       <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
1240       <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
1241     </xsl:variable>
1242     <xsl:variable name="verso.elements.count">
1243       <xsl:choose>
1244         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1245         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1246           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1247         <xsl:otherwise>1</xsl:otherwise>
1248       </xsl:choose>
1249     </xsl:variable>
1250     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1251       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1252     </xsl:if>
1253     <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
1254   </fo:block>
1255 </xsl:template>
1256
1257 <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
1258   <!-- if an element isn't found in this mode, -->
1259   <!-- try the generic titlepage.mode -->
1260   <xsl:apply-templates select="." mode="titlepage.mode"/>
1261 </xsl:template>
1262
1263 <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
1264   <!-- if an element isn't found in this mode, -->
1265   <!-- try the generic titlepage.mode -->
1266   <xsl:apply-templates select="." mode="titlepage.mode"/>
1267 </xsl:template>
1268
1269 <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
1270 <fo:block xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
1271 <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
1272 </fo:block>
1273 </xsl:template>
1274
1275 <xsl:template match="itermset" mode="refsynopsisdiv.titlepage.recto.auto.mode">
1276 <fo:block xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style">
1277 <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
1278 </fo:block>
1279 </xsl:template>
1280
1281 <xsl:template name="refsection.titlepage.recto">
1282   <xsl:choose>
1283     <xsl:when test="refsectioninfo/title">
1284       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
1285     </xsl:when>
1286     <xsl:when test="docinfo/title">
1287       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
1288     </xsl:when>
1289     <xsl:when test="info/title">
1290       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
1291     </xsl:when>
1292     <xsl:when test="title">
1293       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
1294     </xsl:when>
1295   </xsl:choose>
1296
1297   <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/itermset"/>
1298   <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1299   <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/itermset"/>
1300 </xsl:template>
1301
1302 <xsl:template name="refsection.titlepage.verso">
1303 </xsl:template>
1304
1305 <xsl:template name="refsection.titlepage.separator">
1306 </xsl:template>
1307
1308 <xsl:template name="refsection.titlepage.before.recto">
1309 </xsl:template>
1310
1311 <xsl:template name="refsection.titlepage.before.verso">
1312 </xsl:template>
1313
1314 <xsl:template name="refsection.titlepage">
1315   <fo:block>
1316     <xsl:variable name="recto.content">
1317       <xsl:call-template name="refsection.titlepage.before.recto"/>
1318       <xsl:call-template name="refsection.titlepage.recto"/>
1319     </xsl:variable>
1320     <xsl:variable name="recto.elements.count">
1321       <xsl:choose>
1322         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1323         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1324           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1325         <xsl:otherwise>1</xsl:otherwise>
1326       </xsl:choose>
1327     </xsl:variable>
1328     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1329       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1330     </xsl:if>
1331     <xsl:variable name="verso.content">
1332       <xsl:call-template name="refsection.titlepage.before.verso"/>
1333       <xsl:call-template name="refsection.titlepage.verso"/>
1334     </xsl:variable>
1335     <xsl:variable name="verso.elements.count">
1336       <xsl:choose>
1337         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1338         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1339           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1340         <xsl:otherwise>1</xsl:otherwise>
1341       </xsl:choose>
1342     </xsl:variable>
1343     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1344       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1345     </xsl:if>
1346     <xsl:call-template name="refsection.titlepage.separator"/>
1347   </fo:block>
1348 </xsl:template>
1349
1350 <xsl:template match="*" mode="refsection.titlepage.recto.mode">
1351   <!-- if an element isn't found in this mode, -->
1352   <!-- try the generic titlepage.mode -->
1353   <xsl:apply-templates select="." mode="titlepage.mode"/>
1354 </xsl:template>
1355
1356 <xsl:template match="*" mode="refsection.titlepage.verso.mode">
1357   <!-- if an element isn't found in this mode, -->
1358   <!-- try the generic titlepage.mode -->
1359   <xsl:apply-templates select="." mode="titlepage.mode"/>
1360 </xsl:template>
1361
1362 <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
1363 <fo:block xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
1364 <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
1365 </fo:block>
1366 </xsl:template>
1367
1368 <xsl:template match="itermset" mode="refsection.titlepage.recto.auto.mode">
1369 <fo:block xsl:use-attribute-sets="refsection.titlepage.recto.style">
1370 <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
1371 </fo:block>
1372 </xsl:template>
1373
1374 <xsl:template name="refsect1.titlepage.recto">
1375   <xsl:choose>
1376     <xsl:when test="refsect1info/title">
1377       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
1378     </xsl:when>
1379     <xsl:when test="docinfo/title">
1380       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
1381     </xsl:when>
1382     <xsl:when test="info/title">
1383       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
1384     </xsl:when>
1385     <xsl:when test="title">
1386       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
1387     </xsl:when>
1388   </xsl:choose>
1389
1390   <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/itermset"/>
1391   <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1392   <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/itermset"/>
1393 </xsl:template>
1394
1395 <xsl:template name="refsect1.titlepage.verso">
1396 </xsl:template>
1397
1398 <xsl:template name="refsect1.titlepage.separator">
1399 </xsl:template>
1400
1401 <xsl:template name="refsect1.titlepage.before.recto">
1402 </xsl:template>
1403
1404 <xsl:template name="refsect1.titlepage.before.verso">
1405 </xsl:template>
1406
1407 <xsl:template name="refsect1.titlepage">
1408   <fo:block>
1409     <xsl:variable name="recto.content">
1410       <xsl:call-template name="refsect1.titlepage.before.recto"/>
1411       <xsl:call-template name="refsect1.titlepage.recto"/>
1412     </xsl:variable>
1413     <xsl:variable name="recto.elements.count">
1414       <xsl:choose>
1415         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1416         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1417           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1418         <xsl:otherwise>1</xsl:otherwise>
1419       </xsl:choose>
1420     </xsl:variable>
1421     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1422       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1423     </xsl:if>
1424     <xsl:variable name="verso.content">
1425       <xsl:call-template name="refsect1.titlepage.before.verso"/>
1426       <xsl:call-template name="refsect1.titlepage.verso"/>
1427     </xsl:variable>
1428     <xsl:variable name="verso.elements.count">
1429       <xsl:choose>
1430         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1431         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1432           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1433         <xsl:otherwise>1</xsl:otherwise>
1434       </xsl:choose>
1435     </xsl:variable>
1436     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1437       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1438     </xsl:if>
1439     <xsl:call-template name="refsect1.titlepage.separator"/>
1440   </fo:block>
1441 </xsl:template>
1442
1443 <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
1444   <!-- if an element isn't found in this mode, -->
1445   <!-- try the generic titlepage.mode -->
1446   <xsl:apply-templates select="." mode="titlepage.mode"/>
1447 </xsl:template>
1448
1449 <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
1450   <!-- if an element isn't found in this mode, -->
1451   <!-- try the generic titlepage.mode -->
1452   <xsl:apply-templates select="." mode="titlepage.mode"/>
1453 </xsl:template>
1454
1455 <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
1456 <fo:block xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
1457 <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
1458 </fo:block>
1459 </xsl:template>
1460
1461 <xsl:template match="itermset" mode="refsect1.titlepage.recto.auto.mode">
1462 <fo:block xsl:use-attribute-sets="refsect1.titlepage.recto.style">
1463 <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
1464 </fo:block>
1465 </xsl:template>
1466
1467 <xsl:template name="refsect2.titlepage.recto">
1468   <xsl:choose>
1469     <xsl:when test="refsect2info/title">
1470       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
1471     </xsl:when>
1472     <xsl:when test="docinfo/title">
1473       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
1474     </xsl:when>
1475     <xsl:when test="info/title">
1476       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
1477     </xsl:when>
1478     <xsl:when test="title">
1479       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
1480     </xsl:when>
1481   </xsl:choose>
1482
1483   <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/itermset"/>
1484   <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1485   <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/itermset"/>
1486 </xsl:template>
1487
1488 <xsl:template name="refsect2.titlepage.verso">
1489 </xsl:template>
1490
1491 <xsl:template name="refsect2.titlepage.separator">
1492 </xsl:template>
1493
1494 <xsl:template name="refsect2.titlepage.before.recto">
1495 </xsl:template>
1496
1497 <xsl:template name="refsect2.titlepage.before.verso">
1498 </xsl:template>
1499
1500 <xsl:template name="refsect2.titlepage">
1501   <fo:block>
1502     <xsl:variable name="recto.content">
1503       <xsl:call-template name="refsect2.titlepage.before.recto"/>
1504       <xsl:call-template name="refsect2.titlepage.recto"/>
1505     </xsl:variable>
1506     <xsl:variable name="recto.elements.count">
1507       <xsl:choose>
1508         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1509         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1510           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1511         <xsl:otherwise>1</xsl:otherwise>
1512       </xsl:choose>
1513     </xsl:variable>
1514     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1515       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1516     </xsl:if>
1517     <xsl:variable name="verso.content">
1518       <xsl:call-template name="refsect2.titlepage.before.verso"/>
1519       <xsl:call-template name="refsect2.titlepage.verso"/>
1520     </xsl:variable>
1521     <xsl:variable name="verso.elements.count">
1522       <xsl:choose>
1523         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1524         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1525           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1526         <xsl:otherwise>1</xsl:otherwise>
1527       </xsl:choose>
1528     </xsl:variable>
1529     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1530       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1531     </xsl:if>
1532     <xsl:call-template name="refsect2.titlepage.separator"/>
1533   </fo:block>
1534 </xsl:template>
1535
1536 <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
1537   <!-- if an element isn't found in this mode, -->
1538   <!-- try the generic titlepage.mode -->
1539   <xsl:apply-templates select="." mode="titlepage.mode"/>
1540 </xsl:template>
1541
1542 <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
1543   <!-- if an element isn't found in this mode, -->
1544   <!-- try the generic titlepage.mode -->
1545   <xsl:apply-templates select="." mode="titlepage.mode"/>
1546 </xsl:template>
1547
1548 <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
1549 <fo:block xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
1550 <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
1551 </fo:block>
1552 </xsl:template>
1553
1554 <xsl:template match="itermset" mode="refsect2.titlepage.recto.auto.mode">
1555 <fo:block xsl:use-attribute-sets="refsect2.titlepage.recto.style">
1556 <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
1557 </fo:block>
1558 </xsl:template>
1559
1560 <xsl:template name="refsect3.titlepage.recto">
1561   <xsl:choose>
1562     <xsl:when test="refsect3info/title">
1563       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
1564     </xsl:when>
1565     <xsl:when test="docinfo/title">
1566       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
1567     </xsl:when>
1568     <xsl:when test="info/title">
1569       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
1570     </xsl:when>
1571     <xsl:when test="title">
1572       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
1573     </xsl:when>
1574   </xsl:choose>
1575
1576   <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/itermset"/>
1577   <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1578   <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/itermset"/>
1579 </xsl:template>
1580
1581 <xsl:template name="refsect3.titlepage.verso">
1582 </xsl:template>
1583
1584 <xsl:template name="refsect3.titlepage.separator">
1585 </xsl:template>
1586
1587 <xsl:template name="refsect3.titlepage.before.recto">
1588 </xsl:template>
1589
1590 <xsl:template name="refsect3.titlepage.before.verso">
1591 </xsl:template>
1592
1593 <xsl:template name="refsect3.titlepage">
1594   <fo:block>
1595     <xsl:variable name="recto.content">
1596       <xsl:call-template name="refsect3.titlepage.before.recto"/>
1597       <xsl:call-template name="refsect3.titlepage.recto"/>
1598     </xsl:variable>
1599     <xsl:variable name="recto.elements.count">
1600       <xsl:choose>
1601         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1602         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1603           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1604         <xsl:otherwise>1</xsl:otherwise>
1605       </xsl:choose>
1606     </xsl:variable>
1607     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1608       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1609     </xsl:if>
1610     <xsl:variable name="verso.content">
1611       <xsl:call-template name="refsect3.titlepage.before.verso"/>
1612       <xsl:call-template name="refsect3.titlepage.verso"/>
1613     </xsl:variable>
1614     <xsl:variable name="verso.elements.count">
1615       <xsl:choose>
1616         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1617         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1618           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1619         <xsl:otherwise>1</xsl:otherwise>
1620       </xsl:choose>
1621     </xsl:variable>
1622     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1623       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1624     </xsl:if>
1625     <xsl:call-template name="refsect3.titlepage.separator"/>
1626   </fo:block>
1627 </xsl:template>
1628
1629 <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
1630   <!-- if an element isn't found in this mode, -->
1631   <!-- try the generic titlepage.mode -->
1632   <xsl:apply-templates select="." mode="titlepage.mode"/>
1633 </xsl:template>
1634
1635 <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
1636   <!-- if an element isn't found in this mode, -->
1637   <!-- try the generic titlepage.mode -->
1638   <xsl:apply-templates select="." mode="titlepage.mode"/>
1639 </xsl:template>
1640
1641 <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
1642 <fo:block xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
1643 <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
1644 </fo:block>
1645 </xsl:template>
1646
1647 <xsl:template match="itermset" mode="refsect3.titlepage.recto.auto.mode">
1648 <fo:block xsl:use-attribute-sets="refsect3.titlepage.recto.style">
1649 <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
1650 </fo:block>
1651 </xsl:template>
1652
1653 <xsl:template name="dedication.titlepage.recto">
1654   <fo:block xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1655 <xsl:call-template name="component.title">
1656 <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
1657 </xsl:call-template></fo:block>
1658   <xsl:choose>
1659     <xsl:when test="dedicationinfo/subtitle">
1660       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
1661     </xsl:when>
1662     <xsl:when test="docinfo/subtitle">
1663       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1664     </xsl:when>
1665     <xsl:when test="info/subtitle">
1666       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
1667     </xsl:when>
1668     <xsl:when test="subtitle">
1669       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
1670     </xsl:when>
1671   </xsl:choose>
1672
1673   <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/itermset"/>
1674   <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1675   <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/itermset"/>
1676 </xsl:template>
1677
1678 <xsl:template name="dedication.titlepage.verso">
1679 </xsl:template>
1680
1681 <xsl:template name="dedication.titlepage.separator">
1682 </xsl:template>
1683
1684 <xsl:template name="dedication.titlepage.before.recto">
1685 </xsl:template>
1686
1687 <xsl:template name="dedication.titlepage.before.verso">
1688 </xsl:template>
1689
1690 <xsl:template name="dedication.titlepage">
1691   <fo:block>
1692     <xsl:variable name="recto.content">
1693       <xsl:call-template name="dedication.titlepage.before.recto"/>
1694       <xsl:call-template name="dedication.titlepage.recto"/>
1695     </xsl:variable>
1696     <xsl:variable name="recto.elements.count">
1697       <xsl:choose>
1698         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1699         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1700           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1701         <xsl:otherwise>1</xsl:otherwise>
1702       </xsl:choose>
1703     </xsl:variable>
1704     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1705       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1706     </xsl:if>
1707     <xsl:variable name="verso.content">
1708       <xsl:call-template name="dedication.titlepage.before.verso"/>
1709       <xsl:call-template name="dedication.titlepage.verso"/>
1710     </xsl:variable>
1711     <xsl:variable name="verso.elements.count">
1712       <xsl:choose>
1713         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1714         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1715           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1716         <xsl:otherwise>1</xsl:otherwise>
1717       </xsl:choose>
1718     </xsl:variable>
1719     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1720       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1721     </xsl:if>
1722     <xsl:call-template name="dedication.titlepage.separator"/>
1723   </fo:block>
1724 </xsl:template>
1725
1726 <xsl:template match="*" mode="dedication.titlepage.recto.mode">
1727   <!-- if an element isn't found in this mode, -->
1728   <!-- try the generic titlepage.mode -->
1729   <xsl:apply-templates select="." mode="titlepage.mode"/>
1730 </xsl:template>
1731
1732 <xsl:template match="*" mode="dedication.titlepage.verso.mode">
1733   <!-- if an element isn't found in this mode, -->
1734   <!-- try the generic titlepage.mode -->
1735   <xsl:apply-templates select="." mode="titlepage.mode"/>
1736 </xsl:template>
1737
1738 <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
1739 <fo:block xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
1740 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1741 </fo:block>
1742 </xsl:template>
1743
1744 <xsl:template match="itermset" mode="dedication.titlepage.recto.auto.mode">
1745 <fo:block xsl:use-attribute-sets="dedication.titlepage.recto.style">
1746 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1747 </fo:block>
1748 </xsl:template>
1749
1750 <xsl:template name="acknowledgements.titlepage.recto">
1751   <fo:block xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1752 <xsl:call-template name="component.title">
1753 <xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
1754 </xsl:call-template></fo:block>
1755   <xsl:choose>
1756     <xsl:when test="acknowledgementsinfo/subtitle">
1757       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
1758     </xsl:when>
1759     <xsl:when test="docinfo/subtitle">
1760       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1761     </xsl:when>
1762     <xsl:when test="info/subtitle">
1763       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
1764     </xsl:when>
1765     <xsl:when test="subtitle">
1766       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
1767     </xsl:when>
1768   </xsl:choose>
1769
1770   <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/itermset"/>
1771   <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1772   <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/itermset"/>
1773 </xsl:template>
1774
1775 <xsl:template name="acknowledgements.titlepage.verso">
1776 </xsl:template>
1777
1778 <xsl:template name="acknowledgements.titlepage.separator">
1779 </xsl:template>
1780
1781 <xsl:template name="acknowledgements.titlepage.before.recto">
1782 </xsl:template>
1783
1784 <xsl:template name="acknowledgements.titlepage.before.verso">
1785 </xsl:template>
1786
1787 <xsl:template name="acknowledgements.titlepage">
1788   <fo:block>
1789     <xsl:variable name="recto.content">
1790       <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
1791       <xsl:call-template name="acknowledgements.titlepage.recto"/>
1792     </xsl:variable>
1793     <xsl:variable name="recto.elements.count">
1794       <xsl:choose>
1795         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1796         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1797           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1798         <xsl:otherwise>1</xsl:otherwise>
1799       </xsl:choose>
1800     </xsl:variable>
1801     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1802       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1803     </xsl:if>
1804     <xsl:variable name="verso.content">
1805       <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
1806       <xsl:call-template name="acknowledgements.titlepage.verso"/>
1807     </xsl:variable>
1808     <xsl:variable name="verso.elements.count">
1809       <xsl:choose>
1810         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1811         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1812           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1813         <xsl:otherwise>1</xsl:otherwise>
1814       </xsl:choose>
1815     </xsl:variable>
1816     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1817       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1818     </xsl:if>
1819     <xsl:call-template name="acknowledgements.titlepage.separator"/>
1820   </fo:block>
1821 </xsl:template>
1822
1823 <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
1824   <!-- if an element isn't found in this mode, -->
1825   <!-- try the generic titlepage.mode -->
1826   <xsl:apply-templates select="." mode="titlepage.mode"/>
1827 </xsl:template>
1828
1829 <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
1830   <!-- if an element isn't found in this mode, -->
1831   <!-- try the generic titlepage.mode -->
1832   <xsl:apply-templates select="." mode="titlepage.mode"/>
1833 </xsl:template>
1834
1835 <xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
1836 <fo:block xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" font-family="{$title.fontset}">
1837 <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1838 </fo:block>
1839 </xsl:template>
1840
1841 <xsl:template match="itermset" mode="acknowledgements.titlepage.recto.auto.mode">
1842 <fo:block xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1843 <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1844 </fo:block>
1845 </xsl:template>
1846
1847 <xsl:template name="preface.titlepage.recto">
1848   <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1849 <xsl:call-template name="component.title">
1850 <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
1851 </xsl:call-template></fo:block>
1852   <xsl:choose>
1853     <xsl:when test="prefaceinfo/subtitle">
1854       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
1855     </xsl:when>
1856     <xsl:when test="docinfo/subtitle">
1857       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1858     </xsl:when>
1859     <xsl:when test="info/subtitle">
1860       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
1861     </xsl:when>
1862     <xsl:when test="subtitle">
1863       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
1864     </xsl:when>
1865   </xsl:choose>
1866
1867   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
1868   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1869   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
1870   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
1871   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1872   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
1873   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
1874   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
1875   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
1876   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
1877   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1878   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
1879   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
1880   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1881   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1882   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
1883   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1884   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
1885   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
1886   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1887   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
1888   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
1889   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1890   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
1891   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
1892   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
1893   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
1894   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
1895   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1896   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
1897   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
1898   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1899   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
1900   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/itermset"/>
1901   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1902   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/itermset"/>
1903 </xsl:template>
1904
1905 <xsl:template name="preface.titlepage.verso">
1906 </xsl:template>
1907
1908 <xsl:template name="preface.titlepage.separator">
1909 </xsl:template>
1910
1911 <xsl:template name="preface.titlepage.before.recto">
1912 </xsl:template>
1913
1914 <xsl:template name="preface.titlepage.before.verso">
1915 </xsl:template>
1916
1917 <xsl:template name="preface.titlepage">
1918   <fo:block>
1919     <xsl:variable name="recto.content">
1920       <xsl:call-template name="preface.titlepage.before.recto"/>
1921       <xsl:call-template name="preface.titlepage.recto"/>
1922     </xsl:variable>
1923     <xsl:variable name="recto.elements.count">
1924       <xsl:choose>
1925         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1926         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1927           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1928         <xsl:otherwise>1</xsl:otherwise>
1929       </xsl:choose>
1930     </xsl:variable>
1931     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1932       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1933     </xsl:if>
1934     <xsl:variable name="verso.content">
1935       <xsl:call-template name="preface.titlepage.before.verso"/>
1936       <xsl:call-template name="preface.titlepage.verso"/>
1937     </xsl:variable>
1938     <xsl:variable name="verso.elements.count">
1939       <xsl:choose>
1940         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1941         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1942           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1943         <xsl:otherwise>1</xsl:otherwise>
1944       </xsl:choose>
1945     </xsl:variable>
1946     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1947       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1948     </xsl:if>
1949     <xsl:call-template name="preface.titlepage.separator"/>
1950   </fo:block>
1951 </xsl:template>
1952
1953 <xsl:template match="*" mode="preface.titlepage.recto.mode">
1954   <!-- if an element isn't found in this mode, -->
1955   <!-- try the generic titlepage.mode -->
1956   <xsl:apply-templates select="." mode="titlepage.mode"/>
1957 </xsl:template>
1958
1959 <xsl:template match="*" mode="preface.titlepage.verso.mode">
1960   <!-- if an element isn't found in this mode, -->
1961   <!-- try the generic titlepage.mode -->
1962   <xsl:apply-templates select="." mode="titlepage.mode"/>
1963 </xsl:template>
1964
1965 <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
1966 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
1967 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1968 </fo:block>
1969 </xsl:template>
1970
1971 <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
1972 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
1973 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1974 </fo:block>
1975 </xsl:template>
1976
1977 <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
1978 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
1979 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1980 </fo:block>
1981 </xsl:template>
1982
1983 <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
1984 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
1985 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1986 </fo:block>
1987 </xsl:template>
1988
1989 <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
1990 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
1991 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1992 </fo:block>
1993 </xsl:template>
1994
1995 <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
1996 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
1997 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1998 </fo:block>
1999 </xsl:template>
2000
2001 <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
2002 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2003 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2004 </fo:block>
2005 </xsl:template>
2006
2007 <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
2008 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2009 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2010 </fo:block>
2011 </xsl:template>
2012
2013 <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
2014 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2015 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2016 </fo:block>
2017 </xsl:template>
2018
2019 <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
2020 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2021 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2022 </fo:block>
2023 </xsl:template>
2024
2025 <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
2026 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2027 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2028 </fo:block>
2029 </xsl:template>
2030
2031 <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
2032 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2033 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2034 </fo:block>
2035 </xsl:template>
2036
2037 <xsl:template match="itermset" mode="preface.titlepage.recto.auto.mode">
2038 <fo:block xsl:use-attribute-sets="preface.titlepage.recto.style">
2039 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2040 </fo:block>
2041 </xsl:template>
2042
2043 <xsl:template name="chapter.titlepage.recto">
2044   <xsl:choose>
2045     <xsl:when test="chapterinfo/title">
2046       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
2047     </xsl:when>
2048     <xsl:when test="docinfo/title">
2049       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
2050     </xsl:when>
2051     <xsl:when test="info/title">
2052       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
2053     </xsl:when>
2054     <xsl:when test="title">
2055       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
2056     </xsl:when>
2057   </xsl:choose>
2058
2059   <xsl:choose>
2060     <xsl:when test="chapterinfo/subtitle">
2061       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
2062     </xsl:when>
2063     <xsl:when test="docinfo/subtitle">
2064       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2065     </xsl:when>
2066     <xsl:when test="info/subtitle">
2067       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
2068     </xsl:when>
2069     <xsl:when test="subtitle">
2070       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
2071     </xsl:when>
2072   </xsl:choose>
2073
2074   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
2075   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
2076   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
2077   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
2078   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
2079   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
2080   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
2081   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
2082   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
2083   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
2084   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
2085   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
2086   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
2087   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
2088   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2089   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
2090   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
2091   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
2092   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
2093   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
2094   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
2095   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
2096   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
2097   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
2098   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
2099   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
2100   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
2101   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
2102   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
2103   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
2104   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
2105   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
2106   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
2107   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/itermset"/>
2108   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/itermset"/>
2109   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/itermset"/>
2110 </xsl:template>
2111
2112 <xsl:template name="chapter.titlepage.verso">
2113 </xsl:template>
2114
2115 <xsl:template name="chapter.titlepage.separator">
2116 </xsl:template>
2117
2118 <xsl:template name="chapter.titlepage.before.recto">
2119 </xsl:template>
2120
2121 <xsl:template name="chapter.titlepage.before.verso">
2122 </xsl:template>
2123
2124 <xsl:template name="chapter.titlepage">
2125   <fo:block font-family="{$title.fontset}">
2126     <xsl:variable name="recto.content">
2127       <xsl:call-template name="chapter.titlepage.before.recto"/>
2128       <xsl:call-template name="chapter.titlepage.recto"/>
2129     </xsl:variable>
2130     <xsl:variable name="recto.elements.count">
2131       <xsl:choose>
2132         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2133         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2134           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2135         <xsl:otherwise>1</xsl:otherwise>
2136       </xsl:choose>
2137     </xsl:variable>
2138     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2139       <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
2140     </xsl:if>
2141     <xsl:variable name="verso.content">
2142       <xsl:call-template name="chapter.titlepage.before.verso"/>
2143       <xsl:call-template name="chapter.titlepage.verso"/>
2144     </xsl:variable>
2145     <xsl:variable name="verso.elements.count">
2146       <xsl:choose>
2147         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2148         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2149           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2150         <xsl:otherwise>1</xsl:otherwise>
2151       </xsl:choose>
2152     </xsl:variable>
2153     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2154       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2155     </xsl:if>
2156     <xsl:call-template name="chapter.titlepage.separator"/>
2157   </fo:block>
2158 </xsl:template>
2159
2160 <xsl:template match="*" mode="chapter.titlepage.recto.mode">
2161   <!-- if an element isn't found in this mode, -->
2162   <!-- try the generic titlepage.mode -->
2163   <xsl:apply-templates select="." mode="titlepage.mode"/>
2164 </xsl:template>
2165
2166 <xsl:template match="*" mode="chapter.titlepage.verso.mode">
2167   <!-- if an element isn't found in this mode, -->
2168   <!-- try the generic titlepage.mode -->
2169   <xsl:apply-templates select="." mode="titlepage.mode"/>
2170 </xsl:template>
2171
2172 <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
2173 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
2174 <xsl:call-template name="component.title">
2175 <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
2176 </xsl:call-template>
2177 </fo:block>
2178 </xsl:template>
2179
2180 <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
2181 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
2182 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2183 </fo:block>
2184 </xsl:template>
2185
2186 <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
2187 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2188 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2189 </fo:block>
2190 </xsl:template>
2191
2192 <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
2193 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2194 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2195 </fo:block>
2196 </xsl:template>
2197
2198 <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
2199 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2200 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2201 </fo:block>
2202 </xsl:template>
2203
2204 <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
2205 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2206 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2207 </fo:block>
2208 </xsl:template>
2209
2210 <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
2211 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2212 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2213 </fo:block>
2214 </xsl:template>
2215
2216 <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
2217 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2218 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2219 </fo:block>
2220 </xsl:template>
2221
2222 <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
2223 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2224 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2225 </fo:block>
2226 </xsl:template>
2227
2228 <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
2229 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2230 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2231 </fo:block>
2232 </xsl:template>
2233
2234 <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
2235 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2236 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2237 </fo:block>
2238 </xsl:template>
2239
2240 <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
2241 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2242 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2243 </fo:block>
2244 </xsl:template>
2245
2246 <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
2247 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2248 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2249 </fo:block>
2250 </xsl:template>
2251
2252 <xsl:template match="itermset" mode="chapter.titlepage.recto.auto.mode">
2253 <fo:block xsl:use-attribute-sets="chapter.titlepage.recto.style">
2254 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2255 </fo:block>
2256 </xsl:template>
2257
2258 <xsl:template name="appendix.titlepage.recto">
2259   <xsl:choose>
2260     <xsl:when test="appendixinfo/title">
2261       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
2262     </xsl:when>
2263     <xsl:when test="docinfo/title">
2264       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
2265     </xsl:when>
2266     <xsl:when test="info/title">
2267       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
2268     </xsl:when>
2269     <xsl:when test="title">
2270       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
2271     </xsl:when>
2272   </xsl:choose>
2273
2274   <xsl:choose>
2275     <xsl:when test="appendixinfo/subtitle">
2276       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
2277     </xsl:when>
2278     <xsl:when test="docinfo/subtitle">
2279       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2280     </xsl:when>
2281     <xsl:when test="info/subtitle">
2282       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
2283     </xsl:when>
2284     <xsl:when test="subtitle">
2285       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
2286     </xsl:when>
2287   </xsl:choose>
2288
2289   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
2290   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
2291   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
2292   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
2293   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
2294   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
2295   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
2296   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
2297   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
2298   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
2299   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
2300   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
2301   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
2302   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
2303   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2304   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
2305   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
2306   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
2307   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
2308   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
2309   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
2310   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
2311   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
2312   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
2313   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
2314   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
2315   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
2316   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
2317   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
2318   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
2319   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
2320   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
2321   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
2322   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/itermset"/>
2323   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/itermset"/>
2324   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/itermset"/>
2325 </xsl:template>
2326
2327 <xsl:template name="appendix.titlepage.verso">
2328 </xsl:template>
2329
2330 <xsl:template name="appendix.titlepage.separator">
2331 </xsl:template>
2332
2333 <xsl:template name="appendix.titlepage.before.recto">
2334 </xsl:template>
2335
2336 <xsl:template name="appendix.titlepage.before.verso">
2337 </xsl:template>
2338
2339 <xsl:template name="appendix.titlepage">
2340   <fo:block>
2341     <xsl:variable name="recto.content">
2342       <xsl:call-template name="appendix.titlepage.before.recto"/>
2343       <xsl:call-template name="appendix.titlepage.recto"/>
2344     </xsl:variable>
2345     <xsl:variable name="recto.elements.count">
2346       <xsl:choose>
2347         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2348         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2349           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2350         <xsl:otherwise>1</xsl:otherwise>
2351       </xsl:choose>
2352     </xsl:variable>
2353     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2354       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2355     </xsl:if>
2356     <xsl:variable name="verso.content">
2357       <xsl:call-template name="appendix.titlepage.before.verso"/>
2358       <xsl:call-template name="appendix.titlepage.verso"/>
2359     </xsl:variable>
2360     <xsl:variable name="verso.elements.count">
2361       <xsl:choose>
2362         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2363         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2364           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2365         <xsl:otherwise>1</xsl:otherwise>
2366       </xsl:choose>
2367     </xsl:variable>
2368     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2369       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2370     </xsl:if>
2371     <xsl:call-template name="appendix.titlepage.separator"/>
2372   </fo:block>
2373 </xsl:template>
2374
2375 <xsl:template match="*" mode="appendix.titlepage.recto.mode">
2376   <!-- if an element isn't found in this mode, -->
2377   <!-- try the generic titlepage.mode -->
2378   <xsl:apply-templates select="." mode="titlepage.mode"/>
2379 </xsl:template>
2380
2381 <xsl:template match="*" mode="appendix.titlepage.verso.mode">
2382   <!-- if an element isn't found in this mode, -->
2383   <!-- try the generic titlepage.mode -->
2384   <xsl:apply-templates select="." mode="titlepage.mode"/>
2385 </xsl:template>
2386
2387 <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
2388 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
2389 <xsl:call-template name="component.title">
2390 <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
2391 </xsl:call-template>
2392 </fo:block>
2393 </xsl:template>
2394
2395 <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
2396 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
2397 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2398 </fo:block>
2399 </xsl:template>
2400
2401 <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
2402 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2403 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2404 </fo:block>
2405 </xsl:template>
2406
2407 <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
2408 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2409 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2410 </fo:block>
2411 </xsl:template>
2412
2413 <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
2414 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2415 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2416 </fo:block>
2417 </xsl:template>
2418
2419 <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
2420 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2421 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2422 </fo:block>
2423 </xsl:template>
2424
2425 <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
2426 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2427 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2428 </fo:block>
2429 </xsl:template>
2430
2431 <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
2432 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2433 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2434 </fo:block>
2435 </xsl:template>
2436
2437 <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
2438 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2439 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2440 </fo:block>
2441 </xsl:template>
2442
2443 <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
2444 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2445 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2446 </fo:block>
2447 </xsl:template>
2448
2449 <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
2450 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2451 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2452 </fo:block>
2453 </xsl:template>
2454
2455 <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
2456 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2457 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2458 </fo:block>
2459 </xsl:template>
2460
2461 <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
2462 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2463 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2464 </fo:block>
2465 </xsl:template>
2466
2467 <xsl:template match="itermset" mode="appendix.titlepage.recto.auto.mode">
2468 <fo:block xsl:use-attribute-sets="appendix.titlepage.recto.style">
2469 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2470 </fo:block>
2471 </xsl:template>
2472
2473 <xsl:template name="section.titlepage.recto">
2474   <xsl:choose>
2475     <xsl:when test="sectioninfo/title">
2476       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
2477     </xsl:when>
2478     <xsl:when test="info/title">
2479       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
2480     </xsl:when>
2481     <xsl:when test="title">
2482       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
2483     </xsl:when>
2484   </xsl:choose>
2485
2486   <xsl:choose>
2487     <xsl:when test="sectioninfo/subtitle">
2488       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
2489     </xsl:when>
2490     <xsl:when test="info/subtitle">
2491       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
2492     </xsl:when>
2493     <xsl:when test="subtitle">
2494       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
2495     </xsl:when>
2496   </xsl:choose>
2497
2498   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
2499   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
2500   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
2501   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
2502   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
2503   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
2504   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
2505   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
2506   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
2507   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2508   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
2509   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
2510   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
2511   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
2512   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
2513   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
2514   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
2515   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
2516   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
2517   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
2518   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
2519   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
2520   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/itermset"/>
2521   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/itermset"/>
2522 </xsl:template>
2523
2524 <xsl:template name="section.titlepage.verso">
2525 </xsl:template>
2526
2527 <xsl:template name="section.titlepage.separator">
2528 </xsl:template>
2529
2530 <xsl:template name="section.titlepage.before.recto">
2531 </xsl:template>
2532
2533 <xsl:template name="section.titlepage.before.verso">
2534 </xsl:template>
2535
2536 <xsl:template name="section.titlepage">
2537   <fo:block>
2538     <xsl:variable name="recto.content">
2539       <xsl:call-template name="section.titlepage.before.recto"/>
2540       <xsl:call-template name="section.titlepage.recto"/>
2541     </xsl:variable>
2542     <xsl:variable name="recto.elements.count">
2543       <xsl:choose>
2544         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2545         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2546           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2547         <xsl:otherwise>1</xsl:otherwise>
2548       </xsl:choose>
2549     </xsl:variable>
2550     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2551       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2552     </xsl:if>
2553     <xsl:variable name="verso.content">
2554       <xsl:call-template name="section.titlepage.before.verso"/>
2555       <xsl:call-template name="section.titlepage.verso"/>
2556     </xsl:variable>
2557     <xsl:variable name="verso.elements.count">
2558       <xsl:choose>
2559         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2560         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2561           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2562         <xsl:otherwise>1</xsl:otherwise>
2563       </xsl:choose>
2564     </xsl:variable>
2565     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2566       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2567     </xsl:if>
2568     <xsl:call-template name="section.titlepage.separator"/>
2569   </fo:block>
2570 </xsl:template>
2571
2572 <xsl:template match="*" mode="section.titlepage.recto.mode">
2573   <!-- if an element isn't found in this mode, -->
2574   <!-- try the generic titlepage.mode -->
2575   <xsl:apply-templates select="." mode="titlepage.mode"/>
2576 </xsl:template>
2577
2578 <xsl:template match="*" mode="section.titlepage.verso.mode">
2579   <!-- if an element isn't found in this mode, -->
2580   <!-- try the generic titlepage.mode -->
2581   <xsl:apply-templates select="." mode="titlepage.mode"/>
2582 </xsl:template>
2583
2584 <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
2585 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2586 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2587 </fo:block>
2588 </xsl:template>
2589
2590 <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
2591 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
2592 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2593 </fo:block>
2594 </xsl:template>
2595
2596 <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
2597 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2598 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2599 </fo:block>
2600 </xsl:template>
2601
2602 <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
2603 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2604 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2605 </fo:block>
2606 </xsl:template>
2607
2608 <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
2609 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2610 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2611 </fo:block>
2612 </xsl:template>
2613
2614 <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
2615 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2616 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2617 </fo:block>
2618 </xsl:template>
2619
2620 <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
2621 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2622 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2623 </fo:block>
2624 </xsl:template>
2625
2626 <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
2627 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2628 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2629 </fo:block>
2630 </xsl:template>
2631
2632 <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
2633 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2634 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2635 </fo:block>
2636 </xsl:template>
2637
2638 <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
2639 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2640 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2641 </fo:block>
2642 </xsl:template>
2643
2644 <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
2645 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2646 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2647 </fo:block>
2648 </xsl:template>
2649
2650 <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
2651 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2652 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2653 </fo:block>
2654 </xsl:template>
2655
2656 <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
2657 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2658 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2659 </fo:block>
2660 </xsl:template>
2661
2662 <xsl:template match="itermset" mode="section.titlepage.recto.auto.mode">
2663 <fo:block xsl:use-attribute-sets="section.titlepage.recto.style">
2664 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2665 </fo:block>
2666 </xsl:template>
2667
2668 <xsl:template name="sect1.titlepage.recto">
2669   <xsl:choose>
2670     <xsl:when test="sect1info/title">
2671       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
2672     </xsl:when>
2673     <xsl:when test="info/title">
2674       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
2675     </xsl:when>
2676     <xsl:when test="title">
2677       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
2678     </xsl:when>
2679   </xsl:choose>
2680
2681   <xsl:choose>
2682     <xsl:when test="sect1info/subtitle">
2683       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
2684     </xsl:when>
2685     <xsl:when test="info/subtitle">
2686       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
2687     </xsl:when>
2688     <xsl:when test="subtitle">
2689       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
2690     </xsl:when>
2691   </xsl:choose>
2692
2693   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
2694   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
2695   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
2696   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
2697   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
2698   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
2699   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
2700   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
2701   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
2702   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2703   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
2704   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
2705   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
2706   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
2707   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
2708   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
2709   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
2710   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
2711   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
2712   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
2713   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
2714   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
2715   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/itermset"/>
2716   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/itermset"/>
2717 </xsl:template>
2718
2719 <xsl:template name="sect1.titlepage.verso">
2720 </xsl:template>
2721
2722 <xsl:template name="sect1.titlepage.separator">
2723 </xsl:template>
2724
2725 <xsl:template name="sect1.titlepage.before.recto">
2726 </xsl:template>
2727
2728 <xsl:template name="sect1.titlepage.before.verso">
2729 </xsl:template>
2730
2731 <xsl:template name="sect1.titlepage">
2732   <fo:block>
2733     <xsl:variable name="recto.content">
2734       <xsl:call-template name="sect1.titlepage.before.recto"/>
2735       <xsl:call-template name="sect1.titlepage.recto"/>
2736     </xsl:variable>
2737     <xsl:variable name="recto.elements.count">
2738       <xsl:choose>
2739         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2740         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2741           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2742         <xsl:otherwise>1</xsl:otherwise>
2743       </xsl:choose>
2744     </xsl:variable>
2745     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2746       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2747     </xsl:if>
2748     <xsl:variable name="verso.content">
2749       <xsl:call-template name="sect1.titlepage.before.verso"/>
2750       <xsl:call-template name="sect1.titlepage.verso"/>
2751     </xsl:variable>
2752     <xsl:variable name="verso.elements.count">
2753       <xsl:choose>
2754         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2755         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2756           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2757         <xsl:otherwise>1</xsl:otherwise>
2758       </xsl:choose>
2759     </xsl:variable>
2760     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2761       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2762     </xsl:if>
2763     <xsl:call-template name="sect1.titlepage.separator"/>
2764   </fo:block>
2765 </xsl:template>
2766
2767 <xsl:template match="*" mode="sect1.titlepage.recto.mode">
2768   <!-- if an element isn't found in this mode, -->
2769   <!-- try the generic titlepage.mode -->
2770   <xsl:apply-templates select="." mode="titlepage.mode"/>
2771 </xsl:template>
2772
2773 <xsl:template match="*" mode="sect1.titlepage.verso.mode">
2774   <!-- if an element isn't found in this mode, -->
2775   <!-- try the generic titlepage.mode -->
2776   <xsl:apply-templates select="." mode="titlepage.mode"/>
2777 </xsl:template>
2778
2779 <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
2780 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2781 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2782 </fo:block>
2783 </xsl:template>
2784
2785 <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
2786 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
2787 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2788 </fo:block>
2789 </xsl:template>
2790
2791 <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
2792 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2793 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2794 </fo:block>
2795 </xsl:template>
2796
2797 <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
2798 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2799 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2800 </fo:block>
2801 </xsl:template>
2802
2803 <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
2804 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2805 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2806 </fo:block>
2807 </xsl:template>
2808
2809 <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
2810 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2811 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2812 </fo:block>
2813 </xsl:template>
2814
2815 <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2816 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2817 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2818 </fo:block>
2819 </xsl:template>
2820
2821 <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
2822 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2823 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2824 </fo:block>
2825 </xsl:template>
2826
2827 <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
2828 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2829 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2830 </fo:block>
2831 </xsl:template>
2832
2833 <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
2834 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2835 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2836 </fo:block>
2837 </xsl:template>
2838
2839 <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
2840 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2841 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2842 </fo:block>
2843 </xsl:template>
2844
2845 <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
2846 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2847 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2848 </fo:block>
2849 </xsl:template>
2850
2851 <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
2852 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2853 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2854 </fo:block>
2855 </xsl:template>
2856
2857 <xsl:template match="itermset" mode="sect1.titlepage.recto.auto.mode">
2858 <fo:block xsl:use-attribute-sets="sect1.titlepage.recto.style">
2859 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2860 </fo:block>
2861 </xsl:template>
2862
2863 <xsl:template name="sect2.titlepage.recto">
2864   <xsl:choose>
2865     <xsl:when test="sect2info/title">
2866       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
2867     </xsl:when>
2868     <xsl:when test="info/title">
2869       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
2870     </xsl:when>
2871     <xsl:when test="title">
2872       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
2873     </xsl:when>
2874   </xsl:choose>
2875
2876   <xsl:choose>
2877     <xsl:when test="sect2info/subtitle">
2878       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
2879     </xsl:when>
2880     <xsl:when test="info/subtitle">
2881       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
2882     </xsl:when>
2883     <xsl:when test="subtitle">
2884       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
2885     </xsl:when>
2886   </xsl:choose>
2887
2888   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
2889   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
2890   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
2891   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
2892   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
2893   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
2894   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
2895   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
2896   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
2897   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2898   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
2899   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
2900   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
2901   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
2902   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
2903   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
2904   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
2905   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
2906   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
2907   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
2908   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
2909   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
2910   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/itermset"/>
2911   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/itermset"/>
2912 </xsl:template>
2913
2914 <xsl:template name="sect2.titlepage.verso">
2915 </xsl:template>
2916
2917 <xsl:template name="sect2.titlepage.separator">
2918 </xsl:template>
2919
2920 <xsl:template name="sect2.titlepage.before.recto">
2921 </xsl:template>
2922
2923 <xsl:template name="sect2.titlepage.before.verso">
2924 </xsl:template>
2925
2926 <xsl:template name="sect2.titlepage">
2927   <fo:block>
2928     <xsl:variable name="recto.content">
2929       <xsl:call-template name="sect2.titlepage.before.recto"/>
2930       <xsl:call-template name="sect2.titlepage.recto"/>
2931     </xsl:variable>
2932     <xsl:variable name="recto.elements.count">
2933       <xsl:choose>
2934         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2935         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2936           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2937         <xsl:otherwise>1</xsl:otherwise>
2938       </xsl:choose>
2939     </xsl:variable>
2940     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2941       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2942     </xsl:if>
2943     <xsl:variable name="verso.content">
2944       <xsl:call-template name="sect2.titlepage.before.verso"/>
2945       <xsl:call-template name="sect2.titlepage.verso"/>
2946     </xsl:variable>
2947     <xsl:variable name="verso.elements.count">
2948       <xsl:choose>
2949         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2950         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2951           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2952         <xsl:otherwise>1</xsl:otherwise>
2953       </xsl:choose>
2954     </xsl:variable>
2955     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2956       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2957     </xsl:if>
2958     <xsl:call-template name="sect2.titlepage.separator"/>
2959   </fo:block>
2960 </xsl:template>
2961
2962 <xsl:template match="*" mode="sect2.titlepage.recto.mode">
2963   <!-- if an element isn't found in this mode, -->
2964   <!-- try the generic titlepage.mode -->
2965   <xsl:apply-templates select="." mode="titlepage.mode"/>
2966 </xsl:template>
2967
2968 <xsl:template match="*" mode="sect2.titlepage.verso.mode">
2969   <!-- if an element isn't found in this mode, -->
2970   <!-- try the generic titlepage.mode -->
2971   <xsl:apply-templates select="." mode="titlepage.mode"/>
2972 </xsl:template>
2973
2974 <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
2975 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2976 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2977 </fo:block>
2978 </xsl:template>
2979
2980 <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
2981 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
2982 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2983 </fo:block>
2984 </xsl:template>
2985
2986 <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
2987 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
2988 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2989 </fo:block>
2990 </xsl:template>
2991
2992 <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
2993 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
2994 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2995 </fo:block>
2996 </xsl:template>
2997
2998 <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
2999 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3000 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3001 </fo:block>
3002 </xsl:template>
3003
3004 <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
3005 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3006 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3007 </fo:block>
3008 </xsl:template>
3009
3010 <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
3011 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3012 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3013 </fo:block>
3014 </xsl:template>
3015
3016 <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
3017 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3018 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3019 </fo:block>
3020 </xsl:template>
3021
3022 <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
3023 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3024 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3025 </fo:block>
3026 </xsl:template>
3027
3028 <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
3029 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3030 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3031 </fo:block>
3032 </xsl:template>
3033
3034 <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
3035 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3036 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3037 </fo:block>
3038 </xsl:template>
3039
3040 <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
3041 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3042 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3043 </fo:block>
3044 </xsl:template>
3045
3046 <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
3047 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3048 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3049 </fo:block>
3050 </xsl:template>
3051
3052 <xsl:template match="itermset" mode="sect2.titlepage.recto.auto.mode">
3053 <fo:block xsl:use-attribute-sets="sect2.titlepage.recto.style">
3054 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3055 </fo:block>
3056 </xsl:template>
3057
3058 <xsl:template name="sect3.titlepage.recto">
3059   <xsl:choose>
3060     <xsl:when test="sect3info/title">
3061       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
3062     </xsl:when>
3063     <xsl:when test="info/title">
3064       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
3065     </xsl:when>
3066     <xsl:when test="title">
3067       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
3068     </xsl:when>
3069   </xsl:choose>
3070
3071   <xsl:choose>
3072     <xsl:when test="sect3info/subtitle">
3073       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
3074     </xsl:when>
3075     <xsl:when test="info/subtitle">
3076       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
3077     </xsl:when>
3078     <xsl:when test="subtitle">
3079       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
3080     </xsl:when>
3081   </xsl:choose>
3082
3083   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
3084   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
3085   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
3086   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
3087   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
3088   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
3089   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
3090   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
3091   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
3092   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3093   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
3094   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
3095   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
3096   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
3097   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
3098   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
3099   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
3100   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
3101   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
3102   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
3103   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
3104   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
3105   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/itermset"/>
3106   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/itermset"/>
3107 </xsl:template>
3108
3109 <xsl:template name="sect3.titlepage.verso">
3110 </xsl:template>
3111
3112 <xsl:template name="sect3.titlepage.separator">
3113 </xsl:template>
3114
3115 <xsl:template name="sect3.titlepage.before.recto">
3116 </xsl:template>
3117
3118 <xsl:template name="sect3.titlepage.before.verso">
3119 </xsl:template>
3120
3121 <xsl:template name="sect3.titlepage">
3122   <fo:block>
3123     <xsl:variable name="recto.content">
3124       <xsl:call-template name="sect3.titlepage.before.recto"/>
3125       <xsl:call-template name="sect3.titlepage.recto"/>
3126     </xsl:variable>
3127     <xsl:variable name="recto.elements.count">
3128       <xsl:choose>
3129         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3130         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3131           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3132         <xsl:otherwise>1</xsl:otherwise>
3133       </xsl:choose>
3134     </xsl:variable>
3135     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3136       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3137     </xsl:if>
3138     <xsl:variable name="verso.content">
3139       <xsl:call-template name="sect3.titlepage.before.verso"/>
3140       <xsl:call-template name="sect3.titlepage.verso"/>
3141     </xsl:variable>
3142     <xsl:variable name="verso.elements.count">
3143       <xsl:choose>
3144         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3145         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3146           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3147         <xsl:otherwise>1</xsl:otherwise>
3148       </xsl:choose>
3149     </xsl:variable>
3150     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3151       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3152     </xsl:if>
3153     <xsl:call-template name="sect3.titlepage.separator"/>
3154   </fo:block>
3155 </xsl:template>
3156
3157 <xsl:template match="*" mode="sect3.titlepage.recto.mode">
3158   <!-- if an element isn't found in this mode, -->
3159   <!-- try the generic titlepage.mode -->
3160   <xsl:apply-templates select="." mode="titlepage.mode"/>
3161 </xsl:template>
3162
3163 <xsl:template match="*" mode="sect3.titlepage.verso.mode">
3164   <!-- if an element isn't found in this mode, -->
3165   <!-- try the generic titlepage.mode -->
3166   <xsl:apply-templates select="." mode="titlepage.mode"/>
3167 </xsl:template>
3168
3169 <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
3170 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3171 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3172 </fo:block>
3173 </xsl:template>
3174
3175 <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
3176 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
3177 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3178 </fo:block>
3179 </xsl:template>
3180
3181 <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
3182 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3183 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3184 </fo:block>
3185 </xsl:template>
3186
3187 <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
3188 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3189 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3190 </fo:block>
3191 </xsl:template>
3192
3193 <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
3194 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3195 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3196 </fo:block>
3197 </xsl:template>
3198
3199 <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
3200 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3201 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3202 </fo:block>
3203 </xsl:template>
3204
3205 <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
3206 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3207 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3208 </fo:block>
3209 </xsl:template>
3210
3211 <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
3212 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3213 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3214 </fo:block>
3215 </xsl:template>
3216
3217 <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
3218 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3219 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3220 </fo:block>
3221 </xsl:template>
3222
3223 <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
3224 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3225 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3226 </fo:block>
3227 </xsl:template>
3228
3229 <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
3230 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3231 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3232 </fo:block>
3233 </xsl:template>
3234
3235 <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
3236 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3237 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3238 </fo:block>
3239 </xsl:template>
3240
3241 <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
3242 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3243 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3244 </fo:block>
3245 </xsl:template>
3246
3247 <xsl:template match="itermset" mode="sect3.titlepage.recto.auto.mode">
3248 <fo:block xsl:use-attribute-sets="sect3.titlepage.recto.style">
3249 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3250 </fo:block>
3251 </xsl:template>
3252
3253 <xsl:template name="sect4.titlepage.recto">
3254   <xsl:choose>
3255     <xsl:when test="sect4info/title">
3256       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
3257     </xsl:when>
3258     <xsl:when test="info/title">
3259       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
3260     </xsl:when>
3261     <xsl:when test="title">
3262       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
3263     </xsl:when>
3264   </xsl:choose>
3265
3266   <xsl:choose>
3267     <xsl:when test="sect4info/subtitle">
3268       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
3269     </xsl:when>
3270     <xsl:when test="info/subtitle">
3271       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
3272     </xsl:when>
3273     <xsl:when test="subtitle">
3274       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
3275     </xsl:when>
3276   </xsl:choose>
3277
3278   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
3279   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
3280   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
3281   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
3282   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
3283   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
3284   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
3285   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
3286   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
3287   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3288   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
3289   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
3290   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
3291   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
3292   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
3293   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
3294   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
3295   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
3296   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
3297   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
3298   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
3299   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
3300   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/itermset"/>
3301   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/itermset"/>
3302 </xsl:template>
3303
3304 <xsl:template name="sect4.titlepage.verso">
3305 </xsl:template>
3306
3307 <xsl:template name="sect4.titlepage.separator">
3308 </xsl:template>
3309
3310 <xsl:template name="sect4.titlepage.before.recto">
3311 </xsl:template>
3312
3313 <xsl:template name="sect4.titlepage.before.verso">
3314 </xsl:template>
3315
3316 <xsl:template name="sect4.titlepage">
3317   <fo:block>
3318     <xsl:variable name="recto.content">
3319       <xsl:call-template name="sect4.titlepage.before.recto"/>
3320       <xsl:call-template name="sect4.titlepage.recto"/>
3321     </xsl:variable>
3322     <xsl:variable name="recto.elements.count">
3323       <xsl:choose>
3324         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3325         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3326           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3327         <xsl:otherwise>1</xsl:otherwise>
3328       </xsl:choose>
3329     </xsl:variable>
3330     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3331       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3332     </xsl:if>
3333     <xsl:variable name="verso.content">
3334       <xsl:call-template name="sect4.titlepage.before.verso"/>
3335       <xsl:call-template name="sect4.titlepage.verso"/>
3336     </xsl:variable>
3337     <xsl:variable name="verso.elements.count">
3338       <xsl:choose>
3339         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3340         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3341           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3342         <xsl:otherwise>1</xsl:otherwise>
3343       </xsl:choose>
3344     </xsl:variable>
3345     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3346       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3347     </xsl:if>
3348     <xsl:call-template name="sect4.titlepage.separator"/>
3349   </fo:block>
3350 </xsl:template>
3351
3352 <xsl:template match="*" mode="sect4.titlepage.recto.mode">
3353   <!-- if an element isn't found in this mode, -->
3354   <!-- try the generic titlepage.mode -->
3355   <xsl:apply-templates select="." mode="titlepage.mode"/>
3356 </xsl:template>
3357
3358 <xsl:template match="*" mode="sect4.titlepage.verso.mode">
3359   <!-- if an element isn't found in this mode, -->
3360   <!-- try the generic titlepage.mode -->
3361   <xsl:apply-templates select="." mode="titlepage.mode"/>
3362 </xsl:template>
3363
3364 <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
3365 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3366 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3367 </fo:block>
3368 </xsl:template>
3369
3370 <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
3371 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
3372 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3373 </fo:block>
3374 </xsl:template>
3375
3376 <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
3377 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3378 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3379 </fo:block>
3380 </xsl:template>
3381
3382 <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
3383 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3384 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3385 </fo:block>
3386 </xsl:template>
3387
3388 <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
3389 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3390 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3391 </fo:block>
3392 </xsl:template>
3393
3394 <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
3395 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3396 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3397 </fo:block>
3398 </xsl:template>
3399
3400 <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
3401 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3402 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3403 </fo:block>
3404 </xsl:template>
3405
3406 <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
3407 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3408 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3409 </fo:block>
3410 </xsl:template>
3411
3412 <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
3413 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3414 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3415 </fo:block>
3416 </xsl:template>
3417
3418 <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
3419 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3420 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3421 </fo:block>
3422 </xsl:template>
3423
3424 <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
3425 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3426 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3427 </fo:block>
3428 </xsl:template>
3429
3430 <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
3431 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3432 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3433 </fo:block>
3434 </xsl:template>
3435
3436 <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
3437 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3438 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3439 </fo:block>
3440 </xsl:template>
3441
3442 <xsl:template match="itermset" mode="sect4.titlepage.recto.auto.mode">
3443 <fo:block xsl:use-attribute-sets="sect4.titlepage.recto.style">
3444 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3445 </fo:block>
3446 </xsl:template>
3447
3448 <xsl:template name="sect5.titlepage.recto">
3449   <xsl:choose>
3450     <xsl:when test="sect5info/title">
3451       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
3452     </xsl:when>
3453     <xsl:when test="info/title">
3454       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
3455     </xsl:when>
3456     <xsl:when test="title">
3457       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
3458     </xsl:when>
3459   </xsl:choose>
3460
3461   <xsl:choose>
3462     <xsl:when test="sect5info/subtitle">
3463       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
3464     </xsl:when>
3465     <xsl:when test="info/subtitle">
3466       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
3467     </xsl:when>
3468     <xsl:when test="subtitle">
3469       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
3470     </xsl:when>
3471   </xsl:choose>
3472
3473   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
3474   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
3475   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
3476   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
3477   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
3478   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
3479   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
3480   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
3481   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
3482   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3483   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
3484   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
3485   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
3486   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
3487   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
3488   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
3489   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
3490   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
3491   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
3492   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
3493   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
3494   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
3495   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/itermset"/>
3496   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/itermset"/>
3497 </xsl:template>
3498
3499 <xsl:template name="sect5.titlepage.verso">
3500 </xsl:template>
3501
3502 <xsl:template name="sect5.titlepage.separator">
3503 </xsl:template>
3504
3505 <xsl:template name="sect5.titlepage.before.recto">
3506 </xsl:template>
3507
3508 <xsl:template name="sect5.titlepage.before.verso">
3509 </xsl:template>
3510
3511 <xsl:template name="sect5.titlepage">
3512   <fo:block>
3513     <xsl:variable name="recto.content">
3514       <xsl:call-template name="sect5.titlepage.before.recto"/>
3515       <xsl:call-template name="sect5.titlepage.recto"/>
3516     </xsl:variable>
3517     <xsl:variable name="recto.elements.count">
3518       <xsl:choose>
3519         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3520         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3521           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3522         <xsl:otherwise>1</xsl:otherwise>
3523       </xsl:choose>
3524     </xsl:variable>
3525     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3526       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3527     </xsl:if>
3528     <xsl:variable name="verso.content">
3529       <xsl:call-template name="sect5.titlepage.before.verso"/>
3530       <xsl:call-template name="sect5.titlepage.verso"/>
3531     </xsl:variable>
3532     <xsl:variable name="verso.elements.count">
3533       <xsl:choose>
3534         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3535         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3536           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3537         <xsl:otherwise>1</xsl:otherwise>
3538       </xsl:choose>
3539     </xsl:variable>
3540     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3541       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3542     </xsl:if>
3543     <xsl:call-template name="sect5.titlepage.separator"/>
3544   </fo:block>
3545 </xsl:template>
3546
3547 <xsl:template match="*" mode="sect5.titlepage.recto.mode">
3548   <!-- if an element isn't found in this mode, -->
3549   <!-- try the generic titlepage.mode -->
3550   <xsl:apply-templates select="." mode="titlepage.mode"/>
3551 </xsl:template>
3552
3553 <xsl:template match="*" mode="sect5.titlepage.verso.mode">
3554   <!-- if an element isn't found in this mode, -->
3555   <!-- try the generic titlepage.mode -->
3556   <xsl:apply-templates select="." mode="titlepage.mode"/>
3557 </xsl:template>
3558
3559 <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
3560 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3561 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3562 </fo:block>
3563 </xsl:template>
3564
3565 <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
3566 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
3567 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3568 </fo:block>
3569 </xsl:template>
3570
3571 <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
3572 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3573 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3574 </fo:block>
3575 </xsl:template>
3576
3577 <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
3578 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3579 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3580 </fo:block>
3581 </xsl:template>
3582
3583 <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
3584 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3585 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3586 </fo:block>
3587 </xsl:template>
3588
3589 <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
3590 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3591 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3592 </fo:block>
3593 </xsl:template>
3594
3595 <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3596 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3597 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3598 </fo:block>
3599 </xsl:template>
3600
3601 <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
3602 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3603 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3604 </fo:block>
3605 </xsl:template>
3606
3607 <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
3608 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3609 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3610 </fo:block>
3611 </xsl:template>
3612
3613 <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
3614 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3615 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3616 </fo:block>
3617 </xsl:template>
3618
3619 <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
3620 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3621 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3622 </fo:block>
3623 </xsl:template>
3624
3625 <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
3626 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3627 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3628 </fo:block>
3629 </xsl:template>
3630
3631 <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
3632 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3633 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3634 </fo:block>
3635 </xsl:template>
3636
3637 <xsl:template match="itermset" mode="sect5.titlepage.recto.auto.mode">
3638 <fo:block xsl:use-attribute-sets="sect5.titlepage.recto.style">
3639 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3640 </fo:block>
3641 </xsl:template>
3642
3643 <xsl:template name="simplesect.titlepage.recto">
3644   <xsl:choose>
3645     <xsl:when test="simplesectinfo/title">
3646       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
3647     </xsl:when>
3648     <xsl:when test="docinfo/title">
3649       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
3650     </xsl:when>
3651     <xsl:when test="info/title">
3652       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
3653     </xsl:when>
3654     <xsl:when test="title">
3655       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
3656     </xsl:when>
3657   </xsl:choose>
3658
3659   <xsl:choose>
3660     <xsl:when test="simplesectinfo/subtitle">
3661       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
3662     </xsl:when>
3663     <xsl:when test="docinfo/subtitle">
3664       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3665     </xsl:when>
3666     <xsl:when test="info/subtitle">
3667       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
3668     </xsl:when>
3669     <xsl:when test="subtitle">
3670       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
3671     </xsl:when>
3672   </xsl:choose>
3673
3674   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
3675   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3676   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
3677   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
3678   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3679   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
3680   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
3681   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
3682   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
3683   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
3684   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3685   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
3686   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
3687   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3688   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3689   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
3690   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3691   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
3692   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
3693   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3694   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
3695   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
3696   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3697   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
3698   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
3699   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
3700   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
3701   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
3702   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3703   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
3704   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
3705   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3706   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
3707   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/itermset"/>
3708   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/itermset"/>
3709   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/itermset"/>
3710 </xsl:template>
3711
3712 <xsl:template name="simplesect.titlepage.verso">
3713 </xsl:template>
3714
3715 <xsl:template name="simplesect.titlepage.separator">
3716 </xsl:template>
3717
3718 <xsl:template name="simplesect.titlepage.before.recto">
3719 </xsl:template>
3720
3721 <xsl:template name="simplesect.titlepage.before.verso">
3722 </xsl:template>
3723
3724 <xsl:template name="simplesect.titlepage">
3725   <fo:block>
3726     <xsl:variable name="recto.content">
3727       <xsl:call-template name="simplesect.titlepage.before.recto"/>
3728       <xsl:call-template name="simplesect.titlepage.recto"/>
3729     </xsl:variable>
3730     <xsl:variable name="recto.elements.count">
3731       <xsl:choose>
3732         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3733         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3734           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3735         <xsl:otherwise>1</xsl:otherwise>
3736       </xsl:choose>
3737     </xsl:variable>
3738     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3739       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3740     </xsl:if>
3741     <xsl:variable name="verso.content">
3742       <xsl:call-template name="simplesect.titlepage.before.verso"/>
3743       <xsl:call-template name="simplesect.titlepage.verso"/>
3744     </xsl:variable>
3745     <xsl:variable name="verso.elements.count">
3746       <xsl:choose>
3747         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3748         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3749           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3750         <xsl:otherwise>1</xsl:otherwise>
3751       </xsl:choose>
3752     </xsl:variable>
3753     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3754       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3755     </xsl:if>
3756     <xsl:call-template name="simplesect.titlepage.separator"/>
3757   </fo:block>
3758 </xsl:template>
3759
3760 <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
3761   <!-- if an element isn't found in this mode, -->
3762   <!-- try the generic titlepage.mode -->
3763   <xsl:apply-templates select="." mode="titlepage.mode"/>
3764 </xsl:template>
3765
3766 <xsl:template match="*" mode="simplesect.titlepage.verso.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>
3771
3772 <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
3773 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3774 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3775 </fo:block>
3776 </xsl:template>
3777
3778 <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
3779 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
3780 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3781 </fo:block>
3782 </xsl:template>
3783
3784 <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3785 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3786 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3787 </fo:block>
3788 </xsl:template>
3789
3790 <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3791 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3792 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3793 </fo:block>
3794 </xsl:template>
3795
3796 <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
3797 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3798 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3799 </fo:block>
3800 </xsl:template>
3801
3802 <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
3803 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3804 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3805 </fo:block>
3806 </xsl:template>
3807
3808 <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3809 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3810 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3811 </fo:block>
3812 </xsl:template>
3813
3814 <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
3815 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3816 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3817 </fo:block>
3818 </xsl:template>
3819
3820 <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3821 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3822 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3823 </fo:block>
3824 </xsl:template>
3825
3826 <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
3827 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3828 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3829 </fo:block>
3830 </xsl:template>
3831
3832 <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
3833 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3834 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3835 </fo:block>
3836 </xsl:template>
3837
3838 <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
3839 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3840 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3841 </fo:block>
3842 </xsl:template>
3843
3844 <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
3845 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3846 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3847 </fo:block>
3848 </xsl:template>
3849
3850 <xsl:template match="itermset" mode="simplesect.titlepage.recto.auto.mode">
3851 <fo:block xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3852 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3853 </fo:block>
3854 </xsl:template>
3855
3856 <xsl:template name="dialogue.titlepage.recto">
3857   <xsl:choose>
3858     <xsl:when test="dialogueinfo/title">
3859       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/title"/>
3860     </xsl:when>
3861     <xsl:when test="docinfo/title">
3862       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/title"/>
3863     </xsl:when>
3864     <xsl:when test="info/title">
3865       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/title"/>
3866     </xsl:when>
3867     <xsl:when test="title">
3868       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="title"/>
3869     </xsl:when>
3870   </xsl:choose>
3871
3872   <xsl:choose>
3873     <xsl:when test="dialogueinfo/subtitle">
3874       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/subtitle"/>
3875     </xsl:when>
3876     <xsl:when test="docinfo/subtitle">
3877       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3878     </xsl:when>
3879     <xsl:when test="info/subtitle">
3880       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/subtitle"/>
3881     </xsl:when>
3882     <xsl:when test="subtitle">
3883       <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="subtitle"/>
3884     </xsl:when>
3885   </xsl:choose>
3886
3887   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/corpauthor"/>
3888   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3889   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/corpauthor"/>
3890   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/authorgroup"/>
3891   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3892   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/authorgroup"/>
3893   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/author"/>
3894   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/author"/>
3895   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/author"/>
3896   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/othercredit"/>
3897   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3898   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/othercredit"/>
3899   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/releaseinfo"/>
3900   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3901   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3902   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/copyright"/>
3903   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3904   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/copyright"/>
3905   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/legalnotice"/>
3906   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3907   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/legalnotice"/>
3908   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/pubdate"/>
3909   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3910   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/pubdate"/>
3911   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/revision"/>
3912   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/revision"/>
3913   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/revision"/>
3914   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/revhistory"/>
3915   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3916   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/revhistory"/>
3917   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/abstract"/>
3918   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3919   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/abstract"/>
3920   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="dialogueinfo/itermset"/>
3921   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="docinfo/itermset"/>
3922   <xsl:apply-templates mode="dialogue.titlepage.recto.auto.mode" select="info/itermset"/>
3923 </xsl:template>
3924
3925 <xsl:template name="dialogue.titlepage.verso">
3926 </xsl:template>
3927
3928 <xsl:template name="dialogue.titlepage.separator">
3929 </xsl:template>
3930
3931 <xsl:template name="dialogue.titlepage.before.recto">
3932 </xsl:template>
3933
3934 <xsl:template name="dialogue.titlepage.before.verso">
3935 </xsl:template>
3936
3937 <xsl:template name="dialogue.titlepage">
3938   <fo:block>
3939     <xsl:variable name="recto.content">
3940       <xsl:call-template name="dialogue.titlepage.before.recto"/>
3941       <xsl:call-template name="dialogue.titlepage.recto"/>
3942     </xsl:variable>
3943     <xsl:variable name="recto.elements.count">
3944       <xsl:choose>
3945         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3946         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3947           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3948         <xsl:otherwise>1</xsl:otherwise>
3949       </xsl:choose>
3950     </xsl:variable>
3951     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3952       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3953     </xsl:if>
3954     <xsl:variable name="verso.content">
3955       <xsl:call-template name="dialogue.titlepage.before.verso"/>
3956       <xsl:call-template name="dialogue.titlepage.verso"/>
3957     </xsl:variable>
3958     <xsl:variable name="verso.elements.count">
3959       <xsl:choose>
3960         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3961         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3962           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3963         <xsl:otherwise>1</xsl:otherwise>
3964       </xsl:choose>
3965     </xsl:variable>
3966     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3967       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3968     </xsl:if>
3969     <xsl:call-template name="dialogue.titlepage.separator"/>
3970   </fo:block>
3971 </xsl:template>
3972
3973 <xsl:template match="*" mode="dialogue.titlepage.recto.mode">
3974   <!-- if an element isn't found in this mode, -->
3975   <!-- try the generic titlepage.mode -->
3976   <xsl:apply-templates select="." mode="titlepage.mode"/>
3977 </xsl:template>
3978
3979 <xsl:template match="*" mode="dialogue.titlepage.verso.mode">
3980   <!-- if an element isn't found in this mode, -->
3981   <!-- try the generic titlepage.mode -->
3982   <xsl:apply-templates select="." mode="titlepage.mode"/>
3983 </xsl:template>
3984
3985 <xsl:template match="title" mode="dialogue.titlepage.recto.auto.mode">
3986 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3987 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
3988 </fo:block>
3989 </xsl:template>
3990
3991 <xsl:template match="subtitle" mode="dialogue.titlepage.recto.auto.mode">
3992 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style" font-family="{$title.fontset}">
3993 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
3994 </fo:block>
3995 </xsl:template>
3996
3997 <xsl:template match="corpauthor" mode="dialogue.titlepage.recto.auto.mode">
3998 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
3999 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4000 </fo:block>
4001 </xsl:template>
4002
4003 <xsl:template match="authorgroup" mode="dialogue.titlepage.recto.auto.mode">
4004 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4005 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4006 </fo:block>
4007 </xsl:template>
4008
4009 <xsl:template match="author" mode="dialogue.titlepage.recto.auto.mode">
4010 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4011 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4012 </fo:block>
4013 </xsl:template>
4014
4015 <xsl:template match="othercredit" mode="dialogue.titlepage.recto.auto.mode">
4016 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4017 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4018 </fo:block>
4019 </xsl:template>
4020
4021 <xsl:template match="releaseinfo" mode="dialogue.titlepage.recto.auto.mode">
4022 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4023 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4024 </fo:block>
4025 </xsl:template>
4026
4027 <xsl:template match="copyright" mode="dialogue.titlepage.recto.auto.mode">
4028 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4029 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4030 </fo:block>
4031 </xsl:template>
4032
4033 <xsl:template match="legalnotice" mode="dialogue.titlepage.recto.auto.mode">
4034 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4035 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4036 </fo:block>
4037 </xsl:template>
4038
4039 <xsl:template match="pubdate" mode="dialogue.titlepage.recto.auto.mode">
4040 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4041 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4042 </fo:block>
4043 </xsl:template>
4044
4045 <xsl:template match="revision" mode="dialogue.titlepage.recto.auto.mode">
4046 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4047 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4048 </fo:block>
4049 </xsl:template>
4050
4051 <xsl:template match="revhistory" mode="dialogue.titlepage.recto.auto.mode">
4052 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4053 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4054 </fo:block>
4055 </xsl:template>
4056
4057 <xsl:template match="abstract" mode="dialogue.titlepage.recto.auto.mode">
4058 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4059 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4060 </fo:block>
4061 </xsl:template>
4062
4063 <xsl:template match="itermset" mode="dialogue.titlepage.recto.auto.mode">
4064 <fo:block xsl:use-attribute-sets="dialogue.titlepage.recto.style">
4065 <xsl:apply-templates select="." mode="dialogue.titlepage.recto.mode"/>
4066 </fo:block>
4067 </xsl:template>
4068
4069 <xsl:template name="drama.titlepage.recto">
4070   <xsl:choose>
4071     <xsl:when test="dramainfo/title">
4072       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/title"/>
4073     </xsl:when>
4074     <xsl:when test="docinfo/title">
4075       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/title"/>
4076     </xsl:when>
4077     <xsl:when test="info/title">
4078       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/title"/>
4079     </xsl:when>
4080     <xsl:when test="title">
4081       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="title"/>
4082     </xsl:when>
4083   </xsl:choose>
4084
4085   <xsl:choose>
4086     <xsl:when test="dramainfo/subtitle">
4087       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/subtitle"/>
4088     </xsl:when>
4089     <xsl:when test="docinfo/subtitle">
4090       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4091     </xsl:when>
4092     <xsl:when test="info/subtitle">
4093       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/subtitle"/>
4094     </xsl:when>
4095     <xsl:when test="subtitle">
4096       <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="subtitle"/>
4097     </xsl:when>
4098   </xsl:choose>
4099
4100   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/corpauthor"/>
4101   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
4102   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/corpauthor"/>
4103   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/authorgroup"/>
4104   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
4105   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/authorgroup"/>
4106   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/author"/>
4107   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/author"/>
4108   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/author"/>
4109   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/othercredit"/>
4110   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
4111   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/othercredit"/>
4112   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/releaseinfo"/>
4113   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
4114   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/releaseinfo"/>
4115   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/copyright"/>
4116   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/copyright"/>
4117   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/copyright"/>
4118   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/legalnotice"/>
4119   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
4120   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/legalnotice"/>
4121   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/pubdate"/>
4122   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
4123   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/pubdate"/>
4124   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/revision"/>
4125   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/revision"/>
4126   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/revision"/>
4127   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/revhistory"/>
4128   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
4129   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/revhistory"/>
4130   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/abstract"/>
4131   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/abstract"/>
4132   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/abstract"/>
4133   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="dramainfo/itermset"/>
4134   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4135   <xsl:apply-templates mode="drama.titlepage.recto.auto.mode" select="info/itermset"/>
4136 </xsl:template>
4137
4138 <xsl:template name="drama.titlepage.verso">
4139 </xsl:template>
4140
4141 <xsl:template name="drama.titlepage.separator">
4142 </xsl:template>
4143
4144 <xsl:template name="drama.titlepage.before.recto">
4145 </xsl:template>
4146
4147 <xsl:template name="drama.titlepage.before.verso">
4148 </xsl:template>
4149
4150 <xsl:template name="drama.titlepage">
4151   <fo:block>
4152     <xsl:variable name="recto.content">
4153       <xsl:call-template name="drama.titlepage.before.recto"/>
4154       <xsl:call-template name="drama.titlepage.recto"/>
4155     </xsl:variable>
4156     <xsl:variable name="recto.elements.count">
4157       <xsl:choose>
4158         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4159         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4160           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4161         <xsl:otherwise>1</xsl:otherwise>
4162       </xsl:choose>
4163     </xsl:variable>
4164     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4165       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4166     </xsl:if>
4167     <xsl:variable name="verso.content">
4168       <xsl:call-template name="drama.titlepage.before.verso"/>
4169       <xsl:call-template name="drama.titlepage.verso"/>
4170     </xsl:variable>
4171     <xsl:variable name="verso.elements.count">
4172       <xsl:choose>
4173         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4174         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4175           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4176         <xsl:otherwise>1</xsl:otherwise>
4177       </xsl:choose>
4178     </xsl:variable>
4179     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4180       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4181     </xsl:if>
4182     <xsl:call-template name="drama.titlepage.separator"/>
4183   </fo:block>
4184 </xsl:template>
4185
4186 <xsl:template match="*" mode="drama.titlepage.recto.mode">
4187   <!-- if an element isn't found in this mode, -->
4188   <!-- try the generic titlepage.mode -->
4189   <xsl:apply-templates select="." mode="titlepage.mode"/>
4190 </xsl:template>
4191
4192 <xsl:template match="*" mode="drama.titlepage.verso.mode">
4193   <!-- if an element isn't found in this mode, -->
4194   <!-- try the generic titlepage.mode -->
4195   <xsl:apply-templates select="." mode="titlepage.mode"/>
4196 </xsl:template>
4197
4198 <xsl:template match="title" mode="drama.titlepage.recto.auto.mode">
4199 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
4200 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4201 </fo:block>
4202 </xsl:template>
4203
4204 <xsl:template match="subtitle" mode="drama.titlepage.recto.auto.mode">
4205 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style" font-family="{$title.fontset}">
4206 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4207 </fo:block>
4208 </xsl:template>
4209
4210 <xsl:template match="corpauthor" mode="drama.titlepage.recto.auto.mode">
4211 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4212 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4213 </fo:block>
4214 </xsl:template>
4215
4216 <xsl:template match="authorgroup" mode="drama.titlepage.recto.auto.mode">
4217 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4218 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4219 </fo:block>
4220 </xsl:template>
4221
4222 <xsl:template match="author" mode="drama.titlepage.recto.auto.mode">
4223 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4224 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4225 </fo:block>
4226 </xsl:template>
4227
4228 <xsl:template match="othercredit" mode="drama.titlepage.recto.auto.mode">
4229 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4230 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4231 </fo:block>
4232 </xsl:template>
4233
4234 <xsl:template match="releaseinfo" mode="drama.titlepage.recto.auto.mode">
4235 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4236 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4237 </fo:block>
4238 </xsl:template>
4239
4240 <xsl:template match="copyright" mode="drama.titlepage.recto.auto.mode">
4241 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4242 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4243 </fo:block>
4244 </xsl:template>
4245
4246 <xsl:template match="legalnotice" mode="drama.titlepage.recto.auto.mode">
4247 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4248 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4249 </fo:block>
4250 </xsl:template>
4251
4252 <xsl:template match="pubdate" mode="drama.titlepage.recto.auto.mode">
4253 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4254 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4255 </fo:block>
4256 </xsl:template>
4257
4258 <xsl:template match="revision" mode="drama.titlepage.recto.auto.mode">
4259 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4260 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4261 </fo:block>
4262 </xsl:template>
4263
4264 <xsl:template match="revhistory" mode="drama.titlepage.recto.auto.mode">
4265 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4266 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4267 </fo:block>
4268 </xsl:template>
4269
4270 <xsl:template match="abstract" mode="drama.titlepage.recto.auto.mode">
4271 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4272 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4273 </fo:block>
4274 </xsl:template>
4275
4276 <xsl:template match="itermset" mode="drama.titlepage.recto.auto.mode">
4277 <fo:block xsl:use-attribute-sets="drama.titlepage.recto.style">
4278 <xsl:apply-templates select="." mode="drama.titlepage.recto.mode"/>
4279 </fo:block>
4280 </xsl:template>
4281
4282 <xsl:template name="poetry.titlepage.recto">
4283   <xsl:choose>
4284     <xsl:when test="poetryinfo/title">
4285       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/title"/>
4286     </xsl:when>
4287     <xsl:when test="docinfo/title">
4288       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/title"/>
4289     </xsl:when>
4290     <xsl:when test="info/title">
4291       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/title"/>
4292     </xsl:when>
4293     <xsl:when test="title">
4294       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="title"/>
4295     </xsl:when>
4296   </xsl:choose>
4297
4298   <xsl:choose>
4299     <xsl:when test="poetryinfo/subtitle">
4300       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/subtitle"/>
4301     </xsl:when>
4302     <xsl:when test="docinfo/subtitle">
4303       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4304     </xsl:when>
4305     <xsl:when test="info/subtitle">
4306       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/subtitle"/>
4307     </xsl:when>
4308     <xsl:when test="subtitle">
4309       <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="subtitle"/>
4310     </xsl:when>
4311   </xsl:choose>
4312
4313   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/corpauthor"/>
4314   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
4315   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/corpauthor"/>
4316   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/authorgroup"/>
4317   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
4318   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/authorgroup"/>
4319   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/author"/>
4320   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/author"/>
4321   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/author"/>
4322   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/othercredit"/>
4323   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
4324   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/othercredit"/>
4325   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/releaseinfo"/>
4326   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
4327   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/releaseinfo"/>
4328   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/copyright"/>
4329   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/copyright"/>
4330   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/copyright"/>
4331   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/legalnotice"/>
4332   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
4333   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/legalnotice"/>
4334   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/pubdate"/>
4335   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
4336   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/pubdate"/>
4337   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/revision"/>
4338   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/revision"/>
4339   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/revision"/>
4340   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/revhistory"/>
4341   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
4342   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/revhistory"/>
4343   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/abstract"/>
4344   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/abstract"/>
4345   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/abstract"/>
4346   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="poetryinfo/itermset"/>
4347   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4348   <xsl:apply-templates mode="poetry.titlepage.recto.auto.mode" select="info/itermset"/>
4349 </xsl:template>
4350
4351 <xsl:template name="poetry.titlepage.verso">
4352 </xsl:template>
4353
4354 <xsl:template name="poetry.titlepage.separator">
4355 </xsl:template>
4356
4357 <xsl:template name="poetry.titlepage.before.recto">
4358 </xsl:template>
4359
4360 <xsl:template name="poetry.titlepage.before.verso">
4361 </xsl:template>
4362
4363 <xsl:template name="poetry.titlepage">
4364   <fo:block>
4365     <xsl:variable name="recto.content">
4366       <xsl:call-template name="poetry.titlepage.before.recto"/>
4367       <xsl:call-template name="poetry.titlepage.recto"/>
4368     </xsl:variable>
4369     <xsl:variable name="recto.elements.count">
4370       <xsl:choose>
4371         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4372         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4373           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4374         <xsl:otherwise>1</xsl:otherwise>
4375       </xsl:choose>
4376     </xsl:variable>
4377     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4378       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4379     </xsl:if>
4380     <xsl:variable name="verso.content">
4381       <xsl:call-template name="poetry.titlepage.before.verso"/>
4382       <xsl:call-template name="poetry.titlepage.verso"/>
4383     </xsl:variable>
4384     <xsl:variable name="verso.elements.count">
4385       <xsl:choose>
4386         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4387         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4388           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4389         <xsl:otherwise>1</xsl:otherwise>
4390       </xsl:choose>
4391     </xsl:variable>
4392     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4393       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4394     </xsl:if>
4395     <xsl:call-template name="poetry.titlepage.separator"/>
4396   </fo:block>
4397 </xsl:template>
4398
4399 <xsl:template match="*" mode="poetry.titlepage.recto.mode">
4400   <!-- if an element isn't found in this mode, -->
4401   <!-- try the generic titlepage.mode -->
4402   <xsl:apply-templates select="." mode="titlepage.mode"/>
4403 </xsl:template>
4404
4405 <xsl:template match="*" mode="poetry.titlepage.verso.mode">
4406   <!-- if an element isn't found in this mode, -->
4407   <!-- try the generic titlepage.mode -->
4408   <xsl:apply-templates select="." mode="titlepage.mode"/>
4409 </xsl:template>
4410
4411 <xsl:template match="title" mode="poetry.titlepage.recto.auto.mode">
4412 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
4413 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4414 </fo:block>
4415 </xsl:template>
4416
4417 <xsl:template match="subtitle" mode="poetry.titlepage.recto.auto.mode">
4418 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style" font-family="{$title.fontset}">
4419 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4420 </fo:block>
4421 </xsl:template>
4422
4423 <xsl:template match="corpauthor" mode="poetry.titlepage.recto.auto.mode">
4424 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4425 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4426 </fo:block>
4427 </xsl:template>
4428
4429 <xsl:template match="authorgroup" mode="poetry.titlepage.recto.auto.mode">
4430 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4431 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4432 </fo:block>
4433 </xsl:template>
4434
4435 <xsl:template match="author" mode="poetry.titlepage.recto.auto.mode">
4436 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4437 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4438 </fo:block>
4439 </xsl:template>
4440
4441 <xsl:template match="othercredit" mode="poetry.titlepage.recto.auto.mode">
4442 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4443 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4444 </fo:block>
4445 </xsl:template>
4446
4447 <xsl:template match="releaseinfo" mode="poetry.titlepage.recto.auto.mode">
4448 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4449 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4450 </fo:block>
4451 </xsl:template>
4452
4453 <xsl:template match="copyright" mode="poetry.titlepage.recto.auto.mode">
4454 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4455 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4456 </fo:block>
4457 </xsl:template>
4458
4459 <xsl:template match="legalnotice" mode="poetry.titlepage.recto.auto.mode">
4460 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4461 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4462 </fo:block>
4463 </xsl:template>
4464
4465 <xsl:template match="pubdate" mode="poetry.titlepage.recto.auto.mode">
4466 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4467 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4468 </fo:block>
4469 </xsl:template>
4470
4471 <xsl:template match="revision" mode="poetry.titlepage.recto.auto.mode">
4472 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4473 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4474 </fo:block>
4475 </xsl:template>
4476
4477 <xsl:template match="revhistory" mode="poetry.titlepage.recto.auto.mode">
4478 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4479 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4480 </fo:block>
4481 </xsl:template>
4482
4483 <xsl:template match="abstract" mode="poetry.titlepage.recto.auto.mode">
4484 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4485 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4486 </fo:block>
4487 </xsl:template>
4488
4489 <xsl:template match="itermset" mode="poetry.titlepage.recto.auto.mode">
4490 <fo:block xsl:use-attribute-sets="poetry.titlepage.recto.style">
4491 <xsl:apply-templates select="." mode="poetry.titlepage.recto.mode"/>
4492 </fo:block>
4493 </xsl:template>
4494
4495 <xsl:template name="topic.titlepage.recto">
4496   <xsl:choose>
4497     <xsl:when test="topicinfo/title">
4498       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/title"/>
4499     </xsl:when>
4500     <xsl:when test="info/title">
4501       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/title"/>
4502     </xsl:when>
4503     <xsl:when test="title">
4504       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="title"/>
4505     </xsl:when>
4506   </xsl:choose>
4507
4508   <xsl:choose>
4509     <xsl:when test="topicinfo/subtitle">
4510       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/subtitle"/>
4511     </xsl:when>
4512     <xsl:when test="info/subtitle">
4513       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/subtitle"/>
4514     </xsl:when>
4515     <xsl:when test="subtitle">
4516       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="subtitle"/>
4517     </xsl:when>
4518   </xsl:choose>
4519
4520 </xsl:template>
4521
4522 <xsl:template name="topic.titlepage.verso">
4523 </xsl:template>
4524
4525 <xsl:template name="topic.titlepage.separator">
4526 </xsl:template>
4527
4528 <xsl:template name="topic.titlepage.before.recto">
4529 </xsl:template>
4530
4531 <xsl:template name="topic.titlepage.before.verso">
4532 </xsl:template>
4533
4534 <xsl:template name="topic.titlepage">
4535   <fo:block>
4536     <xsl:variable name="recto.content">
4537       <xsl:call-template name="topic.titlepage.before.recto"/>
4538       <xsl:call-template name="topic.titlepage.recto"/>
4539     </xsl:variable>
4540     <xsl:variable name="recto.elements.count">
4541       <xsl:choose>
4542         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4543         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4544           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4545         <xsl:otherwise>1</xsl:otherwise>
4546       </xsl:choose>
4547     </xsl:variable>
4548     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4549       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4550     </xsl:if>
4551     <xsl:variable name="verso.content">
4552       <xsl:call-template name="topic.titlepage.before.verso"/>
4553       <xsl:call-template name="topic.titlepage.verso"/>
4554     </xsl:variable>
4555     <xsl:variable name="verso.elements.count">
4556       <xsl:choose>
4557         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4558         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4559           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4560         <xsl:otherwise>1</xsl:otherwise>
4561       </xsl:choose>
4562     </xsl:variable>
4563     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4564       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4565     </xsl:if>
4566     <xsl:call-template name="topic.titlepage.separator"/>
4567   </fo:block>
4568 </xsl:template>
4569
4570 <xsl:template match="*" mode="topic.titlepage.recto.mode">
4571   <!-- if an element isn't found in this mode, -->
4572   <!-- try the generic titlepage.mode -->
4573   <xsl:apply-templates select="." mode="titlepage.mode"/>
4574 </xsl:template>
4575
4576 <xsl:template match="*" mode="topic.titlepage.verso.mode">
4577   <!-- if an element isn't found in this mode, -->
4578   <!-- try the generic titlepage.mode -->
4579   <xsl:apply-templates select="." mode="titlepage.mode"/>
4580 </xsl:template>
4581
4582 <xsl:template match="title" mode="topic.titlepage.recto.auto.mode">
4583 <fo:block xsl:use-attribute-sets="topic.titlepage.recto.style" font-weight="bold" font-size="17.28pt" space-before="1em" space-after="1em" font-family="{$title.fontset}">
4584 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
4585 </fo:block>
4586 </xsl:template>
4587
4588 <xsl:template match="subtitle" mode="topic.titlepage.recto.auto.mode">
4589 <fo:block xsl:use-attribute-sets="topic.titlepage.recto.style" font-family="{$title.fontset}">
4590 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
4591 </fo:block>
4592 </xsl:template>
4593
4594 <xsl:template name="bibliography.titlepage.recto">
4595   <fo:block xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4596 <xsl:call-template name="component.title">
4597 <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
4598 </xsl:call-template></fo:block>
4599   <xsl:choose>
4600     <xsl:when test="bibliographyinfo/subtitle">
4601       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
4602     </xsl:when>
4603     <xsl:when test="docinfo/subtitle">
4604       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4605     </xsl:when>
4606     <xsl:when test="info/subtitle">
4607       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
4608     </xsl:when>
4609     <xsl:when test="subtitle">
4610       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
4611     </xsl:when>
4612   </xsl:choose>
4613
4614   <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/itermset"/>
4615   <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4616   <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/itermset"/>
4617 </xsl:template>
4618
4619 <xsl:template name="bibliography.titlepage.verso">
4620 </xsl:template>
4621
4622 <xsl:template name="bibliography.titlepage.separator">
4623 </xsl:template>
4624
4625 <xsl:template name="bibliography.titlepage.before.recto">
4626 </xsl:template>
4627
4628 <xsl:template name="bibliography.titlepage.before.verso">
4629 </xsl:template>
4630
4631 <xsl:template name="bibliography.titlepage">
4632   <fo:block>
4633     <xsl:variable name="recto.content">
4634       <xsl:call-template name="bibliography.titlepage.before.recto"/>
4635       <xsl:call-template name="bibliography.titlepage.recto"/>
4636     </xsl:variable>
4637     <xsl:variable name="recto.elements.count">
4638       <xsl:choose>
4639         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4640         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4641           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4642         <xsl:otherwise>1</xsl:otherwise>
4643       </xsl:choose>
4644     </xsl:variable>
4645     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4646       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4647     </xsl:if>
4648     <xsl:variable name="verso.content">
4649       <xsl:call-template name="bibliography.titlepage.before.verso"/>
4650       <xsl:call-template name="bibliography.titlepage.verso"/>
4651     </xsl:variable>
4652     <xsl:variable name="verso.elements.count">
4653       <xsl:choose>
4654         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4655         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4656           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4657         <xsl:otherwise>1</xsl:otherwise>
4658       </xsl:choose>
4659     </xsl:variable>
4660     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4661       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4662     </xsl:if>
4663     <xsl:call-template name="bibliography.titlepage.separator"/>
4664   </fo:block>
4665 </xsl:template>
4666
4667 <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
4668   <!-- if an element isn't found in this mode, -->
4669   <!-- try the generic titlepage.mode -->
4670   <xsl:apply-templates select="." mode="titlepage.mode"/>
4671 </xsl:template>
4672
4673 <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
4674   <!-- if an element isn't found in this mode, -->
4675   <!-- try the generic titlepage.mode -->
4676   <xsl:apply-templates select="." mode="titlepage.mode"/>
4677 </xsl:template>
4678
4679 <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
4680 <fo:block xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
4681 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
4682 </fo:block>
4683 </xsl:template>
4684
4685 <xsl:template match="itermset" mode="bibliography.titlepage.recto.auto.mode">
4686 <fo:block xsl:use-attribute-sets="bibliography.titlepage.recto.style">
4687 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
4688 </fo:block>
4689 </xsl:template>
4690
4691 <xsl:template name="bibliodiv.titlepage.recto">
4692   <xsl:choose>
4693     <xsl:when test="bibliodivinfo/title">
4694       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
4695     </xsl:when>
4696     <xsl:when test="docinfo/title">
4697       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
4698     </xsl:when>
4699     <xsl:when test="info/title">
4700       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
4701     </xsl:when>
4702     <xsl:when test="title">
4703       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
4704     </xsl:when>
4705   </xsl:choose>
4706
4707   <xsl:choose>
4708     <xsl:when test="bibliodivinfo/subtitle">
4709       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
4710     </xsl:when>
4711     <xsl:when test="docinfo/subtitle">
4712       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4713     </xsl:when>
4714     <xsl:when test="info/subtitle">
4715       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4716     </xsl:when>
4717     <xsl:when test="subtitle">
4718       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
4719     </xsl:when>
4720   </xsl:choose>
4721
4722   <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/itermset"/>
4723   <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4724   <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/itermset"/>
4725 </xsl:template>
4726
4727 <xsl:template name="bibliodiv.titlepage.verso">
4728 </xsl:template>
4729
4730 <xsl:template name="bibliodiv.titlepage.separator">
4731 </xsl:template>
4732
4733 <xsl:template name="bibliodiv.titlepage.before.recto">
4734 </xsl:template>
4735
4736 <xsl:template name="bibliodiv.titlepage.before.verso">
4737 </xsl:template>
4738
4739 <xsl:template name="bibliodiv.titlepage">
4740   <fo:block>
4741     <xsl:variable name="recto.content">
4742       <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
4743       <xsl:call-template name="bibliodiv.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="bibliodiv.titlepage.before.verso"/>
4758       <xsl:call-template name="bibliodiv.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="bibliodiv.titlepage.separator"/>
4772   </fo:block>
4773 </xsl:template>
4774
4775 <xsl:template match="*" mode="bibliodiv.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>
4780
4781 <xsl:template match="*" mode="bibliodiv.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>
4786
4787 <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
4788 <fo:block xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
4789 <xsl:call-template name="component.title">
4790 <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
4791 </xsl:call-template>
4792 </fo:block>
4793 </xsl:template>
4794
4795 <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
4796 <fo:block xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
4797 <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
4798 </fo:block>
4799 </xsl:template>
4800
4801 <xsl:template match="itermset" mode="bibliodiv.titlepage.recto.auto.mode">
4802 <fo:block xsl:use-attribute-sets="bibliodiv.titlepage.recto.style">
4803 <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
4804 </fo:block>
4805 </xsl:template>
4806
4807 <xsl:template name="glossary.titlepage.recto">
4808   <fo:block xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4809 <xsl:call-template name="component.title">
4810 <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
4811 </xsl:call-template></fo:block>
4812   <xsl:choose>
4813     <xsl:when test="glossaryinfo/subtitle">
4814       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
4815     </xsl:when>
4816     <xsl:when test="docinfo/subtitle">
4817       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4818     </xsl:when>
4819     <xsl:when test="info/subtitle">
4820       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
4821     </xsl:when>
4822     <xsl:when test="subtitle">
4823       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
4824     </xsl:when>
4825   </xsl:choose>
4826
4827   <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/itermset"/>
4828   <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4829   <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/itermset"/>
4830 </xsl:template>
4831
4832 <xsl:template name="glossary.titlepage.verso">
4833 </xsl:template>
4834
4835 <xsl:template name="glossary.titlepage.separator">
4836 </xsl:template>
4837
4838 <xsl:template name="glossary.titlepage.before.recto">
4839 </xsl:template>
4840
4841 <xsl:template name="glossary.titlepage.before.verso">
4842 </xsl:template>
4843
4844 <xsl:template name="glossary.titlepage">
4845   <fo:block>
4846     <xsl:variable name="recto.content">
4847       <xsl:call-template name="glossary.titlepage.before.recto"/>
4848       <xsl:call-template name="glossary.titlepage.recto"/>
4849     </xsl:variable>
4850     <xsl:variable name="recto.elements.count">
4851       <xsl:choose>
4852         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4853         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4854           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4855         <xsl:otherwise>1</xsl:otherwise>
4856       </xsl:choose>
4857     </xsl:variable>
4858     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4859       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4860     </xsl:if>
4861     <xsl:variable name="verso.content">
4862       <xsl:call-template name="glossary.titlepage.before.verso"/>
4863       <xsl:call-template name="glossary.titlepage.verso"/>
4864     </xsl:variable>
4865     <xsl:variable name="verso.elements.count">
4866       <xsl:choose>
4867         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4868         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4869           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4870         <xsl:otherwise>1</xsl:otherwise>
4871       </xsl:choose>
4872     </xsl:variable>
4873     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4874       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4875     </xsl:if>
4876     <xsl:call-template name="glossary.titlepage.separator"/>
4877   </fo:block>
4878 </xsl:template>
4879
4880 <xsl:template match="*" mode="glossary.titlepage.recto.mode">
4881   <!-- if an element isn't found in this mode, -->
4882   <!-- try the generic titlepage.mode -->
4883   <xsl:apply-templates select="." mode="titlepage.mode"/>
4884 </xsl:template>
4885
4886 <xsl:template match="*" mode="glossary.titlepage.verso.mode">
4887   <!-- if an element isn't found in this mode, -->
4888   <!-- try the generic titlepage.mode -->
4889   <xsl:apply-templates select="." mode="titlepage.mode"/>
4890 </xsl:template>
4891
4892 <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
4893 <fo:block xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
4894 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
4895 </fo:block>
4896 </xsl:template>
4897
4898 <xsl:template match="itermset" mode="glossary.titlepage.recto.auto.mode">
4899 <fo:block xsl:use-attribute-sets="glossary.titlepage.recto.style">
4900 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
4901 </fo:block>
4902 </xsl:template>
4903
4904 <xsl:template name="glossdiv.titlepage.recto">
4905   <xsl:choose>
4906     <xsl:when test="glossdivinfo/title">
4907       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
4908     </xsl:when>
4909     <xsl:when test="docinfo/title">
4910       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
4911     </xsl:when>
4912     <xsl:when test="info/title">
4913       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
4914     </xsl:when>
4915     <xsl:when test="title">
4916       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
4917     </xsl:when>
4918   </xsl:choose>
4919
4920   <xsl:choose>
4921     <xsl:when test="glossdivinfo/subtitle">
4922       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
4923     </xsl:when>
4924     <xsl:when test="docinfo/subtitle">
4925       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4926     </xsl:when>
4927     <xsl:when test="info/subtitle">
4928       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4929     </xsl:when>
4930     <xsl:when test="subtitle">
4931       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
4932     </xsl:when>
4933   </xsl:choose>
4934
4935   <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/itermset"/>
4936   <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4937   <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/itermset"/>
4938 </xsl:template>
4939
4940 <xsl:template name="glossdiv.titlepage.verso">
4941 </xsl:template>
4942
4943 <xsl:template name="glossdiv.titlepage.separator">
4944 </xsl:template>
4945
4946 <xsl:template name="glossdiv.titlepage.before.recto">
4947 </xsl:template>
4948
4949 <xsl:template name="glossdiv.titlepage.before.verso">
4950 </xsl:template>
4951
4952 <xsl:template name="glossdiv.titlepage">
4953   <fo:block>
4954     <xsl:variable name="recto.content">
4955       <xsl:call-template name="glossdiv.titlepage.before.recto"/>
4956       <xsl:call-template name="glossdiv.titlepage.recto"/>
4957     </xsl:variable>
4958     <xsl:variable name="recto.elements.count">
4959       <xsl:choose>
4960         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4961         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4962           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4963         <xsl:otherwise>1</xsl:otherwise>
4964       </xsl:choose>
4965     </xsl:variable>
4966     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4967       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4968     </xsl:if>
4969     <xsl:variable name="verso.content">
4970       <xsl:call-template name="glossdiv.titlepage.before.verso"/>
4971       <xsl:call-template name="glossdiv.titlepage.verso"/>
4972     </xsl:variable>
4973     <xsl:variable name="verso.elements.count">
4974       <xsl:choose>
4975         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4976         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4977           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4978         <xsl:otherwise>1</xsl:otherwise>
4979       </xsl:choose>
4980     </xsl:variable>
4981     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4982       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4983     </xsl:if>
4984     <xsl:call-template name="glossdiv.titlepage.separator"/>
4985   </fo:block>
4986 </xsl:template>
4987
4988 <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
4989   <!-- if an element isn't found in this mode, -->
4990   <!-- try the generic titlepage.mode -->
4991   <xsl:apply-templates select="." mode="titlepage.mode"/>
4992 </xsl:template>
4993
4994 <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
4995   <!-- if an element isn't found in this mode, -->
4996   <!-- try the generic titlepage.mode -->
4997   <xsl:apply-templates select="." mode="titlepage.mode"/>
4998 </xsl:template>
4999
5000 <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
5001 <fo:block xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
5002 <xsl:call-template name="component.title">
5003 <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
5004 </xsl:call-template>
5005 </fo:block>
5006 </xsl:template>
5007
5008 <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
5009 <fo:block xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
5010 <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
5011 </fo:block>
5012 </xsl:template>
5013
5014 <xsl:template match="itermset" mode="glossdiv.titlepage.recto.auto.mode">
5015 <fo:block xsl:use-attribute-sets="glossdiv.titlepage.recto.style">
5016 <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
5017 </fo:block>
5018 </xsl:template>
5019
5020 <xsl:template name="index.titlepage.recto">
5021   <fo:block xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
5022 <xsl:call-template name="component.title">
5023 <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
5024 <xsl:with-param name="pagewide" select="1"/>
5025 </xsl:call-template></fo:block>
5026   <xsl:choose>
5027     <xsl:when test="indexinfo/subtitle">
5028       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
5029     </xsl:when>
5030     <xsl:when test="docinfo/subtitle">
5031       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
5032     </xsl:when>
5033     <xsl:when test="info/subtitle">
5034       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
5035     </xsl:when>
5036     <xsl:when test="subtitle">
5037       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
5038     </xsl:when>
5039   </xsl:choose>
5040
5041   <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/itermset"/>
5042   <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/itermset"/>
5043   <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/itermset"/>
5044 </xsl:template>
5045
5046 <xsl:template name="index.titlepage.verso">
5047 </xsl:template>
5048
5049 <xsl:template name="index.titlepage.separator">
5050 </xsl:template>
5051
5052 <xsl:template name="index.titlepage.before.recto">
5053 </xsl:template>
5054
5055 <xsl:template name="index.titlepage.before.verso">
5056 </xsl:template>
5057
5058 <xsl:template name="index.titlepage">
5059   <fo:block>
5060     <xsl:variable name="recto.content">
5061       <xsl:call-template name="index.titlepage.before.recto"/>
5062       <xsl:call-template name="index.titlepage.recto"/>
5063     </xsl:variable>
5064     <xsl:variable name="recto.elements.count">
5065       <xsl:choose>
5066         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5067         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5068           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5069         <xsl:otherwise>1</xsl:otherwise>
5070       </xsl:choose>
5071     </xsl:variable>
5072     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5073       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5074     </xsl:if>
5075     <xsl:variable name="verso.content">
5076       <xsl:call-template name="index.titlepage.before.verso"/>
5077       <xsl:call-template name="index.titlepage.verso"/>
5078     </xsl:variable>
5079     <xsl:variable name="verso.elements.count">
5080       <xsl:choose>
5081         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5082         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5083           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5084         <xsl:otherwise>1</xsl:otherwise>
5085       </xsl:choose>
5086     </xsl:variable>
5087     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5088       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5089     </xsl:if>
5090     <xsl:call-template name="index.titlepage.separator"/>
5091   </fo:block>
5092 </xsl:template>
5093
5094 <xsl:template match="*" mode="index.titlepage.recto.mode">
5095   <!-- if an element isn't found in this mode, -->
5096   <!-- try the generic titlepage.mode -->
5097   <xsl:apply-templates select="." mode="titlepage.mode"/>
5098 </xsl:template>
5099
5100 <xsl:template match="*" mode="index.titlepage.verso.mode">
5101   <!-- if an element isn't found in this mode, -->
5102   <!-- try the generic titlepage.mode -->
5103   <xsl:apply-templates select="." mode="titlepage.mode"/>
5104 </xsl:template>
5105
5106 <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
5107 <fo:block xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
5108 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
5109 </fo:block>
5110 </xsl:template>
5111
5112 <xsl:template match="itermset" mode="index.titlepage.recto.auto.mode">
5113 <fo:block xsl:use-attribute-sets="index.titlepage.recto.style">
5114 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
5115 </fo:block>
5116 </xsl:template>
5117
5118 <xsl:template name="indexdiv.titlepage.recto">
5119   <fo:block xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
5120 <xsl:call-template name="indexdiv.title">
5121 <xsl:with-param name="title" select="title"/>
5122 </xsl:call-template></fo:block>
5123   <xsl:choose>
5124     <xsl:when test="indexdivinfo/subtitle">
5125       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
5126     </xsl:when>
5127     <xsl:when test="docinfo/subtitle">
5128       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
5129     </xsl:when>
5130     <xsl:when test="info/subtitle">
5131       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
5132     </xsl:when>
5133     <xsl:when test="subtitle">
5134       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
5135     </xsl:when>
5136   </xsl:choose>
5137
5138   <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/itermset"/>
5139   <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
5140   <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/itermset"/>
5141 </xsl:template>
5142
5143 <xsl:template name="indexdiv.titlepage.verso">
5144 </xsl:template>
5145
5146 <xsl:template name="indexdiv.titlepage.separator">
5147 </xsl:template>
5148
5149 <xsl:template name="indexdiv.titlepage.before.recto">
5150 </xsl:template>
5151
5152 <xsl:template name="indexdiv.titlepage.before.verso">
5153 </xsl:template>
5154
5155 <xsl:template name="indexdiv.titlepage">
5156   <fo:block>
5157     <xsl:variable name="recto.content">
5158       <xsl:call-template name="indexdiv.titlepage.before.recto"/>
5159       <xsl:call-template name="indexdiv.titlepage.recto"/>
5160     </xsl:variable>
5161     <xsl:variable name="recto.elements.count">
5162       <xsl:choose>
5163         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5164         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5165           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5166         <xsl:otherwise>1</xsl:otherwise>
5167       </xsl:choose>
5168     </xsl:variable>
5169     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5170       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5171     </xsl:if>
5172     <xsl:variable name="verso.content">
5173       <xsl:call-template name="indexdiv.titlepage.before.verso"/>
5174       <xsl:call-template name="indexdiv.titlepage.verso"/>
5175     </xsl:variable>
5176     <xsl:variable name="verso.elements.count">
5177       <xsl:choose>
5178         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5179         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5180           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5181         <xsl:otherwise>1</xsl:otherwise>
5182       </xsl:choose>
5183     </xsl:variable>
5184     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5185       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5186     </xsl:if>
5187     <xsl:call-template name="indexdiv.titlepage.separator"/>
5188   </fo:block>
5189 </xsl:template>
5190
5191 <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
5192   <!-- if an element isn't found in this mode, -->
5193   <!-- try the generic titlepage.mode -->
5194   <xsl:apply-templates select="." mode="titlepage.mode"/>
5195 </xsl:template>
5196
5197 <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
5198   <!-- if an element isn't found in this mode, -->
5199   <!-- try the generic titlepage.mode -->
5200   <xsl:apply-templates select="." mode="titlepage.mode"/>
5201 </xsl:template>
5202
5203 <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
5204 <fo:block xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
5205 <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
5206 </fo:block>
5207 </xsl:template>
5208
5209 <xsl:template match="itermset" mode="indexdiv.titlepage.recto.auto.mode">
5210 <fo:block xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
5211 <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
5212 </fo:block>
5213 </xsl:template>
5214
5215 <xsl:template name="setindex.titlepage.recto">
5216   <fo:block xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
5217 <xsl:call-template name="component.title">
5218 <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
5219 <xsl:with-param name="pagewide" select="1"/>
5220 </xsl:call-template></fo:block>
5221   <xsl:choose>
5222     <xsl:when test="setindexinfo/subtitle">
5223       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
5224     </xsl:when>
5225     <xsl:when test="docinfo/subtitle">
5226       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
5227     </xsl:when>
5228     <xsl:when test="info/subtitle">
5229       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
5230     </xsl:when>
5231     <xsl:when test="subtitle">
5232       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
5233     </xsl:when>
5234   </xsl:choose>
5235
5236   <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/itermset"/>
5237   <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/itermset"/>
5238   <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/itermset"/>
5239 </xsl:template>
5240
5241 <xsl:template name="setindex.titlepage.verso">
5242 </xsl:template>
5243
5244 <xsl:template name="setindex.titlepage.separator">
5245 </xsl:template>
5246
5247 <xsl:template name="setindex.titlepage.before.recto">
5248 </xsl:template>
5249
5250 <xsl:template name="setindex.titlepage.before.verso">
5251 </xsl:template>
5252
5253 <xsl:template name="setindex.titlepage">
5254   <fo:block>
5255     <xsl:variable name="recto.content">
5256       <xsl:call-template name="setindex.titlepage.before.recto"/>
5257       <xsl:call-template name="setindex.titlepage.recto"/>
5258     </xsl:variable>
5259     <xsl:variable name="recto.elements.count">
5260       <xsl:choose>
5261         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5262         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5263           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5264         <xsl:otherwise>1</xsl:otherwise>
5265       </xsl:choose>
5266     </xsl:variable>
5267     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5268       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5269     </xsl:if>
5270     <xsl:variable name="verso.content">
5271       <xsl:call-template name="setindex.titlepage.before.verso"/>
5272       <xsl:call-template name="setindex.titlepage.verso"/>
5273     </xsl:variable>
5274     <xsl:variable name="verso.elements.count">
5275       <xsl:choose>
5276         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5277         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5278           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5279         <xsl:otherwise>1</xsl:otherwise>
5280       </xsl:choose>
5281     </xsl:variable>
5282     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5283       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5284     </xsl:if>
5285     <xsl:call-template name="setindex.titlepage.separator"/>
5286   </fo:block>
5287 </xsl:template>
5288
5289 <xsl:template match="*" mode="setindex.titlepage.recto.mode">
5290   <!-- if an element isn't found in this mode, -->
5291   <!-- try the generic titlepage.mode -->
5292   <xsl:apply-templates select="." mode="titlepage.mode"/>
5293 </xsl:template>
5294
5295 <xsl:template match="*" mode="setindex.titlepage.verso.mode">
5296   <!-- if an element isn't found in this mode, -->
5297   <!-- try the generic titlepage.mode -->
5298   <xsl:apply-templates select="." mode="titlepage.mode"/>
5299 </xsl:template>
5300
5301 <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
5302 <fo:block xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
5303 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
5304 </fo:block>
5305 </xsl:template>
5306
5307 <xsl:template match="itermset" mode="setindex.titlepage.recto.auto.mode">
5308 <fo:block xsl:use-attribute-sets="setindex.titlepage.recto.style">
5309 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
5310 </fo:block>
5311 </xsl:template>
5312
5313 <xsl:template name="colophon.titlepage.recto">
5314   <fo:block xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
5315 <xsl:call-template name="component.title">
5316 <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
5317 </xsl:call-template></fo:block>
5318   <xsl:choose>
5319     <xsl:when test="colophoninfo/subtitle">
5320       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
5321     </xsl:when>
5322     <xsl:when test="docinfo/subtitle">
5323       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
5324     </xsl:when>
5325     <xsl:when test="info/subtitle">
5326       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
5327     </xsl:when>
5328     <xsl:when test="subtitle">
5329       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
5330     </xsl:when>
5331   </xsl:choose>
5332
5333   <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/itermset"/>
5334   <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/itermset"/>
5335   <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/itermset"/>
5336 </xsl:template>
5337
5338 <xsl:template name="colophon.titlepage.verso">
5339 </xsl:template>
5340
5341 <xsl:template name="colophon.titlepage.separator">
5342 </xsl:template>
5343
5344 <xsl:template name="colophon.titlepage.before.recto">
5345 </xsl:template>
5346
5347 <xsl:template name="colophon.titlepage.before.verso">
5348 </xsl:template>
5349
5350 <xsl:template name="colophon.titlepage">
5351   <fo:block>
5352     <xsl:variable name="recto.content">
5353       <xsl:call-template name="colophon.titlepage.before.recto"/>
5354       <xsl:call-template name="colophon.titlepage.recto"/>
5355     </xsl:variable>
5356     <xsl:variable name="recto.elements.count">
5357       <xsl:choose>
5358         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5359         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5360           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5361         <xsl:otherwise>1</xsl:otherwise>
5362       </xsl:choose>
5363     </xsl:variable>
5364     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5365       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5366     </xsl:if>
5367     <xsl:variable name="verso.content">
5368       <xsl:call-template name="colophon.titlepage.before.verso"/>
5369       <xsl:call-template name="colophon.titlepage.verso"/>
5370     </xsl:variable>
5371     <xsl:variable name="verso.elements.count">
5372       <xsl:choose>
5373         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5374         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5375           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5376         <xsl:otherwise>1</xsl:otherwise>
5377       </xsl:choose>
5378     </xsl:variable>
5379     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5380       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5381     </xsl:if>
5382     <xsl:call-template name="colophon.titlepage.separator"/>
5383   </fo:block>
5384 </xsl:template>
5385
5386 <xsl:template match="*" mode="colophon.titlepage.recto.mode">
5387   <!-- if an element isn't found in this mode, -->
5388   <!-- try the generic titlepage.mode -->
5389   <xsl:apply-templates select="." mode="titlepage.mode"/>
5390 </xsl:template>
5391
5392 <xsl:template match="*" mode="colophon.titlepage.verso.mode">
5393   <!-- if an element isn't found in this mode, -->
5394   <!-- try the generic titlepage.mode -->
5395   <xsl:apply-templates select="." mode="titlepage.mode"/>
5396 </xsl:template>
5397
5398 <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
5399 <fo:block xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
5400 <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
5401 </fo:block>
5402 </xsl:template>
5403
5404 <xsl:template match="itermset" mode="colophon.titlepage.recto.auto.mode">
5405 <fo:block xsl:use-attribute-sets="colophon.titlepage.recto.style">
5406 <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
5407 </fo:block>
5408 </xsl:template>
5409
5410 <xsl:template name="sidebar.titlepage.recto">
5411   <xsl:choose>
5412     <xsl:when test="sidebarinfo/title">
5413       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
5414     </xsl:when>
5415     <xsl:when test="docinfo/title">
5416       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
5417     </xsl:when>
5418     <xsl:when test="info/title">
5419       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
5420     </xsl:when>
5421     <xsl:when test="title">
5422       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
5423     </xsl:when>
5424   </xsl:choose>
5425
5426   <xsl:choose>
5427     <xsl:when test="sidebarinfo/subtitle">
5428       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
5429     </xsl:when>
5430     <xsl:when test="docinfo/subtitle">
5431       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
5432     </xsl:when>
5433     <xsl:when test="info/subtitle">
5434       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
5435     </xsl:when>
5436     <xsl:when test="subtitle">
5437       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
5438     </xsl:when>
5439   </xsl:choose>
5440
5441   <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/itermset"/>
5442   <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/itermset"/>
5443   <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/itermset"/>
5444 </xsl:template>
5445
5446 <xsl:template name="sidebar.titlepage.verso">
5447 </xsl:template>
5448
5449 <xsl:template name="sidebar.titlepage.separator">
5450 </xsl:template>
5451
5452 <xsl:template name="sidebar.titlepage.before.recto">
5453 </xsl:template>
5454
5455 <xsl:template name="sidebar.titlepage.before.verso">
5456 </xsl:template>
5457
5458 <xsl:template name="sidebar.titlepage">
5459   <fo:block>
5460     <xsl:variable name="recto.content">
5461       <xsl:call-template name="sidebar.titlepage.before.recto"/>
5462       <xsl:call-template name="sidebar.titlepage.recto"/>
5463     </xsl:variable>
5464     <xsl:variable name="recto.elements.count">
5465       <xsl:choose>
5466         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5467         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5468           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5469         <xsl:otherwise>1</xsl:otherwise>
5470       </xsl:choose>
5471     </xsl:variable>
5472     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5473       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5474     </xsl:if>
5475     <xsl:variable name="verso.content">
5476       <xsl:call-template name="sidebar.titlepage.before.verso"/>
5477       <xsl:call-template name="sidebar.titlepage.verso"/>
5478     </xsl:variable>
5479     <xsl:variable name="verso.elements.count">
5480       <xsl:choose>
5481         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5482         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5483           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5484         <xsl:otherwise>1</xsl:otherwise>
5485       </xsl:choose>
5486     </xsl:variable>
5487     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5488       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5489     </xsl:if>
5490     <xsl:call-template name="sidebar.titlepage.separator"/>
5491   </fo:block>
5492 </xsl:template>
5493
5494 <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
5495   <!-- if an element isn't found in this mode, -->
5496   <!-- try the generic titlepage.mode -->
5497   <xsl:apply-templates select="." mode="titlepage.mode"/>
5498 </xsl:template>
5499
5500 <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
5501   <!-- if an element isn't found in this mode, -->
5502   <!-- try the generic titlepage.mode -->
5503   <xsl:apply-templates select="." mode="titlepage.mode"/>
5504 </xsl:template>
5505
5506 <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
5507 <fo:block xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold">
5508 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
5509 </fo:block>
5510 </xsl:template>
5511
5512 <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
5513 <fo:block xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
5514 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
5515 </fo:block>
5516 </xsl:template>
5517
5518 <xsl:template match="itermset" mode="sidebar.titlepage.recto.auto.mode">
5519 <fo:block xsl:use-attribute-sets="sidebar.titlepage.recto.style">
5520 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
5521 </fo:block>
5522 </xsl:template>
5523
5524 <xsl:template name="qandaset.titlepage.recto">
5525   <xsl:choose>
5526     <xsl:when test="qandasetinfo/title">
5527       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
5528     </xsl:when>
5529     <xsl:when test="blockinfo/title">
5530       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
5531     </xsl:when>
5532     <xsl:when test="info/title">
5533       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
5534     </xsl:when>
5535     <xsl:when test="title">
5536       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
5537     </xsl:when>
5538   </xsl:choose>
5539
5540   <xsl:choose>
5541     <xsl:when test="qandasetinfo/subtitle">
5542       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
5543     </xsl:when>
5544     <xsl:when test="blockinfo/subtitle">
5545       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
5546     </xsl:when>
5547     <xsl:when test="info/subtitle">
5548       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
5549     </xsl:when>
5550     <xsl:when test="subtitle">
5551       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
5552     </xsl:when>
5553   </xsl:choose>
5554
5555   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
5556   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
5557   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
5558   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
5559   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
5560   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
5561   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
5562   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
5563   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
5564   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
5565   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
5566   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
5567   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
5568   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
5569   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
5570   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
5571   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
5572   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
5573   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
5574   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
5575   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
5576   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
5577   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
5578   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
5579   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
5580   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
5581   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
5582   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
5583   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
5584   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
5585   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
5586   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
5587   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
5588   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/itermset"/>
5589   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/itermset"/>
5590   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/itermset"/>
5591 </xsl:template>
5592
5593 <xsl:template name="qandaset.titlepage.verso">
5594 </xsl:template>
5595
5596 <xsl:template name="qandaset.titlepage.separator">
5597 </xsl:template>
5598
5599 <xsl:template name="qandaset.titlepage.before.recto">
5600 </xsl:template>
5601
5602 <xsl:template name="qandaset.titlepage.before.verso">
5603 </xsl:template>
5604
5605 <xsl:template name="qandaset.titlepage">
5606   <fo:block font-family="{$title.fontset}">
5607     <xsl:variable name="recto.content">
5608       <xsl:call-template name="qandaset.titlepage.before.recto"/>
5609       <xsl:call-template name="qandaset.titlepage.recto"/>
5610     </xsl:variable>
5611     <xsl:variable name="recto.elements.count">
5612       <xsl:choose>
5613         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5614         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5615           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5616         <xsl:otherwise>1</xsl:otherwise>
5617       </xsl:choose>
5618     </xsl:variable>
5619     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5620       <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
5621     </xsl:if>
5622     <xsl:variable name="verso.content">
5623       <xsl:call-template name="qandaset.titlepage.before.verso"/>
5624       <xsl:call-template name="qandaset.titlepage.verso"/>
5625     </xsl:variable>
5626     <xsl:variable name="verso.elements.count">
5627       <xsl:choose>
5628         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5629         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5630           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5631         <xsl:otherwise>1</xsl:otherwise>
5632       </xsl:choose>
5633     </xsl:variable>
5634     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5635       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5636     </xsl:if>
5637     <xsl:call-template name="qandaset.titlepage.separator"/>
5638   </fo:block>
5639 </xsl:template>
5640
5641 <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
5642   <!-- if an element isn't found in this mode, -->
5643   <!-- try the generic titlepage.mode -->
5644   <xsl:apply-templates select="." mode="titlepage.mode"/>
5645 </xsl:template>
5646
5647 <xsl:template match="*" mode="qandaset.titlepage.verso.mode">
5648   <!-- if an element isn't found in this mode, -->
5649   <!-- try the generic titlepage.mode -->
5650   <xsl:apply-templates select="." mode="titlepage.mode"/>
5651 </xsl:template>
5652
5653 <xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
5654 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
5655 <xsl:call-template name="component.title">
5656 <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
5657 </xsl:call-template>
5658 </fo:block>
5659 </xsl:template>
5660
5661 <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
5662 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style">
5663 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5664 </fo:block>
5665 </xsl:template>
5666
5667 <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
5668 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
5669 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5670 </fo:block>
5671 </xsl:template>
5672
5673 <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
5674 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
5675 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5676 </fo:block>
5677 </xsl:template>
5678
5679 <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
5680 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
5681 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5682 </fo:block>
5683 </xsl:template>
5684
5685 <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
5686 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5687 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5688 </fo:block>
5689 </xsl:template>
5690
5691 <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
5692 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5693 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5694 </fo:block>
5695 </xsl:template>
5696
5697 <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
5698 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5699 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5700 </fo:block>
5701 </xsl:template>
5702
5703 <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
5704 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
5705 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5706 </fo:block>
5707 </xsl:template>
5708
5709 <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
5710 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5711 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5712 </fo:block>
5713 </xsl:template>
5714
5715 <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
5716 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5717 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5718 </fo:block>
5719 </xsl:template>
5720
5721 <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
5722 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5723 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5724 </fo:block>
5725 </xsl:template>
5726
5727 <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
5728 <fo:block 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}">
5729 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5730 </fo:block>
5731 </xsl:template>
5732
5733 <xsl:template match="itermset" mode="qandaset.titlepage.recto.auto.mode">
5734 <fo:block xsl:use-attribute-sets="qandaset.titlepage.recto.style">
5735 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5736 </fo:block>
5737 </xsl:template>
5738
5739 <xsl:template name="table.of.contents.titlepage.recto">
5740   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5741 <xsl:call-template name="gentext">
5742 <xsl:with-param name="key" select="'TableofContents'"/>
5743 </xsl:call-template></fo:block>
5744 </xsl:template>
5745
5746 <xsl:template name="table.of.contents.titlepage.verso">
5747 </xsl:template>
5748
5749 <xsl:template name="table.of.contents.titlepage.separator">
5750 </xsl:template>
5751
5752 <xsl:template name="table.of.contents.titlepage.before.recto">
5753 </xsl:template>
5754
5755 <xsl:template name="table.of.contents.titlepage.before.verso">
5756 </xsl:template>
5757
5758 <xsl:template name="table.of.contents.titlepage">
5759   <fo:block>
5760     <xsl:variable name="recto.content">
5761       <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
5762       <xsl:call-template name="table.of.contents.titlepage.recto"/>
5763     </xsl:variable>
5764     <xsl:variable name="recto.elements.count">
5765       <xsl:choose>
5766         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5767         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5768           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5769         <xsl:otherwise>1</xsl:otherwise>
5770       </xsl:choose>
5771     </xsl:variable>
5772     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5773       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5774     </xsl:if>
5775     <xsl:variable name="verso.content">
5776       <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
5777       <xsl:call-template name="table.of.contents.titlepage.verso"/>
5778     </xsl:variable>
5779     <xsl:variable name="verso.elements.count">
5780       <xsl:choose>
5781         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5782         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5783           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5784         <xsl:otherwise>1</xsl:otherwise>
5785       </xsl:choose>
5786     </xsl:variable>
5787     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5788       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5789     </xsl:if>
5790     <xsl:call-template name="table.of.contents.titlepage.separator"/>
5791   </fo:block>
5792 </xsl:template>
5793
5794 <xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
5795   <!-- if an element isn't found in this mode, -->
5796   <!-- try the generic titlepage.mode -->
5797   <xsl:apply-templates select="." mode="titlepage.mode"/>
5798 </xsl:template>
5799
5800 <xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
5801   <!-- if an element isn't found in this mode, -->
5802   <!-- try the generic titlepage.mode -->
5803   <xsl:apply-templates select="." mode="titlepage.mode"/>
5804 </xsl:template>
5805
5806 <xsl:template name="list.of.tables.titlepage.recto">
5807   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5808 <xsl:call-template name="gentext">
5809 <xsl:with-param name="key" select="'ListofTables'"/>
5810 </xsl:call-template></fo:block>
5811 </xsl:template>
5812
5813 <xsl:template name="list.of.tables.titlepage.verso">
5814 </xsl:template>
5815
5816 <xsl:template name="list.of.tables.titlepage.separator">
5817 </xsl:template>
5818
5819 <xsl:template name="list.of.tables.titlepage.before.recto">
5820 </xsl:template>
5821
5822 <xsl:template name="list.of.tables.titlepage.before.verso">
5823 </xsl:template>
5824
5825 <xsl:template name="list.of.tables.titlepage">
5826   <fo:block>
5827     <xsl:variable name="recto.content">
5828       <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
5829       <xsl:call-template name="list.of.tables.titlepage.recto"/>
5830     </xsl:variable>
5831     <xsl:variable name="recto.elements.count">
5832       <xsl:choose>
5833         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5834         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5835           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5836         <xsl:otherwise>1</xsl:otherwise>
5837       </xsl:choose>
5838     </xsl:variable>
5839     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5840       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5841     </xsl:if>
5842     <xsl:variable name="verso.content">
5843       <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
5844       <xsl:call-template name="list.of.tables.titlepage.verso"/>
5845     </xsl:variable>
5846     <xsl:variable name="verso.elements.count">
5847       <xsl:choose>
5848         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5849         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5850           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5851         <xsl:otherwise>1</xsl:otherwise>
5852       </xsl:choose>
5853     </xsl:variable>
5854     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5855       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5856     </xsl:if>
5857     <xsl:call-template name="list.of.tables.titlepage.separator"/>
5858   </fo:block>
5859 </xsl:template>
5860
5861 <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
5862   <!-- if an element isn't found in this mode, -->
5863   <!-- try the generic titlepage.mode -->
5864   <xsl:apply-templates select="." mode="titlepage.mode"/>
5865 </xsl:template>
5866
5867 <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
5868   <!-- if an element isn't found in this mode, -->
5869   <!-- try the generic titlepage.mode -->
5870   <xsl:apply-templates select="." mode="titlepage.mode"/>
5871 </xsl:template>
5872
5873 <xsl:template name="list.of.figures.titlepage.recto">
5874   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5875 <xsl:call-template name="gentext">
5876 <xsl:with-param name="key" select="'ListofFigures'"/>
5877 </xsl:call-template></fo:block>
5878 </xsl:template>
5879
5880 <xsl:template name="list.of.figures.titlepage.verso">
5881 </xsl:template>
5882
5883 <xsl:template name="list.of.figures.titlepage.separator">
5884 </xsl:template>
5885
5886 <xsl:template name="list.of.figures.titlepage.before.recto">
5887 </xsl:template>
5888
5889 <xsl:template name="list.of.figures.titlepage.before.verso">
5890 </xsl:template>
5891
5892 <xsl:template name="list.of.figures.titlepage">
5893   <fo:block>
5894     <xsl:variable name="recto.content">
5895       <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
5896       <xsl:call-template name="list.of.figures.titlepage.recto"/>
5897     </xsl:variable>
5898     <xsl:variable name="recto.elements.count">
5899       <xsl:choose>
5900         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5901         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5902           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5903         <xsl:otherwise>1</xsl:otherwise>
5904       </xsl:choose>
5905     </xsl:variable>
5906     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5907       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5908     </xsl:if>
5909     <xsl:variable name="verso.content">
5910       <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
5911       <xsl:call-template name="list.of.figures.titlepage.verso"/>
5912     </xsl:variable>
5913     <xsl:variable name="verso.elements.count">
5914       <xsl:choose>
5915         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5916         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5917           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5918         <xsl:otherwise>1</xsl:otherwise>
5919       </xsl:choose>
5920     </xsl:variable>
5921     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5922       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5923     </xsl:if>
5924     <xsl:call-template name="list.of.figures.titlepage.separator"/>
5925   </fo:block>
5926 </xsl:template>
5927
5928 <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
5929   <!-- if an element isn't found in this mode, -->
5930   <!-- try the generic titlepage.mode -->
5931   <xsl:apply-templates select="." mode="titlepage.mode"/>
5932 </xsl:template>
5933
5934 <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
5935   <!-- if an element isn't found in this mode, -->
5936   <!-- try the generic titlepage.mode -->
5937   <xsl:apply-templates select="." mode="titlepage.mode"/>
5938 </xsl:template>
5939
5940 <xsl:template name="list.of.examples.titlepage.recto">
5941   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5942 <xsl:call-template name="gentext">
5943 <xsl:with-param name="key" select="'ListofExamples'"/>
5944 </xsl:call-template></fo:block>
5945 </xsl:template>
5946
5947 <xsl:template name="list.of.examples.titlepage.verso">
5948 </xsl:template>
5949
5950 <xsl:template name="list.of.examples.titlepage.separator">
5951 </xsl:template>
5952
5953 <xsl:template name="list.of.examples.titlepage.before.recto">
5954 </xsl:template>
5955
5956 <xsl:template name="list.of.examples.titlepage.before.verso">
5957 </xsl:template>
5958
5959 <xsl:template name="list.of.examples.titlepage">
5960   <fo:block>
5961     <xsl:variable name="recto.content">
5962       <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
5963       <xsl:call-template name="list.of.examples.titlepage.recto"/>
5964     </xsl:variable>
5965     <xsl:variable name="recto.elements.count">
5966       <xsl:choose>
5967         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5968         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5969           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5970         <xsl:otherwise>1</xsl:otherwise>
5971       </xsl:choose>
5972     </xsl:variable>
5973     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5974       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5975     </xsl:if>
5976     <xsl:variable name="verso.content">
5977       <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
5978       <xsl:call-template name="list.of.examples.titlepage.verso"/>
5979     </xsl:variable>
5980     <xsl:variable name="verso.elements.count">
5981       <xsl:choose>
5982         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5983         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5984           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5985         <xsl:otherwise>1</xsl:otherwise>
5986       </xsl:choose>
5987     </xsl:variable>
5988     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5989       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5990     </xsl:if>
5991     <xsl:call-template name="list.of.examples.titlepage.separator"/>
5992   </fo:block>
5993 </xsl:template>
5994
5995 <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
5996   <!-- if an element isn't found in this mode, -->
5997   <!-- try the generic titlepage.mode -->
5998   <xsl:apply-templates select="." mode="titlepage.mode"/>
5999 </xsl:template>
6000
6001 <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
6002   <!-- if an element isn't found in this mode, -->
6003   <!-- try the generic titlepage.mode -->
6004   <xsl:apply-templates select="." mode="titlepage.mode"/>
6005 </xsl:template>
6006
6007 <xsl:template name="list.of.equations.titlepage.recto">
6008   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
6009 <xsl:call-template name="gentext">
6010 <xsl:with-param name="key" select="'ListofEquations'"/>
6011 </xsl:call-template></fo:block>
6012 </xsl:template>
6013
6014 <xsl:template name="list.of.equations.titlepage.verso">
6015 </xsl:template>
6016
6017 <xsl:template name="list.of.equations.titlepage.separator">
6018 </xsl:template>
6019
6020 <xsl:template name="list.of.equations.titlepage.before.recto">
6021 </xsl:template>
6022
6023 <xsl:template name="list.of.equations.titlepage.before.verso">
6024 </xsl:template>
6025
6026 <xsl:template name="list.of.equations.titlepage">
6027   <fo:block>
6028     <xsl:variable name="recto.content">
6029       <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
6030       <xsl:call-template name="list.of.equations.titlepage.recto"/>
6031     </xsl:variable>
6032     <xsl:variable name="recto.elements.count">
6033       <xsl:choose>
6034         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6035         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6036           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6037         <xsl:otherwise>1</xsl:otherwise>
6038       </xsl:choose>
6039     </xsl:variable>
6040     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6041       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6042     </xsl:if>
6043     <xsl:variable name="verso.content">
6044       <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
6045       <xsl:call-template name="list.of.equations.titlepage.verso"/>
6046     </xsl:variable>
6047     <xsl:variable name="verso.elements.count">
6048       <xsl:choose>
6049         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6050         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6051           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6052         <xsl:otherwise>1</xsl:otherwise>
6053       </xsl:choose>
6054     </xsl:variable>
6055     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6056       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6057     </xsl:if>
6058     <xsl:call-template name="list.of.equations.titlepage.separator"/>
6059   </fo:block>
6060 </xsl:template>
6061
6062 <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
6063   <!-- if an element isn't found in this mode, -->
6064   <!-- try the generic titlepage.mode -->
6065   <xsl:apply-templates select="." mode="titlepage.mode"/>
6066 </xsl:template>
6067
6068 <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
6069   <!-- if an element isn't found in this mode, -->
6070   <!-- try the generic titlepage.mode -->
6071   <xsl:apply-templates select="." mode="titlepage.mode"/>
6072 </xsl:template>
6073
6074 <xsl:template name="list.of.procedures.titlepage.recto">
6075   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
6076 <xsl:call-template name="gentext">
6077 <xsl:with-param name="key" select="'ListofProcedures'"/>
6078 </xsl:call-template></fo:block>
6079 </xsl:template>
6080
6081 <xsl:template name="list.of.procedures.titlepage.verso">
6082 </xsl:template>
6083
6084 <xsl:template name="list.of.procedures.titlepage.separator">
6085 </xsl:template>
6086
6087 <xsl:template name="list.of.procedures.titlepage.before.recto">
6088 </xsl:template>
6089
6090 <xsl:template name="list.of.procedures.titlepage.before.verso">
6091 </xsl:template>
6092
6093 <xsl:template name="list.of.procedures.titlepage">
6094   <fo:block>
6095     <xsl:variable name="recto.content">
6096       <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
6097       <xsl:call-template name="list.of.procedures.titlepage.recto"/>
6098     </xsl:variable>
6099     <xsl:variable name="recto.elements.count">
6100       <xsl:choose>
6101         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6102         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6103           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6104         <xsl:otherwise>1</xsl:otherwise>
6105       </xsl:choose>
6106     </xsl:variable>
6107     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6108       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6109     </xsl:if>
6110     <xsl:variable name="verso.content">
6111       <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
6112       <xsl:call-template name="list.of.procedures.titlepage.verso"/>
6113     </xsl:variable>
6114     <xsl:variable name="verso.elements.count">
6115       <xsl:choose>
6116         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6117         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6118           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6119         <xsl:otherwise>1</xsl:otherwise>
6120       </xsl:choose>
6121     </xsl:variable>
6122     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6123       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6124     </xsl:if>
6125     <xsl:call-template name="list.of.procedures.titlepage.separator"/>
6126   </fo:block>
6127 </xsl:template>
6128
6129 <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
6130   <!-- if an element isn't found in this mode, -->
6131   <!-- try the generic titlepage.mode -->
6132   <xsl:apply-templates select="." mode="titlepage.mode"/>
6133 </xsl:template>
6134
6135 <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
6136   <!-- if an element isn't found in this mode, -->
6137   <!-- try the generic titlepage.mode -->
6138   <xsl:apply-templates select="." mode="titlepage.mode"/>
6139 </xsl:template>
6140
6141 <xsl:template name="list.of.unknowns.titlepage.recto">
6142   <fo:block 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" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
6143 <xsl:call-template name="gentext">
6144 <xsl:with-param name="key" select="'ListofUnknown'"/>
6145 </xsl:call-template></fo:block>
6146 </xsl:template>
6147
6148 <xsl:template name="list.of.unknowns.titlepage.verso">
6149 </xsl:template>
6150
6151 <xsl:template name="list.of.unknowns.titlepage.separator">
6152 </xsl:template>
6153
6154 <xsl:template name="list.of.unknowns.titlepage.before.recto">
6155 </xsl:template>
6156
6157 <xsl:template name="list.of.unknowns.titlepage.before.verso">
6158 </xsl:template>
6159
6160 <xsl:template name="list.of.unknowns.titlepage">
6161   <fo:block>
6162     <xsl:variable name="recto.content">
6163       <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
6164       <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
6165     </xsl:variable>
6166     <xsl:variable name="recto.elements.count">
6167       <xsl:choose>
6168         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6169         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6170           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6171         <xsl:otherwise>1</xsl:otherwise>
6172       </xsl:choose>
6173     </xsl:variable>
6174     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6175       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6176     </xsl:if>
6177     <xsl:variable name="verso.content">
6178       <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
6179       <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
6180     </xsl:variable>
6181     <xsl:variable name="verso.elements.count">
6182       <xsl:choose>
6183         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6184         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6185           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6186         <xsl:otherwise>1</xsl:otherwise>
6187       </xsl:choose>
6188     </xsl:variable>
6189     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6190       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6191     </xsl:if>
6192     <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
6193   </fo:block>
6194 </xsl:template>
6195
6196 <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
6197   <!-- if an element isn't found in this mode, -->
6198   <!-- try the generic titlepage.mode -->
6199   <xsl:apply-templates select="." mode="titlepage.mode"/>
6200 </xsl:template>
6201
6202 <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
6203   <!-- if an element isn't found in this mode, -->
6204   <!-- try the generic titlepage.mode -->
6205   <xsl:apply-templates select="." mode="titlepage.mode"/>
6206 </xsl:template>
6207
6208 <xsl:template name="component.list.of.tables.titlepage.recto">
6209   <fo:block xsl:use-attribute-sets="component.list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
6210 <xsl:call-template name="gentext">
6211 <xsl:with-param name="key" select="'ListofTables'"/>
6212 </xsl:call-template></fo:block>
6213 </xsl:template>
6214
6215 <xsl:template name="component.list.of.tables.titlepage.verso">
6216 </xsl:template>
6217
6218 <xsl:template name="component.list.of.tables.titlepage.separator">
6219 </xsl:template>
6220
6221 <xsl:template name="component.list.of.tables.titlepage.before.recto">
6222 </xsl:template>
6223
6224 <xsl:template name="component.list.of.tables.titlepage.before.verso">
6225 </xsl:template>
6226
6227 <xsl:template name="component.list.of.tables.titlepage">
6228   <fo:block>
6229     <xsl:variable name="recto.content">
6230       <xsl:call-template name="component.list.of.tables.titlepage.before.recto"/>
6231       <xsl:call-template name="component.list.of.tables.titlepage.recto"/>
6232     </xsl:variable>
6233     <xsl:variable name="recto.elements.count">
6234       <xsl:choose>
6235         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6236         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6237           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6238         <xsl:otherwise>1</xsl:otherwise>
6239       </xsl:choose>
6240     </xsl:variable>
6241     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6242       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6243     </xsl:if>
6244     <xsl:variable name="verso.content">
6245       <xsl:call-template name="component.list.of.tables.titlepage.before.verso"/>
6246       <xsl:call-template name="component.list.of.tables.titlepage.verso"/>
6247     </xsl:variable>
6248     <xsl:variable name="verso.elements.count">
6249       <xsl:choose>
6250         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6251         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6252           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6253         <xsl:otherwise>1</xsl:otherwise>
6254       </xsl:choose>
6255     </xsl:variable>
6256     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6257       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6258     </xsl:if>
6259     <xsl:call-template name="component.list.of.tables.titlepage.separator"/>
6260   </fo:block>
6261 </xsl:template>
6262
6263 <xsl:template match="*" mode="component.list.of.tables.titlepage.recto.mode">
6264   <!-- if an element isn't found in this mode, -->
6265   <!-- try the generic titlepage.mode -->
6266   <xsl:apply-templates select="." mode="titlepage.mode"/>
6267 </xsl:template>
6268
6269 <xsl:template match="*" mode="component.list.of.tables.titlepage.verso.mode">
6270   <!-- if an element isn't found in this mode, -->
6271   <!-- try the generic titlepage.mode -->
6272   <xsl:apply-templates select="." mode="titlepage.mode"/>
6273 </xsl:template>
6274
6275 <xsl:template name="component.list.of.figures.titlepage.recto">
6276   <fo:block xsl:use-attribute-sets="component.list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
6277 <xsl:call-template name="gentext">
6278 <xsl:with-param name="key" select="'ListofFigures'"/>
6279 </xsl:call-template></fo:block>
6280 </xsl:template>
6281
6282 <xsl:template name="component.list.of.figures.titlepage.verso">
6283 </xsl:template>
6284
6285 <xsl:template name="component.list.of.figures.titlepage.separator">
6286 </xsl:template>
6287
6288 <xsl:template name="component.list.of.figures.titlepage.before.recto">
6289 </xsl:template>
6290
6291 <xsl:template name="component.list.of.figures.titlepage.before.verso">
6292 </xsl:template>
6293
6294 <xsl:template name="component.list.of.figures.titlepage">
6295   <fo:block>
6296     <xsl:variable name="recto.content">
6297       <xsl:call-template name="component.list.of.figures.titlepage.before.recto"/>
6298       <xsl:call-template name="component.list.of.figures.titlepage.recto"/>
6299     </xsl:variable>
6300     <xsl:variable name="recto.elements.count">
6301       <xsl:choose>
6302         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6303         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6304           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6305         <xsl:otherwise>1</xsl:otherwise>
6306       </xsl:choose>
6307     </xsl:variable>
6308     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6309       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6310     </xsl:if>
6311     <xsl:variable name="verso.content">
6312       <xsl:call-template name="component.list.of.figures.titlepage.before.verso"/>
6313       <xsl:call-template name="component.list.of.figures.titlepage.verso"/>
6314     </xsl:variable>
6315     <xsl:variable name="verso.elements.count">
6316       <xsl:choose>
6317         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6318         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6319           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6320         <xsl:otherwise>1</xsl:otherwise>
6321       </xsl:choose>
6322     </xsl:variable>
6323     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6324       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6325     </xsl:if>
6326     <xsl:call-template name="component.list.of.figures.titlepage.separator"/>
6327   </fo:block>
6328 </xsl:template>
6329
6330 <xsl:template match="*" mode="component.list.of.figures.titlepage.recto.mode">
6331   <!-- if an element isn't found in this mode, -->
6332   <!-- try the generic titlepage.mode -->
6333   <xsl:apply-templates select="." mode="titlepage.mode"/>
6334 </xsl:template>
6335
6336 <xsl:template match="*" mode="component.list.of.figures.titlepage.verso.mode">
6337   <!-- if an element isn't found in this mode, -->
6338   <!-- try the generic titlepage.mode -->
6339   <xsl:apply-templates select="." mode="titlepage.mode"/>
6340 </xsl:template>
6341
6342 <xsl:template name="component.list.of.examples.titlepage.recto">
6343   <fo:block xsl:use-attribute-sets="component.list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
6344 <xsl:call-template name="gentext">
6345 <xsl:with-param name="key" select="'ListofExamples'"/>
6346 </xsl:call-template></fo:block>
6347 </xsl:template>
6348
6349 <xsl:template name="component.list.of.examples.titlepage.verso">
6350 </xsl:template>
6351
6352 <xsl:template name="component.list.of.examples.titlepage.separator">
6353 </xsl:template>
6354
6355 <xsl:template name="component.list.of.examples.titlepage.before.recto">
6356 </xsl:template>
6357
6358 <xsl:template name="component.list.of.examples.titlepage.before.verso">
6359 </xsl:template>
6360
6361 <xsl:template name="component.list.of.examples.titlepage">
6362   <fo:block>
6363     <xsl:variable name="recto.content">
6364       <xsl:call-template name="component.list.of.examples.titlepage.before.recto"/>
6365       <xsl:call-template name="component.list.of.examples.titlepage.recto"/>
6366     </xsl:variable>
6367     <xsl:variable name="recto.elements.count">
6368       <xsl:choose>
6369         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6370         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6371           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6372         <xsl:otherwise>1</xsl:otherwise>
6373       </xsl:choose>
6374     </xsl:variable>
6375     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6376       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6377     </xsl:if>
6378     <xsl:variable name="verso.content">
6379       <xsl:call-template name="component.list.of.examples.titlepage.before.verso"/>
6380       <xsl:call-template name="component.list.of.examples.titlepage.verso"/>
6381     </xsl:variable>
6382     <xsl:variable name="verso.elements.count">
6383       <xsl:choose>
6384         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6385         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6386           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6387         <xsl:otherwise>1</xsl:otherwise>
6388       </xsl:choose>
6389     </xsl:variable>
6390     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6391       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6392     </xsl:if>
6393     <xsl:call-template name="component.list.of.examples.titlepage.separator"/>
6394   </fo:block>
6395 </xsl:template>
6396
6397 <xsl:template match="*" mode="component.list.of.examples.titlepage.recto.mode">
6398   <!-- if an element isn't found in this mode, -->
6399   <!-- try the generic titlepage.mode -->
6400   <xsl:apply-templates select="." mode="titlepage.mode"/>
6401 </xsl:template>
6402
6403 <xsl:template match="*" mode="component.list.of.examples.titlepage.verso.mode">
6404   <!-- if an element isn't found in this mode, -->
6405   <!-- try the generic titlepage.mode -->
6406   <xsl:apply-templates select="." mode="titlepage.mode"/>
6407 </xsl:template>
6408
6409 <xsl:template name="component.list.of.equations.titlepage.recto">
6410   <fo:block xsl:use-attribute-sets="component.list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
6411 <xsl:call-template name="gentext">
6412 <xsl:with-param name="key" select="'ListofEquations'"/>
6413 </xsl:call-template></fo:block>
6414 </xsl:template>
6415
6416 <xsl:template name="component.list.of.equations.titlepage.verso">
6417 </xsl:template>
6418
6419 <xsl:template name="component.list.of.equations.titlepage.separator">
6420 </xsl:template>
6421
6422 <xsl:template name="component.list.of.equations.titlepage.before.recto">
6423 </xsl:template>
6424
6425 <xsl:template name="component.list.of.equations.titlepage.before.verso">
6426 </xsl:template>
6427
6428 <xsl:template name="component.list.of.equations.titlepage">
6429   <fo:block>
6430     <xsl:variable name="recto.content">
6431       <xsl:call-template name="component.list.of.equations.titlepage.before.recto"/>
6432       <xsl:call-template name="component.list.of.equations.titlepage.recto"/>
6433     </xsl:variable>
6434     <xsl:variable name="recto.elements.count">
6435       <xsl:choose>
6436         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6437         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6438           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6439         <xsl:otherwise>1</xsl:otherwise>
6440       </xsl:choose>
6441     </xsl:variable>
6442     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6443       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6444     </xsl:if>
6445     <xsl:variable name="verso.content">
6446       <xsl:call-template name="component.list.of.equations.titlepage.before.verso"/>
6447       <xsl:call-template name="component.list.of.equations.titlepage.verso"/>
6448     </xsl:variable>
6449     <xsl:variable name="verso.elements.count">
6450       <xsl:choose>
6451         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6452         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6453           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6454         <xsl:otherwise>1</xsl:otherwise>
6455       </xsl:choose>
6456     </xsl:variable>
6457     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6458       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6459     </xsl:if>
6460     <xsl:call-template name="component.list.of.equations.titlepage.separator"/>
6461   </fo:block>
6462 </xsl:template>
6463
6464 <xsl:template match="*" mode="component.list.of.equations.titlepage.recto.mode">
6465   <!-- if an element isn't found in this mode, -->
6466   <!-- try the generic titlepage.mode -->
6467   <xsl:apply-templates select="." mode="titlepage.mode"/>
6468 </xsl:template>
6469
6470 <xsl:template match="*" mode="component.list.of.equations.titlepage.verso.mode">
6471   <!-- if an element isn't found in this mode, -->
6472   <!-- try the generic titlepage.mode -->
6473   <xsl:apply-templates select="." mode="titlepage.mode"/>
6474 </xsl:template>
6475
6476 <xsl:template name="component.list.of.procedures.titlepage.recto">
6477   <fo:block xsl:use-attribute-sets="component.list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
6478 <xsl:call-template name="gentext">
6479 <xsl:with-param name="key" select="'ListofProcedures'"/>
6480 </xsl:call-template></fo:block>
6481 </xsl:template>
6482
6483 <xsl:template name="component.list.of.procedures.titlepage.verso">
6484 </xsl:template>
6485
6486 <xsl:template name="component.list.of.procedures.titlepage.separator">
6487 </xsl:template>
6488
6489 <xsl:template name="component.list.of.procedures.titlepage.before.recto">
6490 </xsl:template>
6491
6492 <xsl:template name="component.list.of.procedures.titlepage.before.verso">
6493 </xsl:template>
6494
6495 <xsl:template name="component.list.of.procedures.titlepage">
6496   <fo:block>
6497     <xsl:variable name="recto.content">
6498       <xsl:call-template name="component.list.of.procedures.titlepage.before.recto"/>
6499       <xsl:call-template name="component.list.of.procedures.titlepage.recto"/>
6500     </xsl:variable>
6501     <xsl:variable name="recto.elements.count">
6502       <xsl:choose>
6503         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6504         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6505           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6506         <xsl:otherwise>1</xsl:otherwise>
6507       </xsl:choose>
6508     </xsl:variable>
6509     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6510       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6511     </xsl:if>
6512     <xsl:variable name="verso.content">
6513       <xsl:call-template name="component.list.of.procedures.titlepage.before.verso"/>
6514       <xsl:call-template name="component.list.of.procedures.titlepage.verso"/>
6515     </xsl:variable>
6516     <xsl:variable name="verso.elements.count">
6517       <xsl:choose>
6518         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6519         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6520           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6521         <xsl:otherwise>1</xsl:otherwise>
6522       </xsl:choose>
6523     </xsl:variable>
6524     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6525       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6526     </xsl:if>
6527     <xsl:call-template name="component.list.of.procedures.titlepage.separator"/>
6528   </fo:block>
6529 </xsl:template>
6530
6531 <xsl:template match="*" mode="component.list.of.procedures.titlepage.recto.mode">
6532   <!-- if an element isn't found in this mode, -->
6533   <!-- try the generic titlepage.mode -->
6534   <xsl:apply-templates select="." mode="titlepage.mode"/>
6535 </xsl:template>
6536
6537 <xsl:template match="*" mode="component.list.of.procedures.titlepage.verso.mode">
6538   <!-- if an element isn't found in this mode, -->
6539   <!-- try the generic titlepage.mode -->
6540   <xsl:apply-templates select="." mode="titlepage.mode"/>
6541 </xsl:template>
6542
6543 <xsl:template name="component.list.of.unknowns.titlepage.recto">
6544   <fo:block xsl:use-attribute-sets="component.list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
6545 <xsl:call-template name="gentext">
6546 <xsl:with-param name="key" select="'ListofUnknown'"/>
6547 </xsl:call-template></fo:block>
6548 </xsl:template>
6549
6550 <xsl:template name="component.list.of.unknowns.titlepage.verso">
6551 </xsl:template>
6552
6553 <xsl:template name="component.list.of.unknowns.titlepage.separator">
6554 </xsl:template>
6555
6556 <xsl:template name="component.list.of.unknowns.titlepage.before.recto">
6557 </xsl:template>
6558
6559 <xsl:template name="component.list.of.unknowns.titlepage.before.verso">
6560 </xsl:template>
6561
6562 <xsl:template name="component.list.of.unknowns.titlepage">
6563   <fo:block>
6564     <xsl:variable name="recto.content">
6565       <xsl:call-template name="component.list.of.unknowns.titlepage.before.recto"/>
6566       <xsl:call-template name="component.list.of.unknowns.titlepage.recto"/>
6567     </xsl:variable>
6568     <xsl:variable name="recto.elements.count">
6569       <xsl:choose>
6570         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6571         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6572           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
6573         <xsl:otherwise>1</xsl:otherwise>
6574       </xsl:choose>
6575     </xsl:variable>
6576     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
6577       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
6578     </xsl:if>
6579     <xsl:variable name="verso.content">
6580       <xsl:call-template name="component.list.of.unknowns.titlepage.before.verso"/>
6581       <xsl:call-template name="component.list.of.unknowns.titlepage.verso"/>
6582     </xsl:variable>
6583     <xsl:variable name="verso.elements.count">
6584       <xsl:choose>
6585         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6586         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
6587           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
6588         <xsl:otherwise>1</xsl:otherwise>
6589       </xsl:choose>
6590     </xsl:variable>
6591     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
6592       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
6593     </xsl:if>
6594     <xsl:call-template name="component.list.of.unknowns.titlepage.separator"/>
6595   </fo:block>
6596 </xsl:template>
6597
6598 <xsl:template match="*" mode="component.list.of.unknowns.titlepage.recto.mode">
6599   <!-- if an element isn't found in this mode, -->
6600   <!-- try the generic titlepage.mode -->
6601   <xsl:apply-templates select="." mode="titlepage.mode"/>
6602 </xsl:template>
6603
6604 <xsl:template match="*" mode="component.list.of.unknowns.titlepage.verso.mode">
6605   <!-- if an element isn't found in this mode, -->
6606   <!-- try the generic titlepage.mode -->
6607   <xsl:apply-templates select="." mode="titlepage.mode"/>
6608 </xsl:template>
6609
6610 </xsl:stylesheet>
6611