]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/styleguide/evergreen_titlepage.xsl
Add content to migrating bib records - mostly from wiki.
[working/Evergreen.git] / stylesheets / styleguide / evergreen_titlepage.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" 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:template>
72
73 <xsl:template name="article.titlepage.verso">
74 </xsl:template>
75
76 <xsl:template name="article.titlepage.separator">
77 </xsl:template>
78
79 <xsl:template name="article.titlepage.before.recto">
80 </xsl:template>
81
82 <xsl:template name="article.titlepage.before.verso">
83 </xsl:template>
84
85 <xsl:template name="article.titlepage">
86   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
87     <xsl:variable name="recto.content">
88       <xsl:call-template name="article.titlepage.before.recto"/>
89       <xsl:call-template name="article.titlepage.recto"/>
90     </xsl:variable>
91     <xsl:variable name="recto.elements.count">
92       <xsl:choose>
93         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
94         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
95           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
96         <xsl:otherwise>1</xsl:otherwise>
97       </xsl:choose>
98     </xsl:variable>
99     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
100       <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
101     </xsl:if>
102     <xsl:variable name="verso.content">
103       <xsl:call-template name="article.titlepage.before.verso"/>
104       <xsl:call-template name="article.titlepage.verso"/>
105     </xsl:variable>
106     <xsl:variable name="verso.elements.count">
107       <xsl:choose>
108         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
109         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
110           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
111         <xsl:otherwise>1</xsl:otherwise>
112       </xsl:choose>
113     </xsl:variable>
114     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
115       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
116     </xsl:if>
117     <xsl:call-template name="article.titlepage.separator"/>
118   </fo:block>
119 </xsl:template>
120
121 <xsl:template match="*" mode="article.titlepage.recto.mode">
122   <!-- if an element isn't found in this mode, -->
123   <!-- try the generic titlepage.mode -->
124   <xsl:apply-templates select="." mode="titlepage.mode"/>
125 </xsl:template>
126
127 <xsl:template match="*" mode="article.titlepage.verso.mode">
128   <!-- if an element isn't found in this mode, -->
129   <!-- try the generic titlepage.mode -->
130   <xsl:apply-templates select="." mode="titlepage.mode"/>
131 </xsl:template>
132
133 <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
134 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
135 <xsl:call-template name="component.title">
136 <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
137 </xsl:call-template>
138 </fo:block>
139 </xsl:template>
140
141 <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
142 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
143 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
144 </fo:block>
145 </xsl:template>
146
147 <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
148 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
149 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
150 </fo:block>
151 </xsl:template>
152
153 <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
154 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
155 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
156 </fo:block>
157 </xsl:template>
158
159 <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
160 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
161 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
162 </fo:block>
163 </xsl:template>
164
165 <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
166 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
167 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
168 </fo:block>
169 </xsl:template>
170
171 <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
172 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
173 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
174 </fo:block>
175 </xsl:template>
176
177 <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
178 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
179 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
180 </fo:block>
181 </xsl:template>
182
183 <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
184 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
185 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
186 </fo:block>
187 </xsl:template>
188
189 <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
190 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
191 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
192 </fo:block>
193 </xsl:template>
194
195 <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
196 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
197 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
198 </fo:block>
199 </xsl:template>
200
201 <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
202 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
203 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
204 </fo:block>
205 </xsl:template>
206
207 <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
208 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" 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}">
209 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
210 </fo:block>
211 </xsl:template>
212
213 <xsl:template name="set.titlepage.recto">
214   <xsl:choose>
215     <xsl:when test="setinfo/title">
216       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
217     </xsl:when>
218     <xsl:when test="info/title">
219       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
220     </xsl:when>
221     <xsl:when test="title">
222       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
223     </xsl:when>
224   </xsl:choose>
225
226   <xsl:choose>
227     <xsl:when test="setinfo/subtitle">
228       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
229     </xsl:when>
230     <xsl:when test="info/subtitle">
231       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
232     </xsl:when>
233     <xsl:when test="subtitle">
234       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
235     </xsl:when>
236   </xsl:choose>
237
238   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
239   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
240   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
241   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
242   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
243   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
244   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
245   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
246   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
247   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
248   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
249   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
250   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
251   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
252   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
253   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
254   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
255   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
256   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
257   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
258   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
259   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
260 </xsl:template>
261
262 <xsl:template name="set.titlepage.verso">
263 </xsl:template>
264
265 <xsl:template name="set.titlepage.separator">
266 </xsl:template>
267
268 <xsl:template name="set.titlepage.before.recto">
269 </xsl:template>
270
271 <xsl:template name="set.titlepage.before.verso">
272 </xsl:template>
273
274 <xsl:template name="set.titlepage">
275   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
276     <xsl:variable name="recto.content">
277       <xsl:call-template name="set.titlepage.before.recto"/>
278       <xsl:call-template name="set.titlepage.recto"/>
279     </xsl:variable>
280     <xsl:variable name="recto.elements.count">
281       <xsl:choose>
282         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
283         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
284           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
285         <xsl:otherwise>1</xsl:otherwise>
286       </xsl:choose>
287     </xsl:variable>
288     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
289       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
290     </xsl:if>
291     <xsl:variable name="verso.content">
292       <xsl:call-template name="set.titlepage.before.verso"/>
293       <xsl:call-template name="set.titlepage.verso"/>
294     </xsl:variable>
295     <xsl:variable name="verso.elements.count">
296       <xsl:choose>
297         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
298         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
299           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
300         <xsl:otherwise>1</xsl:otherwise>
301       </xsl:choose>
302     </xsl:variable>
303     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
304       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
305     </xsl:if>
306     <xsl:call-template name="set.titlepage.separator"/>
307   </fo:block>
308 </xsl:template>
309
310 <xsl:template match="*" mode="set.titlepage.recto.mode">
311   <!-- if an element isn't found in this mode, -->
312   <!-- try the generic titlepage.mode -->
313   <xsl:apply-templates select="." mode="titlepage.mode"/>
314 </xsl:template>
315
316 <xsl:template match="*" mode="set.titlepage.verso.mode">
317   <!-- if an element isn't found in this mode, -->
318   <!-- try the generic titlepage.mode -->
319   <xsl:apply-templates select="." mode="titlepage.mode"/>
320 </xsl:template>
321
322 <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
323 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
324 <xsl:call-template name="division.title">
325 <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
326 </xsl:call-template>
327 </fo:block>
328 </xsl:template>
329
330 <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
331 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
332 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
333 </fo:block>
334 </xsl:template>
335
336 <xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
337 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
338 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
339 </fo:block>
340 </xsl:template>
341
342 <xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
343 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
344 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
345 </fo:block>
346 </xsl:template>
347
348 <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
349 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
350 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
351 </fo:block>
352 </xsl:template>
353
354 <xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
355 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
356 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
357 </fo:block>
358 </xsl:template>
359
360 <xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
361 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
362 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
363 </fo:block>
364 </xsl:template>
365
366 <xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
367 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
368 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
369 </fo:block>
370 </xsl:template>
371
372 <xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
373 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
374 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
375 </fo:block>
376 </xsl:template>
377
378 <xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
379 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
380 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
381 </fo:block>
382 </xsl:template>
383
384 <xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
385 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
386 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
387 </fo:block>
388 </xsl:template>
389
390 <xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
391 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
392 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
393 </fo:block>
394 </xsl:template>
395
396 <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
397 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
398 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
399 </fo:block>
400 </xsl:template>
401
402 <xsl:template name="book.titlepage.recto">
403   <xsl:choose>
404     <xsl:when test="bookinfo/title">
405       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
406     </xsl:when>
407     <xsl:when test="info/title">
408       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
409     </xsl:when>
410     <xsl:when test="title">
411       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
412     </xsl:when>
413   </xsl:choose>
414
415   <xsl:choose>
416     <xsl:when test="bookinfo/subtitle">
417       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
418     </xsl:when>
419     <xsl:when test="info/subtitle">
420       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
421     </xsl:when>
422     <xsl:when test="subtitle">
423       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
424     </xsl:when>
425   </xsl:choose>
426
427   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/mediaobject"/>
428   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/mediaobject"/>
429   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
430   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
431   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
432   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
433   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
434   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
435 </xsl:template>
436
437 <xsl:template name="book.titlepage.verso">
438   <xsl:choose>
439     <xsl:when test="bookinfo/title">
440       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
441     </xsl:when>
442     <xsl:when test="info/title">
443       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
444     </xsl:when>
445     <xsl:when test="title">
446       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
447     </xsl:when>
448   </xsl:choose>
449
450   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
451   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
452   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
453   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
454   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
455   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
456   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
457   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
458   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
459   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
460   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
461   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
462   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
463   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
464   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
465   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
466   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
467   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
468 </xsl:template>
469
470 <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
471 </xsl:template>
472
473 <xsl:template name="book.titlepage.before.recto">
474 </xsl:template>
475
476 <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
477 </xsl:template>
478
479 <xsl:template name="book.titlepage">
480   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
481     <xsl:variable name="recto.content">
482       <xsl:call-template name="book.titlepage.before.recto"/>
483       <xsl:call-template name="book.titlepage.recto"/>
484     </xsl:variable>
485     <xsl:variable name="recto.elements.count">
486       <xsl:choose>
487         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
488         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
489           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
490         <xsl:otherwise>1</xsl:otherwise>
491       </xsl:choose>
492     </xsl:variable>
493     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
494       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
495     </xsl:if>
496     <xsl:variable name="verso.content">
497       <xsl:call-template name="book.titlepage.before.verso"/>
498       <xsl:call-template name="book.titlepage.verso"/>
499     </xsl:variable>
500     <xsl:variable name="verso.elements.count">
501       <xsl:choose>
502         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
503         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
504           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
505         <xsl:otherwise>1</xsl:otherwise>
506       </xsl:choose>
507     </xsl:variable>
508     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
509       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
510     </xsl:if>
511     <xsl:call-template name="book.titlepage.separator"/>
512   </fo:block>
513 </xsl:template>
514
515 <xsl:template match="*" mode="book.titlepage.recto.mode">
516   <!-- if an element isn't found in this mode, -->
517   <!-- try the generic titlepage.mode -->
518   <xsl:apply-templates select="." mode="titlepage.mode"/>
519 </xsl:template>
520
521 <xsl:template match="*" mode="book.titlepage.verso.mode">
522   <!-- if an element isn't found in this mode, -->
523   <!-- try the generic titlepage.mode -->
524   <xsl:apply-templates select="." mode="titlepage.mode"/>
525 </xsl:template>
526
527 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
528 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" 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}">
529 <xsl:call-template name="division.title">
530 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
531 </xsl:call-template>
532 </fo:block>
533 </xsl:template>
534
535 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
536 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}">
537 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
538 </fo:block>
539 </xsl:template>
540
541 <xsl:template match="mediaobject" mode="book.titlepage.recto.auto.mode">
542 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in" text-align="center">
543 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
544 </fo:block>
545 </xsl:template>
546
547 <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
548 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next.within-column="always" space-before="2in">
549 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
550 </fo:block>
551 </xsl:template>
552
553 <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
554 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="1.5in">
555 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
556 </fo:block>
557 </xsl:template>
558
559 <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
560 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" keep-with-next.within-column="always">
561 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
562 </fo:block>
563 </xsl:template>
564
565 <xsl:template match="title" mode="book.titlepage.verso.auto.mode">
566 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
567 <xsl:call-template name="book.verso.title">
568 </xsl:call-template>
569 </fo:block>
570 </xsl:template>
571
572 <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
573 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
574 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
575 </fo:block>
576 </xsl:template>
577
578 <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
579 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
580 <xsl:call-template name="verso.authorgroup">
581 </xsl:call-template>
582 </fo:block>
583 </xsl:template>
584
585 <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
586 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
587 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
588 </fo:block>
589 </xsl:template>
590
591 <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
592 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
593 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
594 </fo:block>
595 </xsl:template>
596
597 <xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
598 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
599 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
600 </fo:block>
601 </xsl:template>
602
603 <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
604 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
605 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
606 </fo:block>
607 </xsl:template>
608
609 <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
610 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
611 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
612 </fo:block>
613 </xsl:template>
614
615 <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
616 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
617 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
618 </fo:block>
619 </xsl:template>
620
621 <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
622 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
623 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
624 </fo:block>
625 </xsl:template>
626
627 <xsl:template name="part.titlepage.recto">
628   <xsl:choose>
629     <xsl:when test="partinfo/title">
630       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
631     </xsl:when>
632     <xsl:when test="docinfo/title">
633       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
634     </xsl:when>
635     <xsl:when test="info/title">
636       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
637     </xsl:when>
638     <xsl:when test="title">
639       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
640     </xsl:when>
641   </xsl:choose>
642
643   <xsl:choose>
644     <xsl:when test="partinfo/subtitle">
645       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
646     </xsl:when>
647     <xsl:when test="docinfo/subtitle">
648       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
649     </xsl:when>
650     <xsl:when test="info/subtitle">
651       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
652     </xsl:when>
653     <xsl:when test="subtitle">
654       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
655     </xsl:when>
656   </xsl:choose>
657
658 </xsl:template>
659
660 <xsl:template name="part.titlepage.verso">
661 </xsl:template>
662
663 <xsl:template name="part.titlepage.separator">
664 </xsl:template>
665
666 <xsl:template name="part.titlepage.before.recto">
667 </xsl:template>
668
669 <xsl:template name="part.titlepage.before.verso">
670 </xsl:template>
671
672 <xsl:template name="part.titlepage">
673   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
674     <xsl:variable name="recto.content">
675       <xsl:call-template name="part.titlepage.before.recto"/>
676       <xsl:call-template name="part.titlepage.recto"/>
677     </xsl:variable>
678     <xsl:variable name="recto.elements.count">
679       <xsl:choose>
680         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
681         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
682           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
683         <xsl:otherwise>1</xsl:otherwise>
684       </xsl:choose>
685     </xsl:variable>
686     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
687       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
688     </xsl:if>
689     <xsl:variable name="verso.content">
690       <xsl:call-template name="part.titlepage.before.verso"/>
691       <xsl:call-template name="part.titlepage.verso"/>
692     </xsl:variable>
693     <xsl:variable name="verso.elements.count">
694       <xsl:choose>
695         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
696         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
697           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
698         <xsl:otherwise>1</xsl:otherwise>
699       </xsl:choose>
700     </xsl:variable>
701     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
702       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
703     </xsl:if>
704     <xsl:call-template name="part.titlepage.separator"/>
705   </fo:block>
706 </xsl:template>
707
708 <xsl:template match="*" mode="part.titlepage.recto.mode">
709   <!-- if an element isn't found in this mode, -->
710   <!-- try the generic titlepage.mode -->
711   <xsl:apply-templates select="." mode="titlepage.mode"/>
712 </xsl:template>
713
714 <xsl:template match="*" mode="part.titlepage.verso.mode">
715   <!-- if an element isn't found in this mode, -->
716   <!-- try the generic titlepage.mode -->
717   <xsl:apply-templates select="." mode="titlepage.mode"/>
718 </xsl:template>
719
720 <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
721 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
722 <xsl:call-template name="division.title">
723 <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
724 </xsl:call-template>
725 </fo:block>
726 </xsl:template>
727
728 <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
729 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
730 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
731 </fo:block>
732 </xsl:template>
733
734 <xsl:template name="partintro.titlepage.recto">
735   <xsl:choose>
736     <xsl:when test="partintroinfo/title">
737       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
738     </xsl:when>
739     <xsl:when test="docinfo/title">
740       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
741     </xsl:when>
742     <xsl:when test="info/title">
743       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
744     </xsl:when>
745     <xsl:when test="title">
746       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
747     </xsl:when>
748   </xsl:choose>
749
750   <xsl:choose>
751     <xsl:when test="partintroinfo/subtitle">
752       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
753     </xsl:when>
754     <xsl:when test="docinfo/subtitle">
755       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
756     </xsl:when>
757     <xsl:when test="info/subtitle">
758       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
759     </xsl:when>
760     <xsl:when test="subtitle">
761       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
762     </xsl:when>
763   </xsl:choose>
764
765   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
766   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
767   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
768   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
769   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
770   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
771   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
772   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
773   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
774   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
775   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
776   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
777   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
778   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
779   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
780   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
781   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
782   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
783   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
784   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
785   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
786   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
787   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
788   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
789   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
790   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
791   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
792   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
793   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
794   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
795   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
796   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
797   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
798 </xsl:template>
799
800 <xsl:template name="partintro.titlepage.verso">
801 </xsl:template>
802
803 <xsl:template name="partintro.titlepage.separator">
804 </xsl:template>
805
806 <xsl:template name="partintro.titlepage.before.recto">
807 </xsl:template>
808
809 <xsl:template name="partintro.titlepage.before.verso">
810 </xsl:template>
811
812 <xsl:template name="partintro.titlepage">
813   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
814     <xsl:variable name="recto.content">
815       <xsl:call-template name="partintro.titlepage.before.recto"/>
816       <xsl:call-template name="partintro.titlepage.recto"/>
817     </xsl:variable>
818     <xsl:variable name="recto.elements.count">
819       <xsl:choose>
820         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
821         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
822           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
823         <xsl:otherwise>1</xsl:otherwise>
824       </xsl:choose>
825     </xsl:variable>
826     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
827       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
828     </xsl:if>
829     <xsl:variable name="verso.content">
830       <xsl:call-template name="partintro.titlepage.before.verso"/>
831       <xsl:call-template name="partintro.titlepage.verso"/>
832     </xsl:variable>
833     <xsl:variable name="verso.elements.count">
834       <xsl:choose>
835         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
836         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
837           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
838         <xsl:otherwise>1</xsl:otherwise>
839       </xsl:choose>
840     </xsl:variable>
841     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
842       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
843     </xsl:if>
844     <xsl:call-template name="partintro.titlepage.separator"/>
845   </fo:block>
846 </xsl:template>
847
848 <xsl:template match="*" mode="partintro.titlepage.recto.mode">
849   <!-- if an element isn't found in this mode, -->
850   <!-- try the generic titlepage.mode -->
851   <xsl:apply-templates select="." mode="titlepage.mode"/>
852 </xsl:template>
853
854 <xsl:template match="*" mode="partintro.titlepage.verso.mode">
855   <!-- if an element isn't found in this mode, -->
856   <!-- try the generic titlepage.mode -->
857   <xsl:apply-templates select="." mode="titlepage.mode"/>
858 </xsl:template>
859
860 <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
861 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}">
862 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
863 </fo:block>
864 </xsl:template>
865
866 <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
867 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
868 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
869 </fo:block>
870 </xsl:template>
871
872 <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
873 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
874 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
875 </fo:block>
876 </xsl:template>
877
878 <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
879 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
880 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
881 </fo:block>
882 </xsl:template>
883
884 <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
885 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
886 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
887 </fo:block>
888 </xsl:template>
889
890 <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
891 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
892 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
893 </fo:block>
894 </xsl:template>
895
896 <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
897 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
898 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
899 </fo:block>
900 </xsl:template>
901
902 <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
903 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
904 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
905 </fo:block>
906 </xsl:template>
907
908 <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
909 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
910 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
911 </fo:block>
912 </xsl:template>
913
914 <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
915 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
916 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
917 </fo:block>
918 </xsl:template>
919
920 <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
921 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
922 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
923 </fo:block>
924 </xsl:template>
925
926 <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
927 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
928 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
929 </fo:block>
930 </xsl:template>
931
932 <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
933 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
934 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
935 </fo:block>
936 </xsl:template>
937
938 <xsl:template name="reference.titlepage.recto">
939   <xsl:choose>
940     <xsl:when test="referenceinfo/title">
941       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
942     </xsl:when>
943     <xsl:when test="docinfo/title">
944       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
945     </xsl:when>
946     <xsl:when test="info/title">
947       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
948     </xsl:when>
949     <xsl:when test="title">
950       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
951     </xsl:when>
952   </xsl:choose>
953
954   <xsl:choose>
955     <xsl:when test="referenceinfo/subtitle">
956       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
957     </xsl:when>
958     <xsl:when test="docinfo/subtitle">
959       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
960     </xsl:when>
961     <xsl:when test="info/subtitle">
962       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
963     </xsl:when>
964     <xsl:when test="subtitle">
965       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
966     </xsl:when>
967   </xsl:choose>
968
969   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
970   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
971   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
972   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
973   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
974   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
975   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
976   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
977   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
978   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
979   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
980   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
981   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
982   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
983   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
984   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
985   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
986   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
987   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
988   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
989   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
990   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
991   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
992   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
993   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
994   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
995   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
996   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
997   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
998   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
999   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
1000   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1001   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
1002 </xsl:template>
1003
1004 <xsl:template name="reference.titlepage.verso">
1005 </xsl:template>
1006
1007 <xsl:template name="reference.titlepage.separator">
1008 </xsl:template>
1009
1010 <xsl:template name="reference.titlepage.before.recto">
1011 </xsl:template>
1012
1013 <xsl:template name="reference.titlepage.before.verso">
1014 </xsl:template>
1015
1016 <xsl:template name="reference.titlepage">
1017   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1018     <xsl:variable name="recto.content">
1019       <xsl:call-template name="reference.titlepage.before.recto"/>
1020       <xsl:call-template name="reference.titlepage.recto"/>
1021     </xsl:variable>
1022     <xsl:variable name="recto.elements.count">
1023       <xsl:choose>
1024         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1025         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1026           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1027         <xsl:otherwise>1</xsl:otherwise>
1028       </xsl:choose>
1029     </xsl:variable>
1030     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1031       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1032     </xsl:if>
1033     <xsl:variable name="verso.content">
1034       <xsl:call-template name="reference.titlepage.before.verso"/>
1035       <xsl:call-template name="reference.titlepage.verso"/>
1036     </xsl:variable>
1037     <xsl:variable name="verso.elements.count">
1038       <xsl:choose>
1039         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1040         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1041           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1042         <xsl:otherwise>1</xsl:otherwise>
1043       </xsl:choose>
1044     </xsl:variable>
1045     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1046       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1047     </xsl:if>
1048     <xsl:call-template name="reference.titlepage.separator"/>
1049   </fo:block>
1050 </xsl:template>
1051
1052 <xsl:template match="*" mode="reference.titlepage.recto.mode">
1053   <!-- if an element isn't found in this mode, -->
1054   <!-- try the generic titlepage.mode -->
1055   <xsl:apply-templates select="." mode="titlepage.mode"/>
1056 </xsl:template>
1057
1058 <xsl:template match="*" mode="reference.titlepage.verso.mode">
1059   <!-- if an element isn't found in this mode, -->
1060   <!-- try the generic titlepage.mode -->
1061   <xsl:apply-templates select="." mode="titlepage.mode"/>
1062 </xsl:template>
1063
1064 <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
1065 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
1066 <xsl:call-template name="division.title">
1067 <xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
1068 </xsl:call-template>
1069 </fo:block>
1070 </xsl:template>
1071
1072 <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
1073 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
1074 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1075 </fo:block>
1076 </xsl:template>
1077
1078 <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
1079 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1080 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1081 </fo:block>
1082 </xsl:template>
1083
1084 <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
1085 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1086 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1087 </fo:block>
1088 </xsl:template>
1089
1090 <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
1091 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1092 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1093 </fo:block>
1094 </xsl:template>
1095
1096 <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
1097 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1098 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1099 </fo:block>
1100 </xsl:template>
1101
1102 <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
1103 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1104 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1105 </fo:block>
1106 </xsl:template>
1107
1108 <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
1109 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1110 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1111 </fo:block>
1112 </xsl:template>
1113
1114 <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
1115 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1116 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1117 </fo:block>
1118 </xsl:template>
1119
1120 <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
1121 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1122 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1123 </fo:block>
1124 </xsl:template>
1125
1126 <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
1127 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1128 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1129 </fo:block>
1130 </xsl:template>
1131
1132 <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
1133 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1134 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1135 </fo:block>
1136 </xsl:template>
1137
1138 <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
1139 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1140 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1141 </fo:block>
1142 </xsl:template>
1143
1144 <xsl:template name="refsynopsisdiv.titlepage.recto">
1145   <xsl:choose>
1146     <xsl:when test="refsynopsisdivinfo/title">
1147       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
1148     </xsl:when>
1149     <xsl:when test="docinfo/title">
1150       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
1151     </xsl:when>
1152     <xsl:when test="info/title">
1153       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
1154     </xsl:when>
1155     <xsl:when test="title">
1156       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
1157     </xsl:when>
1158   </xsl:choose>
1159
1160 </xsl:template>
1161
1162 <xsl:template name="refsynopsisdiv.titlepage.verso">
1163 </xsl:template>
1164
1165 <xsl:template name="refsynopsisdiv.titlepage.separator">
1166 </xsl:template>
1167
1168 <xsl:template name="refsynopsisdiv.titlepage.before.recto">
1169 </xsl:template>
1170
1171 <xsl:template name="refsynopsisdiv.titlepage.before.verso">
1172 </xsl:template>
1173
1174 <xsl:template name="refsynopsisdiv.titlepage">
1175   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1176     <xsl:variable name="recto.content">
1177       <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
1178       <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
1179     </xsl:variable>
1180     <xsl:variable name="recto.elements.count">
1181       <xsl:choose>
1182         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1183         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1184           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1185         <xsl:otherwise>1</xsl:otherwise>
1186       </xsl:choose>
1187     </xsl:variable>
1188     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1189       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1190     </xsl:if>
1191     <xsl:variable name="verso.content">
1192       <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
1193       <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
1194     </xsl:variable>
1195     <xsl:variable name="verso.elements.count">
1196       <xsl:choose>
1197         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1198         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1199           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1200         <xsl:otherwise>1</xsl:otherwise>
1201       </xsl:choose>
1202     </xsl:variable>
1203     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1204       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1205     </xsl:if>
1206     <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
1207   </fo:block>
1208 </xsl:template>
1209
1210 <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
1211   <!-- if an element isn't found in this mode, -->
1212   <!-- try the generic titlepage.mode -->
1213   <xsl:apply-templates select="." mode="titlepage.mode"/>
1214 </xsl:template>
1215
1216 <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
1217   <!-- if an element isn't found in this mode, -->
1218   <!-- try the generic titlepage.mode -->
1219   <xsl:apply-templates select="." mode="titlepage.mode"/>
1220 </xsl:template>
1221
1222 <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
1223 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
1224 <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
1225 </fo:block>
1226 </xsl:template>
1227
1228 <xsl:template name="refsection.titlepage.recto">
1229   <xsl:choose>
1230     <xsl:when test="refsectioninfo/title">
1231       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
1232     </xsl:when>
1233     <xsl:when test="docinfo/title">
1234       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
1235     </xsl:when>
1236     <xsl:when test="info/title">
1237       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
1238     </xsl:when>
1239     <xsl:when test="title">
1240       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
1241     </xsl:when>
1242   </xsl:choose>
1243
1244 </xsl:template>
1245
1246 <xsl:template name="refsection.titlepage.verso">
1247 </xsl:template>
1248
1249 <xsl:template name="refsection.titlepage.separator">
1250 </xsl:template>
1251
1252 <xsl:template name="refsection.titlepage.before.recto">
1253 </xsl:template>
1254
1255 <xsl:template name="refsection.titlepage.before.verso">
1256 </xsl:template>
1257
1258 <xsl:template name="refsection.titlepage">
1259   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1260     <xsl:variable name="recto.content">
1261       <xsl:call-template name="refsection.titlepage.before.recto"/>
1262       <xsl:call-template name="refsection.titlepage.recto"/>
1263     </xsl:variable>
1264     <xsl:variable name="recto.elements.count">
1265       <xsl:choose>
1266         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1267         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1268           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1269         <xsl:otherwise>1</xsl:otherwise>
1270       </xsl:choose>
1271     </xsl:variable>
1272     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1273       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1274     </xsl:if>
1275     <xsl:variable name="verso.content">
1276       <xsl:call-template name="refsection.titlepage.before.verso"/>
1277       <xsl:call-template name="refsection.titlepage.verso"/>
1278     </xsl:variable>
1279     <xsl:variable name="verso.elements.count">
1280       <xsl:choose>
1281         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1282         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1283           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1284         <xsl:otherwise>1</xsl:otherwise>
1285       </xsl:choose>
1286     </xsl:variable>
1287     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1288       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1289     </xsl:if>
1290     <xsl:call-template name="refsection.titlepage.separator"/>
1291   </fo:block>
1292 </xsl:template>
1293
1294 <xsl:template match="*" mode="refsection.titlepage.recto.mode">
1295   <!-- if an element isn't found in this mode, -->
1296   <!-- try the generic titlepage.mode -->
1297   <xsl:apply-templates select="." mode="titlepage.mode"/>
1298 </xsl:template>
1299
1300 <xsl:template match="*" mode="refsection.titlepage.verso.mode">
1301   <!-- if an element isn't found in this mode, -->
1302   <!-- try the generic titlepage.mode -->
1303   <xsl:apply-templates select="." mode="titlepage.mode"/>
1304 </xsl:template>
1305
1306 <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
1307 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
1308 <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
1309 </fo:block>
1310 </xsl:template>
1311
1312 <xsl:template name="refsect1.titlepage.recto">
1313   <xsl:choose>
1314     <xsl:when test="refsect1info/title">
1315       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
1316     </xsl:when>
1317     <xsl:when test="docinfo/title">
1318       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
1319     </xsl:when>
1320     <xsl:when test="info/title">
1321       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
1322     </xsl:when>
1323     <xsl:when test="title">
1324       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
1325     </xsl:when>
1326   </xsl:choose>
1327
1328 </xsl:template>
1329
1330 <xsl:template name="refsect1.titlepage.verso">
1331 </xsl:template>
1332
1333 <xsl:template name="refsect1.titlepage.separator">
1334 </xsl:template>
1335
1336 <xsl:template name="refsect1.titlepage.before.recto">
1337 </xsl:template>
1338
1339 <xsl:template name="refsect1.titlepage.before.verso">
1340 </xsl:template>
1341
1342 <xsl:template name="refsect1.titlepage">
1343   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1344     <xsl:variable name="recto.content">
1345       <xsl:call-template name="refsect1.titlepage.before.recto"/>
1346       <xsl:call-template name="refsect1.titlepage.recto"/>
1347     </xsl:variable>
1348     <xsl:variable name="recto.elements.count">
1349       <xsl:choose>
1350         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1351         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1352           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1353         <xsl:otherwise>1</xsl:otherwise>
1354       </xsl:choose>
1355     </xsl:variable>
1356     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1357       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1358     </xsl:if>
1359     <xsl:variable name="verso.content">
1360       <xsl:call-template name="refsect1.titlepage.before.verso"/>
1361       <xsl:call-template name="refsect1.titlepage.verso"/>
1362     </xsl:variable>
1363     <xsl:variable name="verso.elements.count">
1364       <xsl:choose>
1365         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1366         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1367           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1368         <xsl:otherwise>1</xsl:otherwise>
1369       </xsl:choose>
1370     </xsl:variable>
1371     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1372       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1373     </xsl:if>
1374     <xsl:call-template name="refsect1.titlepage.separator"/>
1375   </fo:block>
1376 </xsl:template>
1377
1378 <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
1379   <!-- if an element isn't found in this mode, -->
1380   <!-- try the generic titlepage.mode -->
1381   <xsl:apply-templates select="." mode="titlepage.mode"/>
1382 </xsl:template>
1383
1384 <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
1385   <!-- if an element isn't found in this mode, -->
1386   <!-- try the generic titlepage.mode -->
1387   <xsl:apply-templates select="." mode="titlepage.mode"/>
1388 </xsl:template>
1389
1390 <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
1391 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
1392 <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
1393 </fo:block>
1394 </xsl:template>
1395
1396 <xsl:template name="refsect2.titlepage.recto">
1397   <xsl:choose>
1398     <xsl:when test="refsect2info/title">
1399       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
1400     </xsl:when>
1401     <xsl:when test="docinfo/title">
1402       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
1403     </xsl:when>
1404     <xsl:when test="info/title">
1405       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
1406     </xsl:when>
1407     <xsl:when test="title">
1408       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
1409     </xsl:when>
1410   </xsl:choose>
1411
1412 </xsl:template>
1413
1414 <xsl:template name="refsect2.titlepage.verso">
1415 </xsl:template>
1416
1417 <xsl:template name="refsect2.titlepage.separator">
1418 </xsl:template>
1419
1420 <xsl:template name="refsect2.titlepage.before.recto">
1421 </xsl:template>
1422
1423 <xsl:template name="refsect2.titlepage.before.verso">
1424 </xsl:template>
1425
1426 <xsl:template name="refsect2.titlepage">
1427   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1428     <xsl:variable name="recto.content">
1429       <xsl:call-template name="refsect2.titlepage.before.recto"/>
1430       <xsl:call-template name="refsect2.titlepage.recto"/>
1431     </xsl:variable>
1432     <xsl:variable name="recto.elements.count">
1433       <xsl:choose>
1434         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1435         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1436           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1437         <xsl:otherwise>1</xsl:otherwise>
1438       </xsl:choose>
1439     </xsl:variable>
1440     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1441       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1442     </xsl:if>
1443     <xsl:variable name="verso.content">
1444       <xsl:call-template name="refsect2.titlepage.before.verso"/>
1445       <xsl:call-template name="refsect2.titlepage.verso"/>
1446     </xsl:variable>
1447     <xsl:variable name="verso.elements.count">
1448       <xsl:choose>
1449         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1450         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1451           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1452         <xsl:otherwise>1</xsl:otherwise>
1453       </xsl:choose>
1454     </xsl:variable>
1455     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1456       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1457     </xsl:if>
1458     <xsl:call-template name="refsect2.titlepage.separator"/>
1459   </fo:block>
1460 </xsl:template>
1461
1462 <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
1463   <!-- if an element isn't found in this mode, -->
1464   <!-- try the generic titlepage.mode -->
1465   <xsl:apply-templates select="." mode="titlepage.mode"/>
1466 </xsl:template>
1467
1468 <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
1469   <!-- if an element isn't found in this mode, -->
1470   <!-- try the generic titlepage.mode -->
1471   <xsl:apply-templates select="." mode="titlepage.mode"/>
1472 </xsl:template>
1473
1474 <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
1475 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
1476 <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
1477 </fo:block>
1478 </xsl:template>
1479
1480 <xsl:template name="refsect3.titlepage.recto">
1481   <xsl:choose>
1482     <xsl:when test="refsect3info/title">
1483       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
1484     </xsl:when>
1485     <xsl:when test="docinfo/title">
1486       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
1487     </xsl:when>
1488     <xsl:when test="info/title">
1489       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
1490     </xsl:when>
1491     <xsl:when test="title">
1492       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
1493     </xsl:when>
1494   </xsl:choose>
1495
1496 </xsl:template>
1497
1498 <xsl:template name="refsect3.titlepage.verso">
1499 </xsl:template>
1500
1501 <xsl:template name="refsect3.titlepage.separator">
1502 </xsl:template>
1503
1504 <xsl:template name="refsect3.titlepage.before.recto">
1505 </xsl:template>
1506
1507 <xsl:template name="refsect3.titlepage.before.verso">
1508 </xsl:template>
1509
1510 <xsl:template name="refsect3.titlepage">
1511   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1512     <xsl:variable name="recto.content">
1513       <xsl:call-template name="refsect3.titlepage.before.recto"/>
1514       <xsl:call-template name="refsect3.titlepage.recto"/>
1515     </xsl:variable>
1516     <xsl:variable name="recto.elements.count">
1517       <xsl:choose>
1518         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1519         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1520           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1521         <xsl:otherwise>1</xsl:otherwise>
1522       </xsl:choose>
1523     </xsl:variable>
1524     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1525       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1526     </xsl:if>
1527     <xsl:variable name="verso.content">
1528       <xsl:call-template name="refsect3.titlepage.before.verso"/>
1529       <xsl:call-template name="refsect3.titlepage.verso"/>
1530     </xsl:variable>
1531     <xsl:variable name="verso.elements.count">
1532       <xsl:choose>
1533         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1534         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1535           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1536         <xsl:otherwise>1</xsl:otherwise>
1537       </xsl:choose>
1538     </xsl:variable>
1539     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1540       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1541     </xsl:if>
1542     <xsl:call-template name="refsect3.titlepage.separator"/>
1543   </fo:block>
1544 </xsl:template>
1545
1546 <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
1547   <!-- if an element isn't found in this mode, -->
1548   <!-- try the generic titlepage.mode -->
1549   <xsl:apply-templates select="." mode="titlepage.mode"/>
1550 </xsl:template>
1551
1552 <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
1553   <!-- if an element isn't found in this mode, -->
1554   <!-- try the generic titlepage.mode -->
1555   <xsl:apply-templates select="." mode="titlepage.mode"/>
1556 </xsl:template>
1557
1558 <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
1559 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
1560 <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
1561 </fo:block>
1562 </xsl:template>
1563
1564 <xsl:template name="dedication.titlepage.recto">
1565   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1566 <xsl:call-template name="component.title">
1567 <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
1568 </xsl:call-template></fo:block>
1569   <xsl:choose>
1570     <xsl:when test="dedicationinfo/subtitle">
1571       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
1572     </xsl:when>
1573     <xsl:when test="docinfo/subtitle">
1574       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1575     </xsl:when>
1576     <xsl:when test="info/subtitle">
1577       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
1578     </xsl:when>
1579     <xsl:when test="subtitle">
1580       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
1581     </xsl:when>
1582   </xsl:choose>
1583
1584 </xsl:template>
1585
1586 <xsl:template name="dedication.titlepage.verso">
1587 </xsl:template>
1588
1589 <xsl:template name="dedication.titlepage.separator">
1590 </xsl:template>
1591
1592 <xsl:template name="dedication.titlepage.before.recto">
1593 </xsl:template>
1594
1595 <xsl:template name="dedication.titlepage.before.verso">
1596 </xsl:template>
1597
1598 <xsl:template name="dedication.titlepage">
1599   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1600     <xsl:variable name="recto.content">
1601       <xsl:call-template name="dedication.titlepage.before.recto"/>
1602       <xsl:call-template name="dedication.titlepage.recto"/>
1603     </xsl:variable>
1604     <xsl:variable name="recto.elements.count">
1605       <xsl:choose>
1606         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1607         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1608           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1609         <xsl:otherwise>1</xsl:otherwise>
1610       </xsl:choose>
1611     </xsl:variable>
1612     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1613       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1614     </xsl:if>
1615     <xsl:variable name="verso.content">
1616       <xsl:call-template name="dedication.titlepage.before.verso"/>
1617       <xsl:call-template name="dedication.titlepage.verso"/>
1618     </xsl:variable>
1619     <xsl:variable name="verso.elements.count">
1620       <xsl:choose>
1621         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1622         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1623           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1624         <xsl:otherwise>1</xsl:otherwise>
1625       </xsl:choose>
1626     </xsl:variable>
1627     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1628       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1629     </xsl:if>
1630     <xsl:call-template name="dedication.titlepage.separator"/>
1631   </fo:block>
1632 </xsl:template>
1633
1634 <xsl:template match="*" mode="dedication.titlepage.recto.mode">
1635   <!-- if an element isn't found in this mode, -->
1636   <!-- try the generic titlepage.mode -->
1637   <xsl:apply-templates select="." mode="titlepage.mode"/>
1638 </xsl:template>
1639
1640 <xsl:template match="*" mode="dedication.titlepage.verso.mode">
1641   <!-- if an element isn't found in this mode, -->
1642   <!-- try the generic titlepage.mode -->
1643   <xsl:apply-templates select="." mode="titlepage.mode"/>
1644 </xsl:template>
1645
1646 <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
1647 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
1648 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1649 </fo:block>
1650 </xsl:template>
1651
1652 <xsl:template name="acknowledgements.titlepage.recto">
1653   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1654 <xsl:call-template name="component.title">
1655 <xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
1656 </xsl:call-template></fo:block>
1657   <xsl:choose>
1658     <xsl:when test="acknowledgementsinfo/subtitle">
1659       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
1660     </xsl:when>
1661     <xsl:when test="docinfo/subtitle">
1662       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1663     </xsl:when>
1664     <xsl:when test="info/subtitle">
1665       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
1666     </xsl:when>
1667     <xsl:when test="subtitle">
1668       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
1669     </xsl:when>
1670   </xsl:choose>
1671
1672 </xsl:template>
1673
1674 <xsl:template name="acknowledgements.titlepage.verso">
1675 </xsl:template>
1676
1677 <xsl:template name="acknowledgements.titlepage.separator">
1678 </xsl:template>
1679
1680 <xsl:template name="acknowledgements.titlepage.before.recto">
1681 </xsl:template>
1682
1683 <xsl:template name="acknowledgements.titlepage.before.verso">
1684 </xsl:template>
1685
1686 <xsl:template name="acknowledgements.titlepage">
1687   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1688     <xsl:variable name="recto.content">
1689       <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
1690       <xsl:call-template name="acknowledgements.titlepage.recto"/>
1691     </xsl:variable>
1692     <xsl:variable name="recto.elements.count">
1693       <xsl:choose>
1694         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1695         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1696           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1697         <xsl:otherwise>1</xsl:otherwise>
1698       </xsl:choose>
1699     </xsl:variable>
1700     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1701       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1702     </xsl:if>
1703     <xsl:variable name="verso.content">
1704       <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
1705       <xsl:call-template name="acknowledgements.titlepage.verso"/>
1706     </xsl:variable>
1707     <xsl:variable name="verso.elements.count">
1708       <xsl:choose>
1709         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1710         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1711           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1712         <xsl:otherwise>1</xsl:otherwise>
1713       </xsl:choose>
1714     </xsl:variable>
1715     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1716       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1717     </xsl:if>
1718     <xsl:call-template name="acknowledgements.titlepage.separator"/>
1719   </fo:block>
1720 </xsl:template>
1721
1722 <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
1723   <!-- if an element isn't found in this mode, -->
1724   <!-- try the generic titlepage.mode -->
1725   <xsl:apply-templates select="." mode="titlepage.mode"/>
1726 </xsl:template>
1727
1728 <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
1729   <!-- if an element isn't found in this mode, -->
1730   <!-- try the generic titlepage.mode -->
1731   <xsl:apply-templates select="." mode="titlepage.mode"/>
1732 </xsl:template>
1733
1734 <xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
1735 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" font-family="{$title.fontset}">
1736 <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1737 </fo:block>
1738 </xsl:template>
1739
1740 <xsl:template name="preface.titlepage.recto">
1741   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1742 <xsl:call-template name="component.title">
1743 <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
1744 </xsl:call-template></fo:block>
1745   <xsl:choose>
1746     <xsl:when test="prefaceinfo/subtitle">
1747       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
1748     </xsl:when>
1749     <xsl:when test="docinfo/subtitle">
1750       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1751     </xsl:when>
1752     <xsl:when test="info/subtitle">
1753       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
1754     </xsl:when>
1755     <xsl:when test="subtitle">
1756       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
1757     </xsl:when>
1758   </xsl:choose>
1759
1760   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
1761   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1762   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
1763   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
1764   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1765   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
1766   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
1767   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
1768   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
1769   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
1770   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1771   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
1772   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
1773   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1774   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1775   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
1776   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1777   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
1778   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
1779   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1780   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
1781   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
1782   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1783   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
1784   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
1785   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
1786   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
1787   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
1788   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1789   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
1790   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
1791   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1792   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
1793 </xsl:template>
1794
1795 <xsl:template name="preface.titlepage.verso">
1796 </xsl:template>
1797
1798 <xsl:template name="preface.titlepage.separator">
1799 </xsl:template>
1800
1801 <xsl:template name="preface.titlepage.before.recto">
1802 </xsl:template>
1803
1804 <xsl:template name="preface.titlepage.before.verso">
1805 </xsl:template>
1806
1807 <xsl:template name="preface.titlepage">
1808   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1809     <xsl:variable name="recto.content">
1810       <xsl:call-template name="preface.titlepage.before.recto"/>
1811       <xsl:call-template name="preface.titlepage.recto"/>
1812     </xsl:variable>
1813     <xsl:variable name="recto.elements.count">
1814       <xsl:choose>
1815         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1816         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1817           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1818         <xsl:otherwise>1</xsl:otherwise>
1819       </xsl:choose>
1820     </xsl:variable>
1821     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1822       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1823     </xsl:if>
1824     <xsl:variable name="verso.content">
1825       <xsl:call-template name="preface.titlepage.before.verso"/>
1826       <xsl:call-template name="preface.titlepage.verso"/>
1827     </xsl:variable>
1828     <xsl:variable name="verso.elements.count">
1829       <xsl:choose>
1830         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1831         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1832           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1833         <xsl:otherwise>1</xsl:otherwise>
1834       </xsl:choose>
1835     </xsl:variable>
1836     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1837       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1838     </xsl:if>
1839     <xsl:call-template name="preface.titlepage.separator"/>
1840   </fo:block>
1841 </xsl:template>
1842
1843 <xsl:template match="*" mode="preface.titlepage.recto.mode">
1844   <!-- if an element isn't found in this mode, -->
1845   <!-- try the generic titlepage.mode -->
1846   <xsl:apply-templates select="." mode="titlepage.mode"/>
1847 </xsl:template>
1848
1849 <xsl:template match="*" mode="preface.titlepage.verso.mode">
1850   <!-- if an element isn't found in this mode, -->
1851   <!-- try the generic titlepage.mode -->
1852   <xsl:apply-templates select="." mode="titlepage.mode"/>
1853 </xsl:template>
1854
1855 <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
1856 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
1857 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1858 </fo:block>
1859 </xsl:template>
1860
1861 <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
1862 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1863 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1864 </fo:block>
1865 </xsl:template>
1866
1867 <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
1868 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1869 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1870 </fo:block>
1871 </xsl:template>
1872
1873 <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
1874 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1875 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1876 </fo:block>
1877 </xsl:template>
1878
1879 <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
1880 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1881 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1882 </fo:block>
1883 </xsl:template>
1884
1885 <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
1886 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1887 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1888 </fo:block>
1889 </xsl:template>
1890
1891 <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
1892 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1893 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1894 </fo:block>
1895 </xsl:template>
1896
1897 <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
1898 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1899 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1900 </fo:block>
1901 </xsl:template>
1902
1903 <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
1904 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1905 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1906 </fo:block>
1907 </xsl:template>
1908
1909 <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
1910 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1911 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1912 </fo:block>
1913 </xsl:template>
1914
1915 <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
1916 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1917 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1918 </fo:block>
1919 </xsl:template>
1920
1921 <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
1922 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1923 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1924 </fo:block>
1925 </xsl:template>
1926
1927 <xsl:template name="chapter.titlepage.recto">
1928   <xsl:choose>
1929     <xsl:when test="chapterinfo/title">
1930       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
1931     </xsl:when>
1932     <xsl:when test="docinfo/title">
1933       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
1934     </xsl:when>
1935     <xsl:when test="info/title">
1936       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
1937     </xsl:when>
1938     <xsl:when test="title">
1939       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
1940     </xsl:when>
1941   </xsl:choose>
1942
1943   <xsl:choose>
1944     <xsl:when test="chapterinfo/subtitle">
1945       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
1946     </xsl:when>
1947     <xsl:when test="docinfo/subtitle">
1948       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1949     </xsl:when>
1950     <xsl:when test="info/subtitle">
1951       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
1952     </xsl:when>
1953     <xsl:when test="subtitle">
1954       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
1955     </xsl:when>
1956   </xsl:choose>
1957
1958   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
1959   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1960   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
1961   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
1962   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1963   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
1964   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
1965   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
1966   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
1967   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
1968   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1969   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
1970   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
1971   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1972   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1973   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
1974   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1975   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
1976   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
1977   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1978   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
1979   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
1980   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1981   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
1982   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
1983   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
1984   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
1985   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
1986   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1987   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
1988   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
1989   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1990   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
1991 </xsl:template>
1992
1993 <xsl:template name="chapter.titlepage.verso">
1994 </xsl:template>
1995
1996 <xsl:template name="chapter.titlepage.separator">
1997 </xsl:template>
1998
1999 <xsl:template name="chapter.titlepage.before.recto">
2000 </xsl:template>
2001
2002 <xsl:template name="chapter.titlepage.before.verso">
2003 </xsl:template>
2004
2005 <xsl:template name="chapter.titlepage">
2006   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
2007     <xsl:variable name="recto.content">
2008       <xsl:call-template name="chapter.titlepage.before.recto"/>
2009       <xsl:call-template name="chapter.titlepage.recto"/>
2010     </xsl:variable>
2011     <xsl:variable name="recto.elements.count">
2012       <xsl:choose>
2013         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2014         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2015           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2016         <xsl:otherwise>1</xsl:otherwise>
2017       </xsl:choose>
2018     </xsl:variable>
2019     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2020       <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
2021     </xsl:if>
2022     <xsl:variable name="verso.content">
2023       <xsl:call-template name="chapter.titlepage.before.verso"/>
2024       <xsl:call-template name="chapter.titlepage.verso"/>
2025     </xsl:variable>
2026     <xsl:variable name="verso.elements.count">
2027       <xsl:choose>
2028         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2029         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2030           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2031         <xsl:otherwise>1</xsl:otherwise>
2032       </xsl:choose>
2033     </xsl:variable>
2034     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2035       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2036     </xsl:if>
2037     <xsl:call-template name="chapter.titlepage.separator"/>
2038   </fo:block>
2039 </xsl:template>
2040
2041 <xsl:template match="*" mode="chapter.titlepage.recto.mode">
2042   <!-- if an element isn't found in this mode, -->
2043   <!-- try the generic titlepage.mode -->
2044   <xsl:apply-templates select="." mode="titlepage.mode"/>
2045 </xsl:template>
2046
2047 <xsl:template match="*" mode="chapter.titlepage.verso.mode">
2048   <!-- if an element isn't found in this mode, -->
2049   <!-- try the generic titlepage.mode -->
2050   <xsl:apply-templates select="." mode="titlepage.mode"/>
2051 </xsl:template>
2052
2053 <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
2054 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
2055 <xsl:call-template name="component.title">
2056 <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
2057 </xsl:call-template>
2058 </fo:block>
2059 </xsl:template>
2060
2061 <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
2062 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
2063 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2064 </fo:block>
2065 </xsl:template>
2066
2067 <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
2068 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2069 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2070 </fo:block>
2071 </xsl:template>
2072
2073 <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
2074 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2075 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2076 </fo:block>
2077 </xsl:template>
2078
2079 <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
2080 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
2081 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2082 </fo:block>
2083 </xsl:template>
2084
2085 <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
2086 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2087 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2088 </fo:block>
2089 </xsl:template>
2090
2091 <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
2092 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2093 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2094 </fo:block>
2095 </xsl:template>
2096
2097 <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
2098 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2099 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2100 </fo:block>
2101 </xsl:template>
2102
2103 <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
2104 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2105 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2106 </fo:block>
2107 </xsl:template>
2108
2109 <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
2110 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2111 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2112 </fo:block>
2113 </xsl:template>
2114
2115 <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
2116 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2117 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2118 </fo:block>
2119 </xsl:template>
2120
2121 <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
2122 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2123 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2124 </fo:block>
2125 </xsl:template>
2126
2127 <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
2128 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2129 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2130 </fo:block>
2131 </xsl:template>
2132
2133 <xsl:template name="appendix.titlepage.recto">
2134   <xsl:choose>
2135     <xsl:when test="appendixinfo/title">
2136       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
2137     </xsl:when>
2138     <xsl:when test="docinfo/title">
2139       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
2140     </xsl:when>
2141     <xsl:when test="info/title">
2142       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
2143     </xsl:when>
2144     <xsl:when test="title">
2145       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
2146     </xsl:when>
2147   </xsl:choose>
2148
2149   <xsl:choose>
2150     <xsl:when test="appendixinfo/subtitle">
2151       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
2152     </xsl:when>
2153     <xsl:when test="docinfo/subtitle">
2154       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2155     </xsl:when>
2156     <xsl:when test="info/subtitle">
2157       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
2158     </xsl:when>
2159     <xsl:when test="subtitle">
2160       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
2161     </xsl:when>
2162   </xsl:choose>
2163
2164   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
2165   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
2166   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
2167   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
2168   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
2169   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
2170   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
2171   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
2172   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
2173   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
2174   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
2175   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
2176   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
2177   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
2178   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2179   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
2180   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
2181   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
2182   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
2183   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
2184   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
2185   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
2186   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
2187   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
2188   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
2189   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
2190   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
2191   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
2192   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
2193   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
2194   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
2195   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
2196   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
2197 </xsl:template>
2198
2199 <xsl:template name="appendix.titlepage.verso">
2200 </xsl:template>
2201
2202 <xsl:template name="appendix.titlepage.separator">
2203 </xsl:template>
2204
2205 <xsl:template name="appendix.titlepage.before.recto">
2206 </xsl:template>
2207
2208 <xsl:template name="appendix.titlepage.before.verso">
2209 </xsl:template>
2210
2211 <xsl:template name="appendix.titlepage">
2212   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2213     <xsl:variable name="recto.content">
2214       <xsl:call-template name="appendix.titlepage.before.recto"/>
2215       <xsl:call-template name="appendix.titlepage.recto"/>
2216     </xsl:variable>
2217     <xsl:variable name="recto.elements.count">
2218       <xsl:choose>
2219         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2220         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2221           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2222         <xsl:otherwise>1</xsl:otherwise>
2223       </xsl:choose>
2224     </xsl:variable>
2225     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2226       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2227     </xsl:if>
2228     <xsl:variable name="verso.content">
2229       <xsl:call-template name="appendix.titlepage.before.verso"/>
2230       <xsl:call-template name="appendix.titlepage.verso"/>
2231     </xsl:variable>
2232     <xsl:variable name="verso.elements.count">
2233       <xsl:choose>
2234         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2235         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2236           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2237         <xsl:otherwise>1</xsl:otherwise>
2238       </xsl:choose>
2239     </xsl:variable>
2240     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2241       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2242     </xsl:if>
2243     <xsl:call-template name="appendix.titlepage.separator"/>
2244   </fo:block>
2245 </xsl:template>
2246
2247 <xsl:template match="*" mode="appendix.titlepage.recto.mode">
2248   <!-- if an element isn't found in this mode, -->
2249   <!-- try the generic titlepage.mode -->
2250   <xsl:apply-templates select="." mode="titlepage.mode"/>
2251 </xsl:template>
2252
2253 <xsl:template match="*" mode="appendix.titlepage.verso.mode">
2254   <!-- if an element isn't found in this mode, -->
2255   <!-- try the generic titlepage.mode -->
2256   <xsl:apply-templates select="." mode="titlepage.mode"/>
2257 </xsl:template>
2258
2259 <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
2260 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
2261 <xsl:call-template name="component.title">
2262 <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
2263 </xsl:call-template>
2264 </fo:block>
2265 </xsl:template>
2266
2267 <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
2268 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
2269 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2270 </fo:block>
2271 </xsl:template>
2272
2273 <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
2274 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2275 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2276 </fo:block>
2277 </xsl:template>
2278
2279 <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
2280 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2281 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2282 </fo:block>
2283 </xsl:template>
2284
2285 <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
2286 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2287 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2288 </fo:block>
2289 </xsl:template>
2290
2291 <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
2292 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2293 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2294 </fo:block>
2295 </xsl:template>
2296
2297 <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
2298 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2299 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2300 </fo:block>
2301 </xsl:template>
2302
2303 <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
2304 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2305 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2306 </fo:block>
2307 </xsl:template>
2308
2309 <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
2310 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2311 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2312 </fo:block>
2313 </xsl:template>
2314
2315 <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
2316 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2317 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2318 </fo:block>
2319 </xsl:template>
2320
2321 <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
2322 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2323 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2324 </fo:block>
2325 </xsl:template>
2326
2327 <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
2328 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2329 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2330 </fo:block>
2331 </xsl:template>
2332
2333 <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
2334 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2335 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2336 </fo:block>
2337 </xsl:template>
2338
2339 <xsl:template name="section.titlepage.recto">
2340   <xsl:choose>
2341     <xsl:when test="sectioninfo/title">
2342       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
2343     </xsl:when>
2344     <xsl:when test="info/title">
2345       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
2346     </xsl:when>
2347     <xsl:when test="title">
2348       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
2349     </xsl:when>
2350   </xsl:choose>
2351
2352   <xsl:choose>
2353     <xsl:when test="sectioninfo/subtitle">
2354       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
2355     </xsl:when>
2356     <xsl:when test="info/subtitle">
2357       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
2358     </xsl:when>
2359     <xsl:when test="subtitle">
2360       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
2361     </xsl:when>
2362   </xsl:choose>
2363
2364   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
2365   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
2366   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
2367   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
2368   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
2369   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
2370   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
2371   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
2372   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
2373   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2374   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
2375   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
2376   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
2377   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
2378   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
2379   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
2380   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
2381   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
2382   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
2383   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
2384   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
2385   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
2386 </xsl:template>
2387
2388 <xsl:template name="section.titlepage.verso">
2389 </xsl:template>
2390
2391 <xsl:template name="section.titlepage.separator">
2392 </xsl:template>
2393
2394 <xsl:template name="section.titlepage.before.recto">
2395 </xsl:template>
2396
2397 <xsl:template name="section.titlepage.before.verso">
2398 </xsl:template>
2399
2400 <xsl:template name="section.titlepage">
2401   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2402     <xsl:variable name="recto.content">
2403       <xsl:call-template name="section.titlepage.before.recto"/>
2404       <xsl:call-template name="section.titlepage.recto"/>
2405     </xsl:variable>
2406     <xsl:variable name="recto.elements.count">
2407       <xsl:choose>
2408         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2409         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2410           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2411         <xsl:otherwise>1</xsl:otherwise>
2412       </xsl:choose>
2413     </xsl:variable>
2414     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2415       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2416     </xsl:if>
2417     <xsl:variable name="verso.content">
2418       <xsl:call-template name="section.titlepage.before.verso"/>
2419       <xsl:call-template name="section.titlepage.verso"/>
2420     </xsl:variable>
2421     <xsl:variable name="verso.elements.count">
2422       <xsl:choose>
2423         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2424         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2425           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2426         <xsl:otherwise>1</xsl:otherwise>
2427       </xsl:choose>
2428     </xsl:variable>
2429     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2430       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2431     </xsl:if>
2432     <xsl:call-template name="section.titlepage.separator"/>
2433   </fo:block>
2434 </xsl:template>
2435
2436 <xsl:template match="*" mode="section.titlepage.recto.mode">
2437   <!-- if an element isn't found in this mode, -->
2438   <!-- try the generic titlepage.mode -->
2439   <xsl:apply-templates select="." mode="titlepage.mode"/>
2440 </xsl:template>
2441
2442 <xsl:template match="*" mode="section.titlepage.verso.mode">
2443   <!-- if an element isn't found in this mode, -->
2444   <!-- try the generic titlepage.mode -->
2445   <xsl:apply-templates select="." mode="titlepage.mode"/>
2446 </xsl:template>
2447
2448 <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
2449 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2450 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2451 </fo:block>
2452 </xsl:template>
2453
2454 <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
2455 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
2456 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2457 </fo:block>
2458 </xsl:template>
2459
2460 <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
2461 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2462 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2463 </fo:block>
2464 </xsl:template>
2465
2466 <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
2467 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2468 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2469 </fo:block>
2470 </xsl:template>
2471
2472 <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
2473 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2474 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2475 </fo:block>
2476 </xsl:template>
2477
2478 <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
2479 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2480 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2481 </fo:block>
2482 </xsl:template>
2483
2484 <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
2485 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2486 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2487 </fo:block>
2488 </xsl:template>
2489
2490 <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
2491 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2492 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2493 </fo:block>
2494 </xsl:template>
2495
2496 <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
2497 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2498 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2499 </fo:block>
2500 </xsl:template>
2501
2502 <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
2503 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2504 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2505 </fo:block>
2506 </xsl:template>
2507
2508 <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
2509 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2510 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2511 </fo:block>
2512 </xsl:template>
2513
2514 <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
2515 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2516 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2517 </fo:block>
2518 </xsl:template>
2519
2520 <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
2521 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2522 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2523 </fo:block>
2524 </xsl:template>
2525
2526 <xsl:template name="sect1.titlepage.recto">
2527   <xsl:choose>
2528     <xsl:when test="sect1info/title">
2529       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
2530     </xsl:when>
2531     <xsl:when test="info/title">
2532       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
2533     </xsl:when>
2534     <xsl:when test="title">
2535       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
2536     </xsl:when>
2537   </xsl:choose>
2538
2539   <xsl:choose>
2540     <xsl:when test="sect1info/subtitle">
2541       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
2542     </xsl:when>
2543     <xsl:when test="info/subtitle">
2544       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
2545     </xsl:when>
2546     <xsl:when test="subtitle">
2547       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
2548     </xsl:when>
2549   </xsl:choose>
2550
2551   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
2552   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
2553   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
2554   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
2555   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
2556   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
2557   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
2558   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
2559   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
2560   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2561   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
2562   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
2563   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
2564   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
2565   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
2566   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
2567   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
2568   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
2569   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
2570   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
2571   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
2572   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
2573 </xsl:template>
2574
2575 <xsl:template name="sect1.titlepage.verso">
2576 </xsl:template>
2577
2578 <xsl:template name="sect1.titlepage.separator">
2579 </xsl:template>
2580
2581 <xsl:template name="sect1.titlepage.before.recto">
2582 </xsl:template>
2583
2584 <xsl:template name="sect1.titlepage.before.verso">
2585 </xsl:template>
2586
2587 <xsl:template name="sect1.titlepage">
2588   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2589     <xsl:variable name="recto.content">
2590       <xsl:call-template name="sect1.titlepage.before.recto"/>
2591       <xsl:call-template name="sect1.titlepage.recto"/>
2592     </xsl:variable>
2593     <xsl:variable name="recto.elements.count">
2594       <xsl:choose>
2595         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2596         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2597           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2598         <xsl:otherwise>1</xsl:otherwise>
2599       </xsl:choose>
2600     </xsl:variable>
2601     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2602       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2603     </xsl:if>
2604     <xsl:variable name="verso.content">
2605       <xsl:call-template name="sect1.titlepage.before.verso"/>
2606       <xsl:call-template name="sect1.titlepage.verso"/>
2607     </xsl:variable>
2608     <xsl:variable name="verso.elements.count">
2609       <xsl:choose>
2610         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2611         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2612           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2613         <xsl:otherwise>1</xsl:otherwise>
2614       </xsl:choose>
2615     </xsl:variable>
2616     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2617       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2618     </xsl:if>
2619     <xsl:call-template name="sect1.titlepage.separator"/>
2620   </fo:block>
2621 </xsl:template>
2622
2623 <xsl:template match="*" mode="sect1.titlepage.recto.mode">
2624   <!-- if an element isn't found in this mode, -->
2625   <!-- try the generic titlepage.mode -->
2626   <xsl:apply-templates select="." mode="titlepage.mode"/>
2627 </xsl:template>
2628
2629 <xsl:template match="*" mode="sect1.titlepage.verso.mode">
2630   <!-- if an element isn't found in this mode, -->
2631   <!-- try the generic titlepage.mode -->
2632   <xsl:apply-templates select="." mode="titlepage.mode"/>
2633 </xsl:template>
2634
2635 <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
2636 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2637 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2638 </fo:block>
2639 </xsl:template>
2640
2641 <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
2642 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
2643 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2644 </fo:block>
2645 </xsl:template>
2646
2647 <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
2648 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2649 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2650 </fo:block>
2651 </xsl:template>
2652
2653 <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
2654 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2655 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2656 </fo:block>
2657 </xsl:template>
2658
2659 <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
2660 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2661 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2662 </fo:block>
2663 </xsl:template>
2664
2665 <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
2666 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2667 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2668 </fo:block>
2669 </xsl:template>
2670
2671 <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2672 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2673 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2674 </fo:block>
2675 </xsl:template>
2676
2677 <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
2678 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2679 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2680 </fo:block>
2681 </xsl:template>
2682
2683 <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
2684 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2685 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2686 </fo:block>
2687 </xsl:template>
2688
2689 <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
2690 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2691 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2692 </fo:block>
2693 </xsl:template>
2694
2695 <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
2696 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2697 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2698 </fo:block>
2699 </xsl:template>
2700
2701 <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
2702 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2703 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2704 </fo:block>
2705 </xsl:template>
2706
2707 <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
2708 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2709 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2710 </fo:block>
2711 </xsl:template>
2712
2713 <xsl:template name="sect2.titlepage.recto">
2714   <xsl:choose>
2715     <xsl:when test="sect2info/title">
2716       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
2717     </xsl:when>
2718     <xsl:when test="info/title">
2719       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
2720     </xsl:when>
2721     <xsl:when test="title">
2722       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
2723     </xsl:when>
2724   </xsl:choose>
2725
2726   <xsl:choose>
2727     <xsl:when test="sect2info/subtitle">
2728       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
2729     </xsl:when>
2730     <xsl:when test="info/subtitle">
2731       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
2732     </xsl:when>
2733     <xsl:when test="subtitle">
2734       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
2735     </xsl:when>
2736   </xsl:choose>
2737
2738   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
2739   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
2740   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
2741   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
2742   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
2743   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
2744   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
2745   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
2746   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
2747   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2748   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
2749   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
2750   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
2751   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
2752   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
2753   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
2754   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
2755   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
2756   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
2757   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
2758   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
2759   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
2760 </xsl:template>
2761
2762 <xsl:template name="sect2.titlepage.verso">
2763 </xsl:template>
2764
2765 <xsl:template name="sect2.titlepage.separator">
2766 </xsl:template>
2767
2768 <xsl:template name="sect2.titlepage.before.recto">
2769 </xsl:template>
2770
2771 <xsl:template name="sect2.titlepage.before.verso">
2772 </xsl:template>
2773
2774 <xsl:template name="sect2.titlepage">
2775   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2776     <xsl:variable name="recto.content">
2777       <xsl:call-template name="sect2.titlepage.before.recto"/>
2778       <xsl:call-template name="sect2.titlepage.recto"/>
2779     </xsl:variable>
2780     <xsl:variable name="recto.elements.count">
2781       <xsl:choose>
2782         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2783         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2784           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2785         <xsl:otherwise>1</xsl:otherwise>
2786       </xsl:choose>
2787     </xsl:variable>
2788     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2789       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2790     </xsl:if>
2791     <xsl:variable name="verso.content">
2792       <xsl:call-template name="sect2.titlepage.before.verso"/>
2793       <xsl:call-template name="sect2.titlepage.verso"/>
2794     </xsl:variable>
2795     <xsl:variable name="verso.elements.count">
2796       <xsl:choose>
2797         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2798         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2799           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2800         <xsl:otherwise>1</xsl:otherwise>
2801       </xsl:choose>
2802     </xsl:variable>
2803     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2804       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2805     </xsl:if>
2806     <xsl:call-template name="sect2.titlepage.separator"/>
2807   </fo:block>
2808 </xsl:template>
2809
2810 <xsl:template match="*" mode="sect2.titlepage.recto.mode">
2811   <!-- if an element isn't found in this mode, -->
2812   <!-- try the generic titlepage.mode -->
2813   <xsl:apply-templates select="." mode="titlepage.mode"/>
2814 </xsl:template>
2815
2816 <xsl:template match="*" mode="sect2.titlepage.verso.mode">
2817   <!-- if an element isn't found in this mode, -->
2818   <!-- try the generic titlepage.mode -->
2819   <xsl:apply-templates select="." mode="titlepage.mode"/>
2820 </xsl:template>
2821
2822 <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
2823 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
2824 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2825 </fo:block>
2826 </xsl:template>
2827
2828 <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
2829 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
2830 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2831 </fo:block>
2832 </xsl:template>
2833
2834 <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
2835 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2836 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2837 </fo:block>
2838 </xsl:template>
2839
2840 <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
2841 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2842 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2843 </fo:block>
2844 </xsl:template>
2845
2846 <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
2847 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2848 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2849 </fo:block>
2850 </xsl:template>
2851
2852 <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
2853 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2854 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2855 </fo:block>
2856 </xsl:template>
2857
2858 <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
2859 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2860 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2861 </fo:block>
2862 </xsl:template>
2863
2864 <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
2865 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2866 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2867 </fo:block>
2868 </xsl:template>
2869
2870 <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
2871 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2872 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2873 </fo:block>
2874 </xsl:template>
2875
2876 <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
2877 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2878 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2879 </fo:block>
2880 </xsl:template>
2881
2882 <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
2883 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2884 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2885 </fo:block>
2886 </xsl:template>
2887
2888 <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
2889 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2890 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2891 </fo:block>
2892 </xsl:template>
2893
2894 <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
2895 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2896 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2897 </fo:block>
2898 </xsl:template>
2899
2900 <xsl:template name="sect3.titlepage.recto">
2901   <xsl:choose>
2902     <xsl:when test="sect3info/title">
2903       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
2904     </xsl:when>
2905     <xsl:when test="info/title">
2906       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
2907     </xsl:when>
2908     <xsl:when test="title">
2909       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
2910     </xsl:when>
2911   </xsl:choose>
2912
2913   <xsl:choose>
2914     <xsl:when test="sect3info/subtitle">
2915       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
2916     </xsl:when>
2917     <xsl:when test="info/subtitle">
2918       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
2919     </xsl:when>
2920     <xsl:when test="subtitle">
2921       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
2922     </xsl:when>
2923   </xsl:choose>
2924
2925   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
2926   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
2927   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
2928   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
2929   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
2930   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
2931   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
2932   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
2933   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
2934   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2935   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
2936   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
2937   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
2938   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
2939   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
2940   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
2941   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
2942   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
2943   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
2944   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
2945   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
2946   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
2947 </xsl:template>
2948
2949 <xsl:template name="sect3.titlepage.verso">
2950 </xsl:template>
2951
2952 <xsl:template name="sect3.titlepage.separator">
2953 </xsl:template>
2954
2955 <xsl:template name="sect3.titlepage.before.recto">
2956 </xsl:template>
2957
2958 <xsl:template name="sect3.titlepage.before.verso">
2959 </xsl:template>
2960
2961 <xsl:template name="sect3.titlepage">
2962   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2963     <xsl:variable name="recto.content">
2964       <xsl:call-template name="sect3.titlepage.before.recto"/>
2965       <xsl:call-template name="sect3.titlepage.recto"/>
2966     </xsl:variable>
2967     <xsl:variable name="recto.elements.count">
2968       <xsl:choose>
2969         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2970         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2971           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2972         <xsl:otherwise>1</xsl:otherwise>
2973       </xsl:choose>
2974     </xsl:variable>
2975     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2976       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2977     </xsl:if>
2978     <xsl:variable name="verso.content">
2979       <xsl:call-template name="sect3.titlepage.before.verso"/>
2980       <xsl:call-template name="sect3.titlepage.verso"/>
2981     </xsl:variable>
2982     <xsl:variable name="verso.elements.count">
2983       <xsl:choose>
2984         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2985         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2986           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2987         <xsl:otherwise>1</xsl:otherwise>
2988       </xsl:choose>
2989     </xsl:variable>
2990     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2991       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2992     </xsl:if>
2993     <xsl:call-template name="sect3.titlepage.separator"/>
2994   </fo:block>
2995 </xsl:template>
2996
2997 <xsl:template match="*" mode="sect3.titlepage.recto.mode">
2998   <!-- if an element isn't found in this mode, -->
2999   <!-- try the generic titlepage.mode -->
3000   <xsl:apply-templates select="." mode="titlepage.mode"/>
3001 </xsl:template>
3002
3003 <xsl:template match="*" mode="sect3.titlepage.verso.mode">
3004   <!-- if an element isn't found in this mode, -->
3005   <!-- try the generic titlepage.mode -->
3006   <xsl:apply-templates select="." mode="titlepage.mode"/>
3007 </xsl:template>
3008
3009 <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
3010 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3011 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3012 </fo:block>
3013 </xsl:template>
3014
3015 <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
3016 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
3017 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3018 </fo:block>
3019 </xsl:template>
3020
3021 <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
3022 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3023 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3024 </fo:block>
3025 </xsl:template>
3026
3027 <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
3028 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3029 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3030 </fo:block>
3031 </xsl:template>
3032
3033 <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
3034 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3035 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3036 </fo:block>
3037 </xsl:template>
3038
3039 <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
3040 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3041 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3042 </fo:block>
3043 </xsl:template>
3044
3045 <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
3046 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3047 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3048 </fo:block>
3049 </xsl:template>
3050
3051 <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
3052 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3053 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3054 </fo:block>
3055 </xsl:template>
3056
3057 <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
3058 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3059 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3060 </fo:block>
3061 </xsl:template>
3062
3063 <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
3064 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3065 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3066 </fo:block>
3067 </xsl:template>
3068
3069 <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
3070 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3071 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3072 </fo:block>
3073 </xsl:template>
3074
3075 <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
3076 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3077 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3078 </fo:block>
3079 </xsl:template>
3080
3081 <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
3082 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3083 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3084 </fo:block>
3085 </xsl:template>
3086
3087 <xsl:template name="sect4.titlepage.recto">
3088   <xsl:choose>
3089     <xsl:when test="sect4info/title">
3090       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
3091     </xsl:when>
3092     <xsl:when test="info/title">
3093       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
3094     </xsl:when>
3095     <xsl:when test="title">
3096       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
3097     </xsl:when>
3098   </xsl:choose>
3099
3100   <xsl:choose>
3101     <xsl:when test="sect4info/subtitle">
3102       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
3103     </xsl:when>
3104     <xsl:when test="info/subtitle">
3105       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
3106     </xsl:when>
3107     <xsl:when test="subtitle">
3108       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
3109     </xsl:when>
3110   </xsl:choose>
3111
3112   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
3113   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
3114   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
3115   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
3116   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
3117   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
3118   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
3119   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
3120   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
3121   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3122   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
3123   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
3124   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
3125   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
3126   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
3127   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
3128   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
3129   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
3130   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
3131   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
3132   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
3133   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
3134 </xsl:template>
3135
3136 <xsl:template name="sect4.titlepage.verso">
3137 </xsl:template>
3138
3139 <xsl:template name="sect4.titlepage.separator">
3140 </xsl:template>
3141
3142 <xsl:template name="sect4.titlepage.before.recto">
3143 </xsl:template>
3144
3145 <xsl:template name="sect4.titlepage.before.verso">
3146 </xsl:template>
3147
3148 <xsl:template name="sect4.titlepage">
3149   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3150     <xsl:variable name="recto.content">
3151       <xsl:call-template name="sect4.titlepage.before.recto"/>
3152       <xsl:call-template name="sect4.titlepage.recto"/>
3153     </xsl:variable>
3154     <xsl:variable name="recto.elements.count">
3155       <xsl:choose>
3156         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3157         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3158           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3159         <xsl:otherwise>1</xsl:otherwise>
3160       </xsl:choose>
3161     </xsl:variable>
3162     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3163       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3164     </xsl:if>
3165     <xsl:variable name="verso.content">
3166       <xsl:call-template name="sect4.titlepage.before.verso"/>
3167       <xsl:call-template name="sect4.titlepage.verso"/>
3168     </xsl:variable>
3169     <xsl:variable name="verso.elements.count">
3170       <xsl:choose>
3171         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3172         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3173           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3174         <xsl:otherwise>1</xsl:otherwise>
3175       </xsl:choose>
3176     </xsl:variable>
3177     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3178       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3179     </xsl:if>
3180     <xsl:call-template name="sect4.titlepage.separator"/>
3181   </fo:block>
3182 </xsl:template>
3183
3184 <xsl:template match="*" mode="sect4.titlepage.recto.mode">
3185   <!-- if an element isn't found in this mode, -->
3186   <!-- try the generic titlepage.mode -->
3187   <xsl:apply-templates select="." mode="titlepage.mode"/>
3188 </xsl:template>
3189
3190 <xsl:template match="*" mode="sect4.titlepage.verso.mode">
3191   <!-- if an element isn't found in this mode, -->
3192   <!-- try the generic titlepage.mode -->
3193   <xsl:apply-templates select="." mode="titlepage.mode"/>
3194 </xsl:template>
3195
3196 <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
3197 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3198 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3199 </fo:block>
3200 </xsl:template>
3201
3202 <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
3203 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
3204 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3205 </fo:block>
3206 </xsl:template>
3207
3208 <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
3209 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3210 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3211 </fo:block>
3212 </xsl:template>
3213
3214 <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
3215 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3216 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3217 </fo:block>
3218 </xsl:template>
3219
3220 <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
3221 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3222 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3223 </fo:block>
3224 </xsl:template>
3225
3226 <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
3227 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3228 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3229 </fo:block>
3230 </xsl:template>
3231
3232 <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
3233 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3234 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3235 </fo:block>
3236 </xsl:template>
3237
3238 <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
3239 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3240 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3241 </fo:block>
3242 </xsl:template>
3243
3244 <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
3245 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3246 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3247 </fo:block>
3248 </xsl:template>
3249
3250 <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
3251 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3252 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3253 </fo:block>
3254 </xsl:template>
3255
3256 <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
3257 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3258 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3259 </fo:block>
3260 </xsl:template>
3261
3262 <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
3263 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3264 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3265 </fo:block>
3266 </xsl:template>
3267
3268 <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
3269 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3270 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3271 </fo:block>
3272 </xsl:template>
3273
3274 <xsl:template name="sect5.titlepage.recto">
3275   <xsl:choose>
3276     <xsl:when test="sect5info/title">
3277       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
3278     </xsl:when>
3279     <xsl:when test="info/title">
3280       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
3281     </xsl:when>
3282     <xsl:when test="title">
3283       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
3284     </xsl:when>
3285   </xsl:choose>
3286
3287   <xsl:choose>
3288     <xsl:when test="sect5info/subtitle">
3289       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
3290     </xsl:when>
3291     <xsl:when test="info/subtitle">
3292       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
3293     </xsl:when>
3294     <xsl:when test="subtitle">
3295       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
3296     </xsl:when>
3297   </xsl:choose>
3298
3299   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
3300   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
3301   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
3302   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
3303   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
3304   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
3305   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
3306   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
3307   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
3308   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3309   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
3310   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
3311   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
3312   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
3313   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
3314   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
3315   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
3316   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
3317   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
3318   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
3319   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
3320   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
3321 </xsl:template>
3322
3323 <xsl:template name="sect5.titlepage.verso">
3324 </xsl:template>
3325
3326 <xsl:template name="sect5.titlepage.separator">
3327 </xsl:template>
3328
3329 <xsl:template name="sect5.titlepage.before.recto">
3330 </xsl:template>
3331
3332 <xsl:template name="sect5.titlepage.before.verso">
3333 </xsl:template>
3334
3335 <xsl:template name="sect5.titlepage">
3336   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3337     <xsl:variable name="recto.content">
3338       <xsl:call-template name="sect5.titlepage.before.recto"/>
3339       <xsl:call-template name="sect5.titlepage.recto"/>
3340     </xsl:variable>
3341     <xsl:variable name="recto.elements.count">
3342       <xsl:choose>
3343         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3344         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3345           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3346         <xsl:otherwise>1</xsl:otherwise>
3347       </xsl:choose>
3348     </xsl:variable>
3349     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3350       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3351     </xsl:if>
3352     <xsl:variable name="verso.content">
3353       <xsl:call-template name="sect5.titlepage.before.verso"/>
3354       <xsl:call-template name="sect5.titlepage.verso"/>
3355     </xsl:variable>
3356     <xsl:variable name="verso.elements.count">
3357       <xsl:choose>
3358         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3359         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3360           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3361         <xsl:otherwise>1</xsl:otherwise>
3362       </xsl:choose>
3363     </xsl:variable>
3364     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3365       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3366     </xsl:if>
3367     <xsl:call-template name="sect5.titlepage.separator"/>
3368   </fo:block>
3369 </xsl:template>
3370
3371 <xsl:template match="*" mode="sect5.titlepage.recto.mode">
3372   <!-- if an element isn't found in this mode, -->
3373   <!-- try the generic titlepage.mode -->
3374   <xsl:apply-templates select="." mode="titlepage.mode"/>
3375 </xsl:template>
3376
3377 <xsl:template match="*" mode="sect5.titlepage.verso.mode">
3378   <!-- if an element isn't found in this mode, -->
3379   <!-- try the generic titlepage.mode -->
3380   <xsl:apply-templates select="." mode="titlepage.mode"/>
3381 </xsl:template>
3382
3383 <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
3384 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3385 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3386 </fo:block>
3387 </xsl:template>
3388
3389 <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
3390 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
3391 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3392 </fo:block>
3393 </xsl:template>
3394
3395 <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
3396 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3397 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3398 </fo:block>
3399 </xsl:template>
3400
3401 <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
3402 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3403 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3404 </fo:block>
3405 </xsl:template>
3406
3407 <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
3408 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3409 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3410 </fo:block>
3411 </xsl:template>
3412
3413 <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
3414 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3415 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3416 </fo:block>
3417 </xsl:template>
3418
3419 <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3420 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3421 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3422 </fo:block>
3423 </xsl:template>
3424
3425 <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
3426 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3427 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3428 </fo:block>
3429 </xsl:template>
3430
3431 <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
3432 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3433 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3434 </fo:block>
3435 </xsl:template>
3436
3437 <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
3438 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3439 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3440 </fo:block>
3441 </xsl:template>
3442
3443 <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
3444 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3445 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3446 </fo:block>
3447 </xsl:template>
3448
3449 <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
3450 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3451 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3452 </fo:block>
3453 </xsl:template>
3454
3455 <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
3456 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3457 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3458 </fo:block>
3459 </xsl:template>
3460
3461 <xsl:template name="simplesect.titlepage.recto">
3462   <xsl:choose>
3463     <xsl:when test="simplesectinfo/title">
3464       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
3465     </xsl:when>
3466     <xsl:when test="docinfo/title">
3467       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
3468     </xsl:when>
3469     <xsl:when test="info/title">
3470       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
3471     </xsl:when>
3472     <xsl:when test="title">
3473       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
3474     </xsl:when>
3475   </xsl:choose>
3476
3477   <xsl:choose>
3478     <xsl:when test="simplesectinfo/subtitle">
3479       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
3480     </xsl:when>
3481     <xsl:when test="docinfo/subtitle">
3482       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3483     </xsl:when>
3484     <xsl:when test="info/subtitle">
3485       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
3486     </xsl:when>
3487     <xsl:when test="subtitle">
3488       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
3489     </xsl:when>
3490   </xsl:choose>
3491
3492   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
3493   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3494   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
3495   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
3496   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3497   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
3498   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
3499   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
3500   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
3501   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
3502   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3503   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
3504   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
3505   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3506   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3507   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
3508   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3509   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
3510   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
3511   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3512   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
3513   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
3514   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3515   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
3516   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
3517   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
3518   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
3519   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
3520   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3521   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
3522   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
3523   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3524   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
3525 </xsl:template>
3526
3527 <xsl:template name="simplesect.titlepage.verso">
3528 </xsl:template>
3529
3530 <xsl:template name="simplesect.titlepage.separator">
3531 </xsl:template>
3532
3533 <xsl:template name="simplesect.titlepage.before.recto">
3534 </xsl:template>
3535
3536 <xsl:template name="simplesect.titlepage.before.verso">
3537 </xsl:template>
3538
3539 <xsl:template name="simplesect.titlepage">
3540   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3541     <xsl:variable name="recto.content">
3542       <xsl:call-template name="simplesect.titlepage.before.recto"/>
3543       <xsl:call-template name="simplesect.titlepage.recto"/>
3544     </xsl:variable>
3545     <xsl:variable name="recto.elements.count">
3546       <xsl:choose>
3547         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3548         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3549           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3550         <xsl:otherwise>1</xsl:otherwise>
3551       </xsl:choose>
3552     </xsl:variable>
3553     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3554       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3555     </xsl:if>
3556     <xsl:variable name="verso.content">
3557       <xsl:call-template name="simplesect.titlepage.before.verso"/>
3558       <xsl:call-template name="simplesect.titlepage.verso"/>
3559     </xsl:variable>
3560     <xsl:variable name="verso.elements.count">
3561       <xsl:choose>
3562         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3563         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3564           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3565         <xsl:otherwise>1</xsl:otherwise>
3566       </xsl:choose>
3567     </xsl:variable>
3568     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3569       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3570     </xsl:if>
3571     <xsl:call-template name="simplesect.titlepage.separator"/>
3572   </fo:block>
3573 </xsl:template>
3574
3575 <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
3576   <!-- if an element isn't found in this mode, -->
3577   <!-- try the generic titlepage.mode -->
3578   <xsl:apply-templates select="." mode="titlepage.mode"/>
3579 </xsl:template>
3580
3581 <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
3582   <!-- if an element isn't found in this mode, -->
3583   <!-- try the generic titlepage.mode -->
3584   <xsl:apply-templates select="." mode="titlepage.mode"/>
3585 </xsl:template>
3586
3587 <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
3588 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
3589 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3590 </fo:block>
3591 </xsl:template>
3592
3593 <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
3594 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
3595 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3596 </fo:block>
3597 </xsl:template>
3598
3599 <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3600 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3601 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3602 </fo:block>
3603 </xsl:template>
3604
3605 <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3606 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3607 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3608 </fo:block>
3609 </xsl:template>
3610
3611 <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
3612 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3613 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3614 </fo:block>
3615 </xsl:template>
3616
3617 <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
3618 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3619 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3620 </fo:block>
3621 </xsl:template>
3622
3623 <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3624 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3625 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3626 </fo:block>
3627 </xsl:template>
3628
3629 <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
3630 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3631 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3632 </fo:block>
3633 </xsl:template>
3634
3635 <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3636 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3637 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3638 </fo:block>
3639 </xsl:template>
3640
3641 <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
3642 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3643 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3644 </fo:block>
3645 </xsl:template>
3646
3647 <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
3648 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3649 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3650 </fo:block>
3651 </xsl:template>
3652
3653 <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
3654 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3655 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3656 </fo:block>
3657 </xsl:template>
3658
3659 <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
3660 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3661 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3662 </fo:block>
3663 </xsl:template>
3664
3665 <xsl:template name="bibliography.titlepage.recto">
3666   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
3667 <xsl:call-template name="component.title">
3668 <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
3669 </xsl:call-template></fo:block>
3670   <xsl:choose>
3671     <xsl:when test="bibliographyinfo/subtitle">
3672       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
3673     </xsl:when>
3674     <xsl:when test="docinfo/subtitle">
3675       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3676     </xsl:when>
3677     <xsl:when test="info/subtitle">
3678       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
3679     </xsl:when>
3680     <xsl:when test="subtitle">
3681       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
3682     </xsl:when>
3683   </xsl:choose>
3684
3685 </xsl:template>
3686
3687 <xsl:template name="bibliography.titlepage.verso">
3688 </xsl:template>
3689
3690 <xsl:template name="bibliography.titlepage.separator">
3691 </xsl:template>
3692
3693 <xsl:template name="bibliography.titlepage.before.recto">
3694 </xsl:template>
3695
3696 <xsl:template name="bibliography.titlepage.before.verso">
3697 </xsl:template>
3698
3699 <xsl:template name="bibliography.titlepage">
3700   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3701     <xsl:variable name="recto.content">
3702       <xsl:call-template name="bibliography.titlepage.before.recto"/>
3703       <xsl:call-template name="bibliography.titlepage.recto"/>
3704     </xsl:variable>
3705     <xsl:variable name="recto.elements.count">
3706       <xsl:choose>
3707         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3708         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3709           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3710         <xsl:otherwise>1</xsl:otherwise>
3711       </xsl:choose>
3712     </xsl:variable>
3713     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3714       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3715     </xsl:if>
3716     <xsl:variable name="verso.content">
3717       <xsl:call-template name="bibliography.titlepage.before.verso"/>
3718       <xsl:call-template name="bibliography.titlepage.verso"/>
3719     </xsl:variable>
3720     <xsl:variable name="verso.elements.count">
3721       <xsl:choose>
3722         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3723         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3724           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3725         <xsl:otherwise>1</xsl:otherwise>
3726       </xsl:choose>
3727     </xsl:variable>
3728     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3729       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3730     </xsl:if>
3731     <xsl:call-template name="bibliography.titlepage.separator"/>
3732   </fo:block>
3733 </xsl:template>
3734
3735 <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
3736   <!-- if an element isn't found in this mode, -->
3737   <!-- try the generic titlepage.mode -->
3738   <xsl:apply-templates select="." mode="titlepage.mode"/>
3739 </xsl:template>
3740
3741 <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
3742   <!-- if an element isn't found in this mode, -->
3743   <!-- try the generic titlepage.mode -->
3744   <xsl:apply-templates select="." mode="titlepage.mode"/>
3745 </xsl:template>
3746
3747 <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
3748 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
3749 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
3750 </fo:block>
3751 </xsl:template>
3752
3753 <xsl:template name="bibliodiv.titlepage.recto">
3754   <xsl:choose>
3755     <xsl:when test="bibliodivinfo/title">
3756       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
3757     </xsl:when>
3758     <xsl:when test="docinfo/title">
3759       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
3760     </xsl:when>
3761     <xsl:when test="info/title">
3762       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
3763     </xsl:when>
3764     <xsl:when test="title">
3765       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
3766     </xsl:when>
3767   </xsl:choose>
3768
3769   <xsl:choose>
3770     <xsl:when test="bibliodivinfo/subtitle">
3771       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
3772     </xsl:when>
3773     <xsl:when test="docinfo/subtitle">
3774       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3775     </xsl:when>
3776     <xsl:when test="info/subtitle">
3777       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
3778     </xsl:when>
3779     <xsl:when test="subtitle">
3780       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
3781     </xsl:when>
3782   </xsl:choose>
3783
3784 </xsl:template>
3785
3786 <xsl:template name="bibliodiv.titlepage.verso">
3787 </xsl:template>
3788
3789 <xsl:template name="bibliodiv.titlepage.separator">
3790 </xsl:template>
3791
3792 <xsl:template name="bibliodiv.titlepage.before.recto">
3793 </xsl:template>
3794
3795 <xsl:template name="bibliodiv.titlepage.before.verso">
3796 </xsl:template>
3797
3798 <xsl:template name="bibliodiv.titlepage">
3799   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3800     <xsl:variable name="recto.content">
3801       <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
3802       <xsl:call-template name="bibliodiv.titlepage.recto"/>
3803     </xsl:variable>
3804     <xsl:variable name="recto.elements.count">
3805       <xsl:choose>
3806         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3807         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3808           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3809         <xsl:otherwise>1</xsl:otherwise>
3810       </xsl:choose>
3811     </xsl:variable>
3812     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3813       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3814     </xsl:if>
3815     <xsl:variable name="verso.content">
3816       <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
3817       <xsl:call-template name="bibliodiv.titlepage.verso"/>
3818     </xsl:variable>
3819     <xsl:variable name="verso.elements.count">
3820       <xsl:choose>
3821         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3822         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3823           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3824         <xsl:otherwise>1</xsl:otherwise>
3825       </xsl:choose>
3826     </xsl:variable>
3827     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3828       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3829     </xsl:if>
3830     <xsl:call-template name="bibliodiv.titlepage.separator"/>
3831   </fo:block>
3832 </xsl:template>
3833
3834 <xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
3835   <!-- if an element isn't found in this mode, -->
3836   <!-- try the generic titlepage.mode -->
3837   <xsl:apply-templates select="." mode="titlepage.mode"/>
3838 </xsl:template>
3839
3840 <xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
3841   <!-- if an element isn't found in this mode, -->
3842   <!-- try the generic titlepage.mode -->
3843   <xsl:apply-templates select="." mode="titlepage.mode"/>
3844 </xsl:template>
3845
3846 <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
3847 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
3848 <xsl:call-template name="component.title">
3849 <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
3850 </xsl:call-template>
3851 </fo:block>
3852 </xsl:template>
3853
3854 <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
3855 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
3856 <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
3857 </fo:block>
3858 </xsl:template>
3859
3860 <xsl:template name="glossary.titlepage.recto">
3861   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
3862 <xsl:call-template name="component.title">
3863 <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
3864 </xsl:call-template></fo:block>
3865   <xsl:choose>
3866     <xsl:when test="glossaryinfo/subtitle">
3867       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
3868     </xsl:when>
3869     <xsl:when test="docinfo/subtitle">
3870       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3871     </xsl:when>
3872     <xsl:when test="info/subtitle">
3873       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
3874     </xsl:when>
3875     <xsl:when test="subtitle">
3876       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
3877     </xsl:when>
3878   </xsl:choose>
3879
3880 </xsl:template>
3881
3882 <xsl:template name="glossary.titlepage.verso">
3883 </xsl:template>
3884
3885 <xsl:template name="glossary.titlepage.separator">
3886 </xsl:template>
3887
3888 <xsl:template name="glossary.titlepage.before.recto">
3889 </xsl:template>
3890
3891 <xsl:template name="glossary.titlepage.before.verso">
3892 </xsl:template>
3893
3894 <xsl:template name="glossary.titlepage">
3895   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3896     <xsl:variable name="recto.content">
3897       <xsl:call-template name="glossary.titlepage.before.recto"/>
3898       <xsl:call-template name="glossary.titlepage.recto"/>
3899     </xsl:variable>
3900     <xsl:variable name="recto.elements.count">
3901       <xsl:choose>
3902         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3903         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3904           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3905         <xsl:otherwise>1</xsl:otherwise>
3906       </xsl:choose>
3907     </xsl:variable>
3908     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3909       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3910     </xsl:if>
3911     <xsl:variable name="verso.content">
3912       <xsl:call-template name="glossary.titlepage.before.verso"/>
3913       <xsl:call-template name="glossary.titlepage.verso"/>
3914     </xsl:variable>
3915     <xsl:variable name="verso.elements.count">
3916       <xsl:choose>
3917         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3918         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3919           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3920         <xsl:otherwise>1</xsl:otherwise>
3921       </xsl:choose>
3922     </xsl:variable>
3923     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3924       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3925     </xsl:if>
3926     <xsl:call-template name="glossary.titlepage.separator"/>
3927   </fo:block>
3928 </xsl:template>
3929
3930 <xsl:template match="*" mode="glossary.titlepage.recto.mode">
3931   <!-- if an element isn't found in this mode, -->
3932   <!-- try the generic titlepage.mode -->
3933   <xsl:apply-templates select="." mode="titlepage.mode"/>
3934 </xsl:template>
3935
3936 <xsl:template match="*" mode="glossary.titlepage.verso.mode">
3937   <!-- if an element isn't found in this mode, -->
3938   <!-- try the generic titlepage.mode -->
3939   <xsl:apply-templates select="." mode="titlepage.mode"/>
3940 </xsl:template>
3941
3942 <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
3943 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
3944 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
3945 </fo:block>
3946 </xsl:template>
3947
3948 <xsl:template name="glossdiv.titlepage.recto">
3949   <xsl:choose>
3950     <xsl:when test="glossdivinfo/title">
3951       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
3952     </xsl:when>
3953     <xsl:when test="docinfo/title">
3954       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
3955     </xsl:when>
3956     <xsl:when test="info/title">
3957       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
3958     </xsl:when>
3959     <xsl:when test="title">
3960       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
3961     </xsl:when>
3962   </xsl:choose>
3963
3964   <xsl:choose>
3965     <xsl:when test="glossdivinfo/subtitle">
3966       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
3967     </xsl:when>
3968     <xsl:when test="docinfo/subtitle">
3969       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3970     </xsl:when>
3971     <xsl:when test="info/subtitle">
3972       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
3973     </xsl:when>
3974     <xsl:when test="subtitle">
3975       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
3976     </xsl:when>
3977   </xsl:choose>
3978
3979 </xsl:template>
3980
3981 <xsl:template name="glossdiv.titlepage.verso">
3982 </xsl:template>
3983
3984 <xsl:template name="glossdiv.titlepage.separator">
3985 </xsl:template>
3986
3987 <xsl:template name="glossdiv.titlepage.before.recto">
3988 </xsl:template>
3989
3990 <xsl:template name="glossdiv.titlepage.before.verso">
3991 </xsl:template>
3992
3993 <xsl:template name="glossdiv.titlepage">
3994   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3995     <xsl:variable name="recto.content">
3996       <xsl:call-template name="glossdiv.titlepage.before.recto"/>
3997       <xsl:call-template name="glossdiv.titlepage.recto"/>
3998     </xsl:variable>
3999     <xsl:variable name="recto.elements.count">
4000       <xsl:choose>
4001         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4002         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4003           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4004         <xsl:otherwise>1</xsl:otherwise>
4005       </xsl:choose>
4006     </xsl:variable>
4007     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4008       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4009     </xsl:if>
4010     <xsl:variable name="verso.content">
4011       <xsl:call-template name="glossdiv.titlepage.before.verso"/>
4012       <xsl:call-template name="glossdiv.titlepage.verso"/>
4013     </xsl:variable>
4014     <xsl:variable name="verso.elements.count">
4015       <xsl:choose>
4016         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4017         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4018           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4019         <xsl:otherwise>1</xsl:otherwise>
4020       </xsl:choose>
4021     </xsl:variable>
4022     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4023       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4024     </xsl:if>
4025     <xsl:call-template name="glossdiv.titlepage.separator"/>
4026   </fo:block>
4027 </xsl:template>
4028
4029 <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
4030   <!-- if an element isn't found in this mode, -->
4031   <!-- try the generic titlepage.mode -->
4032   <xsl:apply-templates select="." mode="titlepage.mode"/>
4033 </xsl:template>
4034
4035 <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
4036   <!-- if an element isn't found in this mode, -->
4037   <!-- try the generic titlepage.mode -->
4038   <xsl:apply-templates select="." mode="titlepage.mode"/>
4039 </xsl:template>
4040
4041 <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
4042 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
4043 <xsl:call-template name="component.title">
4044 <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
4045 </xsl:call-template>
4046 </fo:block>
4047 </xsl:template>
4048
4049 <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
4050 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
4051 <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
4052 </fo:block>
4053 </xsl:template>
4054
4055 <xsl:template name="index.titlepage.recto">
4056   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4057 <xsl:call-template name="component.title">
4058 <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
4059 <xsl:with-param name="pagewide" select="1"/>
4060 </xsl:call-template></fo:block>
4061   <xsl:choose>
4062     <xsl:when test="indexinfo/subtitle">
4063       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
4064     </xsl:when>
4065     <xsl:when test="docinfo/subtitle">
4066       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4067     </xsl:when>
4068     <xsl:when test="info/subtitle">
4069       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
4070     </xsl:when>
4071     <xsl:when test="subtitle">
4072       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
4073     </xsl:when>
4074   </xsl:choose>
4075
4076 </xsl:template>
4077
4078 <xsl:template name="index.titlepage.verso">
4079 </xsl:template>
4080
4081 <xsl:template name="index.titlepage.separator">
4082 </xsl:template>
4083
4084 <xsl:template name="index.titlepage.before.recto">
4085 </xsl:template>
4086
4087 <xsl:template name="index.titlepage.before.verso">
4088 </xsl:template>
4089
4090 <xsl:template name="index.titlepage">
4091   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4092     <xsl:variable name="recto.content">
4093       <xsl:call-template name="index.titlepage.before.recto"/>
4094       <xsl:call-template name="index.titlepage.recto"/>
4095     </xsl:variable>
4096     <xsl:variable name="recto.elements.count">
4097       <xsl:choose>
4098         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4099         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4100           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4101         <xsl:otherwise>1</xsl:otherwise>
4102       </xsl:choose>
4103     </xsl:variable>
4104     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4105       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4106     </xsl:if>
4107     <xsl:variable name="verso.content">
4108       <xsl:call-template name="index.titlepage.before.verso"/>
4109       <xsl:call-template name="index.titlepage.verso"/>
4110     </xsl:variable>
4111     <xsl:variable name="verso.elements.count">
4112       <xsl:choose>
4113         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4114         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4115           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4116         <xsl:otherwise>1</xsl:otherwise>
4117       </xsl:choose>
4118     </xsl:variable>
4119     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4120       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4121     </xsl:if>
4122     <xsl:call-template name="index.titlepage.separator"/>
4123   </fo:block>
4124 </xsl:template>
4125
4126 <xsl:template match="*" mode="index.titlepage.recto.mode">
4127   <!-- if an element isn't found in this mode, -->
4128   <!-- try the generic titlepage.mode -->
4129   <xsl:apply-templates select="." mode="titlepage.mode"/>
4130 </xsl:template>
4131
4132 <xsl:template match="*" mode="index.titlepage.verso.mode">
4133   <!-- if an element isn't found in this mode, -->
4134   <!-- try the generic titlepage.mode -->
4135   <xsl:apply-templates select="." mode="titlepage.mode"/>
4136 </xsl:template>
4137
4138 <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
4139 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
4140 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
4141 </fo:block>
4142 </xsl:template>
4143
4144 <xsl:template name="indexdiv.titlepage.recto">
4145   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
4146 <xsl:call-template name="indexdiv.title">
4147 <xsl:with-param name="title" select="title"/>
4148 </xsl:call-template></fo:block>
4149   <xsl:choose>
4150     <xsl:when test="indexdivinfo/subtitle">
4151       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
4152     </xsl:when>
4153     <xsl:when test="docinfo/subtitle">
4154       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4155     </xsl:when>
4156     <xsl:when test="info/subtitle">
4157       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4158     </xsl:when>
4159     <xsl:when test="subtitle">
4160       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
4161     </xsl:when>
4162   </xsl:choose>
4163
4164 </xsl:template>
4165
4166 <xsl:template name="indexdiv.titlepage.verso">
4167 </xsl:template>
4168
4169 <xsl:template name="indexdiv.titlepage.separator">
4170 </xsl:template>
4171
4172 <xsl:template name="indexdiv.titlepage.before.recto">
4173 </xsl:template>
4174
4175 <xsl:template name="indexdiv.titlepage.before.verso">
4176 </xsl:template>
4177
4178 <xsl:template name="indexdiv.titlepage">
4179   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4180     <xsl:variable name="recto.content">
4181       <xsl:call-template name="indexdiv.titlepage.before.recto"/>
4182       <xsl:call-template name="indexdiv.titlepage.recto"/>
4183     </xsl:variable>
4184     <xsl:variable name="recto.elements.count">
4185       <xsl:choose>
4186         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4187         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4188           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4189         <xsl:otherwise>1</xsl:otherwise>
4190       </xsl:choose>
4191     </xsl:variable>
4192     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4193       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4194     </xsl:if>
4195     <xsl:variable name="verso.content">
4196       <xsl:call-template name="indexdiv.titlepage.before.verso"/>
4197       <xsl:call-template name="indexdiv.titlepage.verso"/>
4198     </xsl:variable>
4199     <xsl:variable name="verso.elements.count">
4200       <xsl:choose>
4201         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4202         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4203           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4204         <xsl:otherwise>1</xsl:otherwise>
4205       </xsl:choose>
4206     </xsl:variable>
4207     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4208       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4209     </xsl:if>
4210     <xsl:call-template name="indexdiv.titlepage.separator"/>
4211   </fo:block>
4212 </xsl:template>
4213
4214 <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
4215   <!-- if an element isn't found in this mode, -->
4216   <!-- try the generic titlepage.mode -->
4217   <xsl:apply-templates select="." mode="titlepage.mode"/>
4218 </xsl:template>
4219
4220 <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
4221   <!-- if an element isn't found in this mode, -->
4222   <!-- try the generic titlepage.mode -->
4223   <xsl:apply-templates select="." mode="titlepage.mode"/>
4224 </xsl:template>
4225
4226 <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
4227 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
4228 <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
4229 </fo:block>
4230 </xsl:template>
4231
4232 <xsl:template name="setindex.titlepage.recto">
4233   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4234 <xsl:call-template name="component.title">
4235 <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
4236 <xsl:with-param name="pagewide" select="1"/>
4237 </xsl:call-template></fo:block>
4238   <xsl:choose>
4239     <xsl:when test="setindexinfo/subtitle">
4240       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
4241     </xsl:when>
4242     <xsl:when test="docinfo/subtitle">
4243       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4244     </xsl:when>
4245     <xsl:when test="info/subtitle">
4246       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
4247     </xsl:when>
4248     <xsl:when test="subtitle">
4249       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
4250     </xsl:when>
4251   </xsl:choose>
4252
4253 </xsl:template>
4254
4255 <xsl:template name="setindex.titlepage.verso">
4256 </xsl:template>
4257
4258 <xsl:template name="setindex.titlepage.separator">
4259 </xsl:template>
4260
4261 <xsl:template name="setindex.titlepage.before.recto">
4262 </xsl:template>
4263
4264 <xsl:template name="setindex.titlepage.before.verso">
4265 </xsl:template>
4266
4267 <xsl:template name="setindex.titlepage">
4268   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4269     <xsl:variable name="recto.content">
4270       <xsl:call-template name="setindex.titlepage.before.recto"/>
4271       <xsl:call-template name="setindex.titlepage.recto"/>
4272     </xsl:variable>
4273     <xsl:variable name="recto.elements.count">
4274       <xsl:choose>
4275         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4276         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4277           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4278         <xsl:otherwise>1</xsl:otherwise>
4279       </xsl:choose>
4280     </xsl:variable>
4281     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4282       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4283     </xsl:if>
4284     <xsl:variable name="verso.content">
4285       <xsl:call-template name="setindex.titlepage.before.verso"/>
4286       <xsl:call-template name="setindex.titlepage.verso"/>
4287     </xsl:variable>
4288     <xsl:variable name="verso.elements.count">
4289       <xsl:choose>
4290         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4291         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4292           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4293         <xsl:otherwise>1</xsl:otherwise>
4294       </xsl:choose>
4295     </xsl:variable>
4296     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4297       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4298     </xsl:if>
4299     <xsl:call-template name="setindex.titlepage.separator"/>
4300   </fo:block>
4301 </xsl:template>
4302
4303 <xsl:template match="*" mode="setindex.titlepage.recto.mode">
4304   <!-- if an element isn't found in this mode, -->
4305   <!-- try the generic titlepage.mode -->
4306   <xsl:apply-templates select="." mode="titlepage.mode"/>
4307 </xsl:template>
4308
4309 <xsl:template match="*" mode="setindex.titlepage.verso.mode">
4310   <!-- if an element isn't found in this mode, -->
4311   <!-- try the generic titlepage.mode -->
4312   <xsl:apply-templates select="." mode="titlepage.mode"/>
4313 </xsl:template>
4314
4315 <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
4316 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
4317 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
4318 </fo:block>
4319 </xsl:template>
4320
4321 <xsl:template name="colophon.titlepage.recto">
4322   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
4323 <xsl:call-template name="component.title">
4324 <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
4325 </xsl:call-template></fo:block>
4326   <xsl:choose>
4327     <xsl:when test="colophoninfo/subtitle">
4328       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
4329     </xsl:when>
4330     <xsl:when test="docinfo/subtitle">
4331       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4332     </xsl:when>
4333     <xsl:when test="info/subtitle">
4334       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
4335     </xsl:when>
4336     <xsl:when test="subtitle">
4337       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
4338     </xsl:when>
4339   </xsl:choose>
4340
4341 </xsl:template>
4342
4343 <xsl:template name="colophon.titlepage.verso">
4344 </xsl:template>
4345
4346 <xsl:template name="colophon.titlepage.separator">
4347 </xsl:template>
4348
4349 <xsl:template name="colophon.titlepage.before.recto">
4350 </xsl:template>
4351
4352 <xsl:template name="colophon.titlepage.before.verso">
4353 </xsl:template>
4354
4355 <xsl:template name="colophon.titlepage">
4356   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4357     <xsl:variable name="recto.content">
4358       <xsl:call-template name="colophon.titlepage.before.recto"/>
4359       <xsl:call-template name="colophon.titlepage.recto"/>
4360     </xsl:variable>
4361     <xsl:variable name="recto.elements.count">
4362       <xsl:choose>
4363         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4364         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4365           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4366         <xsl:otherwise>1</xsl:otherwise>
4367       </xsl:choose>
4368     </xsl:variable>
4369     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4370       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4371     </xsl:if>
4372     <xsl:variable name="verso.content">
4373       <xsl:call-template name="colophon.titlepage.before.verso"/>
4374       <xsl:call-template name="colophon.titlepage.verso"/>
4375     </xsl:variable>
4376     <xsl:variable name="verso.elements.count">
4377       <xsl:choose>
4378         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4379         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4380           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4381         <xsl:otherwise>1</xsl:otherwise>
4382       </xsl:choose>
4383     </xsl:variable>
4384     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4385       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4386     </xsl:if>
4387     <xsl:call-template name="colophon.titlepage.separator"/>
4388   </fo:block>
4389 </xsl:template>
4390
4391 <xsl:template match="*" mode="colophon.titlepage.recto.mode">
4392   <!-- if an element isn't found in this mode, -->
4393   <!-- try the generic titlepage.mode -->
4394   <xsl:apply-templates select="." mode="titlepage.mode"/>
4395 </xsl:template>
4396
4397 <xsl:template match="*" mode="colophon.titlepage.verso.mode">
4398   <!-- if an element isn't found in this mode, -->
4399   <!-- try the generic titlepage.mode -->
4400   <xsl:apply-templates select="." mode="titlepage.mode"/>
4401 </xsl:template>
4402
4403 <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
4404 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
4405 <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
4406 </fo:block>
4407 </xsl:template>
4408
4409 <xsl:template name="sidebar.titlepage.recto">
4410   <xsl:choose>
4411     <xsl:when test="sidebarinfo/title">
4412       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
4413     </xsl:when>
4414     <xsl:when test="docinfo/title">
4415       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
4416     </xsl:when>
4417     <xsl:when test="info/title">
4418       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
4419     </xsl:when>
4420     <xsl:when test="title">
4421       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
4422     </xsl:when>
4423   </xsl:choose>
4424
4425   <xsl:choose>
4426     <xsl:when test="sidebarinfo/subtitle">
4427       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
4428     </xsl:when>
4429     <xsl:when test="docinfo/subtitle">
4430       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4431     </xsl:when>
4432     <xsl:when test="info/subtitle">
4433       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
4434     </xsl:when>
4435     <xsl:when test="subtitle">
4436       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
4437     </xsl:when>
4438   </xsl:choose>
4439
4440 </xsl:template>
4441
4442 <xsl:template name="sidebar.titlepage.verso">
4443 </xsl:template>
4444
4445 <xsl:template name="sidebar.titlepage.separator">
4446 </xsl:template>
4447
4448 <xsl:template name="sidebar.titlepage.before.recto">
4449 </xsl:template>
4450
4451 <xsl:template name="sidebar.titlepage.before.verso">
4452 </xsl:template>
4453
4454 <xsl:template name="sidebar.titlepage">
4455   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4456     <xsl:variable name="recto.content">
4457       <xsl:call-template name="sidebar.titlepage.before.recto"/>
4458       <xsl:call-template name="sidebar.titlepage.recto"/>
4459     </xsl:variable>
4460     <xsl:variable name="recto.elements.count">
4461       <xsl:choose>
4462         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4463         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4464           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4465         <xsl:otherwise>1</xsl:otherwise>
4466       </xsl:choose>
4467     </xsl:variable>
4468     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4469       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4470     </xsl:if>
4471     <xsl:variable name="verso.content">
4472       <xsl:call-template name="sidebar.titlepage.before.verso"/>
4473       <xsl:call-template name="sidebar.titlepage.verso"/>
4474     </xsl:variable>
4475     <xsl:variable name="verso.elements.count">
4476       <xsl:choose>
4477         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4478         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4479           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4480         <xsl:otherwise>1</xsl:otherwise>
4481       </xsl:choose>
4482     </xsl:variable>
4483     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4484       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4485     </xsl:if>
4486     <xsl:call-template name="sidebar.titlepage.separator"/>
4487   </fo:block>
4488 </xsl:template>
4489
4490 <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
4491   <!-- if an element isn't found in this mode, -->
4492   <!-- try the generic titlepage.mode -->
4493   <xsl:apply-templates select="." mode="titlepage.mode"/>
4494 </xsl:template>
4495
4496 <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
4497   <!-- if an element isn't found in this mode, -->
4498   <!-- try the generic titlepage.mode -->
4499   <xsl:apply-templates select="." mode="titlepage.mode"/>
4500 </xsl:template>
4501
4502 <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
4503 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold">
4504 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4505 </fo:block>
4506 </xsl:template>
4507
4508 <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
4509 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
4510 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4511 </fo:block>
4512 </xsl:template>
4513
4514 <xsl:template name="qandaset.titlepage.recto">
4515   <xsl:choose>
4516     <xsl:when test="qandasetinfo/title">
4517       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
4518     </xsl:when>
4519     <xsl:when test="blockinfo/title">
4520       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
4521     </xsl:when>
4522     <xsl:when test="info/title">
4523       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
4524     </xsl:when>
4525     <xsl:when test="title">
4526       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
4527     </xsl:when>
4528   </xsl:choose>
4529
4530   <xsl:choose>
4531     <xsl:when test="qandasetinfo/subtitle">
4532       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
4533     </xsl:when>
4534     <xsl:when test="blockinfo/subtitle">
4535       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
4536     </xsl:when>
4537     <xsl:when test="info/subtitle">
4538       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
4539     </xsl:when>
4540     <xsl:when test="subtitle">
4541       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
4542     </xsl:when>
4543   </xsl:choose>
4544
4545   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
4546   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
4547   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
4548   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
4549   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
4550   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
4551   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
4552   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
4553   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
4554   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
4555   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
4556   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
4557   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
4558   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
4559   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
4560   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
4561   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
4562   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
4563   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
4564   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
4565   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
4566   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
4567   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
4568   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
4569   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
4570   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
4571   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
4572   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
4573   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
4574   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
4575   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
4576   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
4577   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
4578 </xsl:template>
4579
4580 <xsl:template name="qandaset.titlepage.verso">
4581 </xsl:template>
4582
4583 <xsl:template name="qandaset.titlepage.separator">
4584 </xsl:template>
4585
4586 <xsl:template name="qandaset.titlepage.before.recto">
4587 </xsl:template>
4588
4589 <xsl:template name="qandaset.titlepage.before.verso">
4590 </xsl:template>
4591
4592 <xsl:template name="qandaset.titlepage">
4593   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
4594     <xsl:variable name="recto.content">
4595       <xsl:call-template name="qandaset.titlepage.before.recto"/>
4596       <xsl:call-template name="qandaset.titlepage.recto"/>
4597     </xsl:variable>
4598     <xsl:variable name="recto.elements.count">
4599       <xsl:choose>
4600         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4601         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4602           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4603         <xsl:otherwise>1</xsl:otherwise>
4604       </xsl:choose>
4605     </xsl:variable>
4606     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4607       <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
4608     </xsl:if>
4609     <xsl:variable name="verso.content">
4610       <xsl:call-template name="qandaset.titlepage.before.verso"/>
4611       <xsl:call-template name="qandaset.titlepage.verso"/>
4612     </xsl:variable>
4613     <xsl:variable name="verso.elements.count">
4614       <xsl:choose>
4615         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4616         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4617           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4618         <xsl:otherwise>1</xsl:otherwise>
4619       </xsl:choose>
4620     </xsl:variable>
4621     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4622       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4623     </xsl:if>
4624     <xsl:call-template name="qandaset.titlepage.separator"/>
4625   </fo:block>
4626 </xsl:template>
4627
4628 <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
4629   <!-- if an element isn't found in this mode, -->
4630   <!-- try the generic titlepage.mode -->
4631   <xsl:apply-templates select="." mode="titlepage.mode"/>
4632 </xsl:template>
4633
4634 <xsl:template match="*" mode="qandaset.titlepage.verso.mode">
4635   <!-- if an element isn't found in this mode, -->
4636   <!-- try the generic titlepage.mode -->
4637   <xsl:apply-templates select="." mode="titlepage.mode"/>
4638 </xsl:template>
4639
4640 <xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
4641 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
4642 <xsl:call-template name="component.title">
4643 <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
4644 </xsl:call-template>
4645 </fo:block>
4646 </xsl:template>
4647
4648 <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
4649 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
4650 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4651 </fo:block>
4652 </xsl:template>
4653
4654 <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
4655 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
4656 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4657 </fo:block>
4658 </xsl:template>
4659
4660 <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
4661 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
4662 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4663 </fo:block>
4664 </xsl:template>
4665
4666 <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
4667 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
4668 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4669 </fo:block>
4670 </xsl:template>
4671
4672 <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
4673 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4674 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4675 </fo:block>
4676 </xsl:template>
4677
4678 <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
4679 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4680 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4681 </fo:block>
4682 </xsl:template>
4683
4684 <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
4685 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4686 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4687 </fo:block>
4688 </xsl:template>
4689
4690 <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
4691 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
4692 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4693 </fo:block>
4694 </xsl:template>
4695
4696 <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
4697 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4698 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4699 </fo:block>
4700 </xsl:template>
4701
4702 <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
4703 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4704 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4705 </fo:block>
4706 </xsl:template>
4707
4708 <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
4709 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
4710 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4711 </fo:block>
4712 </xsl:template>
4713
4714 <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
4715 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
4716 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
4717 </fo:block>
4718 </xsl:template>
4719
4720 <xsl:template name="table.of.contents.titlepage.recto">
4721   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4722 <xsl:call-template name="gentext">
4723 <xsl:with-param name="key" select="'TableofContents'"/>
4724 </xsl:call-template></fo:block>
4725 </xsl:template>
4726
4727 <xsl:template name="table.of.contents.titlepage.verso">
4728 </xsl:template>
4729
4730 <xsl:template name="table.of.contents.titlepage.separator">
4731 </xsl:template>
4732
4733 <xsl:template name="table.of.contents.titlepage.before.recto">
4734 </xsl:template>
4735
4736 <xsl:template name="table.of.contents.titlepage.before.verso">
4737 </xsl:template>
4738
4739 <xsl:template name="table.of.contents.titlepage">
4740   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4741     <xsl:variable name="recto.content">
4742       <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
4743       <xsl:call-template name="table.of.contents.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="table.of.contents.titlepage.before.verso"/>
4758       <xsl:call-template name="table.of.contents.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="table.of.contents.titlepage.separator"/>
4772   </fo:block>
4773 </xsl:template>
4774
4775 <xsl:template match="*" mode="table.of.contents.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="table.of.contents.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 name="list.of.tables.titlepage.recto">
4788   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4789 <xsl:call-template name="gentext">
4790 <xsl:with-param name="key" select="'ListofTables'"/>
4791 </xsl:call-template></fo:block>
4792 </xsl:template>
4793
4794 <xsl:template name="list.of.tables.titlepage.verso">
4795 </xsl:template>
4796
4797 <xsl:template name="list.of.tables.titlepage.separator">
4798 </xsl:template>
4799
4800 <xsl:template name="list.of.tables.titlepage.before.recto">
4801 </xsl:template>
4802
4803 <xsl:template name="list.of.tables.titlepage.before.verso">
4804 </xsl:template>
4805
4806 <xsl:template name="list.of.tables.titlepage">
4807   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4808     <xsl:variable name="recto.content">
4809       <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
4810       <xsl:call-template name="list.of.tables.titlepage.recto"/>
4811     </xsl:variable>
4812     <xsl:variable name="recto.elements.count">
4813       <xsl:choose>
4814         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4815         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4816           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4817         <xsl:otherwise>1</xsl:otherwise>
4818       </xsl:choose>
4819     </xsl:variable>
4820     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4821       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4822     </xsl:if>
4823     <xsl:variable name="verso.content">
4824       <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
4825       <xsl:call-template name="list.of.tables.titlepage.verso"/>
4826     </xsl:variable>
4827     <xsl:variable name="verso.elements.count">
4828       <xsl:choose>
4829         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4830         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4831           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4832         <xsl:otherwise>1</xsl:otherwise>
4833       </xsl:choose>
4834     </xsl:variable>
4835     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4836       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4837     </xsl:if>
4838     <xsl:call-template name="list.of.tables.titlepage.separator"/>
4839   </fo:block>
4840 </xsl:template>
4841
4842 <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
4843   <!-- if an element isn't found in this mode, -->
4844   <!-- try the generic titlepage.mode -->
4845   <xsl:apply-templates select="." mode="titlepage.mode"/>
4846 </xsl:template>
4847
4848 <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
4849   <!-- if an element isn't found in this mode, -->
4850   <!-- try the generic titlepage.mode -->
4851   <xsl:apply-templates select="." mode="titlepage.mode"/>
4852 </xsl:template>
4853
4854 <xsl:template name="list.of.figures.titlepage.recto">
4855   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4856 <xsl:call-template name="gentext">
4857 <xsl:with-param name="key" select="'ListofFigures'"/>
4858 </xsl:call-template></fo:block>
4859 </xsl:template>
4860
4861 <xsl:template name="list.of.figures.titlepage.verso">
4862 </xsl:template>
4863
4864 <xsl:template name="list.of.figures.titlepage.separator">
4865 </xsl:template>
4866
4867 <xsl:template name="list.of.figures.titlepage.before.recto">
4868 </xsl:template>
4869
4870 <xsl:template name="list.of.figures.titlepage.before.verso">
4871 </xsl:template>
4872
4873 <xsl:template name="list.of.figures.titlepage">
4874   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4875     <xsl:variable name="recto.content">
4876       <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
4877       <xsl:call-template name="list.of.figures.titlepage.recto"/>
4878     </xsl:variable>
4879     <xsl:variable name="recto.elements.count">
4880       <xsl:choose>
4881         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4882         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4883           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4884         <xsl:otherwise>1</xsl:otherwise>
4885       </xsl:choose>
4886     </xsl:variable>
4887     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4888       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4889     </xsl:if>
4890     <xsl:variable name="verso.content">
4891       <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
4892       <xsl:call-template name="list.of.figures.titlepage.verso"/>
4893     </xsl:variable>
4894     <xsl:variable name="verso.elements.count">
4895       <xsl:choose>
4896         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4897         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4898           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4899         <xsl:otherwise>1</xsl:otherwise>
4900       </xsl:choose>
4901     </xsl:variable>
4902     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4903       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4904     </xsl:if>
4905     <xsl:call-template name="list.of.figures.titlepage.separator"/>
4906   </fo:block>
4907 </xsl:template>
4908
4909 <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
4910   <!-- if an element isn't found in this mode, -->
4911   <!-- try the generic titlepage.mode -->
4912   <xsl:apply-templates select="." mode="titlepage.mode"/>
4913 </xsl:template>
4914
4915 <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
4916   <!-- if an element isn't found in this mode, -->
4917   <!-- try the generic titlepage.mode -->
4918   <xsl:apply-templates select="." mode="titlepage.mode"/>
4919 </xsl:template>
4920
4921 <xsl:template name="list.of.examples.titlepage.recto">
4922   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4923 <xsl:call-template name="gentext">
4924 <xsl:with-param name="key" select="'ListofExamples'"/>
4925 </xsl:call-template></fo:block>
4926 </xsl:template>
4927
4928 <xsl:template name="list.of.examples.titlepage.verso">
4929 </xsl:template>
4930
4931 <xsl:template name="list.of.examples.titlepage.separator">
4932 </xsl:template>
4933
4934 <xsl:template name="list.of.examples.titlepage.before.recto">
4935 </xsl:template>
4936
4937 <xsl:template name="list.of.examples.titlepage.before.verso">
4938 </xsl:template>
4939
4940 <xsl:template name="list.of.examples.titlepage">
4941   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4942     <xsl:variable name="recto.content">
4943       <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
4944       <xsl:call-template name="list.of.examples.titlepage.recto"/>
4945     </xsl:variable>
4946     <xsl:variable name="recto.elements.count">
4947       <xsl:choose>
4948         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4949         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4950           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4951         <xsl:otherwise>1</xsl:otherwise>
4952       </xsl:choose>
4953     </xsl:variable>
4954     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4955       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4956     </xsl:if>
4957     <xsl:variable name="verso.content">
4958       <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
4959       <xsl:call-template name="list.of.examples.titlepage.verso"/>
4960     </xsl:variable>
4961     <xsl:variable name="verso.elements.count">
4962       <xsl:choose>
4963         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4964         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4965           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4966         <xsl:otherwise>1</xsl:otherwise>
4967       </xsl:choose>
4968     </xsl:variable>
4969     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4970       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4971     </xsl:if>
4972     <xsl:call-template name="list.of.examples.titlepage.separator"/>
4973   </fo:block>
4974 </xsl:template>
4975
4976 <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
4977   <!-- if an element isn't found in this mode, -->
4978   <!-- try the generic titlepage.mode -->
4979   <xsl:apply-templates select="." mode="titlepage.mode"/>
4980 </xsl:template>
4981
4982 <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
4983   <!-- if an element isn't found in this mode, -->
4984   <!-- try the generic titlepage.mode -->
4985   <xsl:apply-templates select="." mode="titlepage.mode"/>
4986 </xsl:template>
4987
4988 <xsl:template name="list.of.equations.titlepage.recto">
4989   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
4990 <xsl:call-template name="gentext">
4991 <xsl:with-param name="key" select="'ListofEquations'"/>
4992 </xsl:call-template></fo:block>
4993 </xsl:template>
4994
4995 <xsl:template name="list.of.equations.titlepage.verso">
4996 </xsl:template>
4997
4998 <xsl:template name="list.of.equations.titlepage.separator">
4999 </xsl:template>
5000
5001 <xsl:template name="list.of.equations.titlepage.before.recto">
5002 </xsl:template>
5003
5004 <xsl:template name="list.of.equations.titlepage.before.verso">
5005 </xsl:template>
5006
5007 <xsl:template name="list.of.equations.titlepage">
5008   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5009     <xsl:variable name="recto.content">
5010       <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
5011       <xsl:call-template name="list.of.equations.titlepage.recto"/>
5012     </xsl:variable>
5013     <xsl:variable name="recto.elements.count">
5014       <xsl:choose>
5015         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5016         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5017           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5018         <xsl:otherwise>1</xsl:otherwise>
5019       </xsl:choose>
5020     </xsl:variable>
5021     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5022       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5023     </xsl:if>
5024     <xsl:variable name="verso.content">
5025       <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
5026       <xsl:call-template name="list.of.equations.titlepage.verso"/>
5027     </xsl:variable>
5028     <xsl:variable name="verso.elements.count">
5029       <xsl:choose>
5030         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5031         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5032           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5033         <xsl:otherwise>1</xsl:otherwise>
5034       </xsl:choose>
5035     </xsl:variable>
5036     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5037       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5038     </xsl:if>
5039     <xsl:call-template name="list.of.equations.titlepage.separator"/>
5040   </fo:block>
5041 </xsl:template>
5042
5043 <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
5044   <!-- if an element isn't found in this mode, -->
5045   <!-- try the generic titlepage.mode -->
5046   <xsl:apply-templates select="." mode="titlepage.mode"/>
5047 </xsl:template>
5048
5049 <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
5050   <!-- if an element isn't found in this mode, -->
5051   <!-- try the generic titlepage.mode -->
5052   <xsl:apply-templates select="." mode="titlepage.mode"/>
5053 </xsl:template>
5054
5055 <xsl:template name="list.of.procedures.titlepage.recto">
5056   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5057 <xsl:call-template name="gentext">
5058 <xsl:with-param name="key" select="'ListofProcedures'"/>
5059 </xsl:call-template></fo:block>
5060 </xsl:template>
5061
5062 <xsl:template name="list.of.procedures.titlepage.verso">
5063 </xsl:template>
5064
5065 <xsl:template name="list.of.procedures.titlepage.separator">
5066 </xsl:template>
5067
5068 <xsl:template name="list.of.procedures.titlepage.before.recto">
5069 </xsl:template>
5070
5071 <xsl:template name="list.of.procedures.titlepage.before.verso">
5072 </xsl:template>
5073
5074 <xsl:template name="list.of.procedures.titlepage">
5075   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5076     <xsl:variable name="recto.content">
5077       <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
5078       <xsl:call-template name="list.of.procedures.titlepage.recto"/>
5079     </xsl:variable>
5080     <xsl:variable name="recto.elements.count">
5081       <xsl:choose>
5082         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5083         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5084           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5085         <xsl:otherwise>1</xsl:otherwise>
5086       </xsl:choose>
5087     </xsl:variable>
5088     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5089       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5090     </xsl:if>
5091     <xsl:variable name="verso.content">
5092       <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
5093       <xsl:call-template name="list.of.procedures.titlepage.verso"/>
5094     </xsl:variable>
5095     <xsl:variable name="verso.elements.count">
5096       <xsl:choose>
5097         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5098         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5099           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5100         <xsl:otherwise>1</xsl:otherwise>
5101       </xsl:choose>
5102     </xsl:variable>
5103     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5104       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5105     </xsl:if>
5106     <xsl:call-template name="list.of.procedures.titlepage.separator"/>
5107   </fo:block>
5108 </xsl:template>
5109
5110 <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
5111   <!-- if an element isn't found in this mode, -->
5112   <!-- try the generic titlepage.mode -->
5113   <xsl:apply-templates select="." mode="titlepage.mode"/>
5114 </xsl:template>
5115
5116 <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
5117   <!-- if an element isn't found in this mode, -->
5118   <!-- try the generic titlepage.mode -->
5119   <xsl:apply-templates select="." mode="titlepage.mode"/>
5120 </xsl:template>
5121
5122 <xsl:template name="list.of.unknowns.titlepage.recto">
5123   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
5124 <xsl:call-template name="gentext">
5125 <xsl:with-param name="key" select="'ListofUnknown'"/>
5126 </xsl:call-template></fo:block>
5127 </xsl:template>
5128
5129 <xsl:template name="list.of.unknowns.titlepage.verso">
5130 </xsl:template>
5131
5132 <xsl:template name="list.of.unknowns.titlepage.separator">
5133 </xsl:template>
5134
5135 <xsl:template name="list.of.unknowns.titlepage.before.recto">
5136 </xsl:template>
5137
5138 <xsl:template name="list.of.unknowns.titlepage.before.verso">
5139 </xsl:template>
5140
5141 <xsl:template name="list.of.unknowns.titlepage">
5142   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5143     <xsl:variable name="recto.content">
5144       <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
5145       <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
5146     </xsl:variable>
5147     <xsl:variable name="recto.elements.count">
5148       <xsl:choose>
5149         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5150         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5151           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5152         <xsl:otherwise>1</xsl:otherwise>
5153       </xsl:choose>
5154     </xsl:variable>
5155     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5156       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5157     </xsl:if>
5158     <xsl:variable name="verso.content">
5159       <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
5160       <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
5161     </xsl:variable>
5162     <xsl:variable name="verso.elements.count">
5163       <xsl:choose>
5164         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5165         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5166           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5167         <xsl:otherwise>1</xsl:otherwise>
5168       </xsl:choose>
5169     </xsl:variable>
5170     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5171       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5172     </xsl:if>
5173     <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
5174   </fo:block>
5175 </xsl:template>
5176
5177 <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
5178   <!-- if an element isn't found in this mode, -->
5179   <!-- try the generic titlepage.mode -->
5180   <xsl:apply-templates select="." mode="titlepage.mode"/>
5181 </xsl:template>
5182
5183 <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
5184   <!-- if an element isn't found in this mode, -->
5185   <!-- try the generic titlepage.mode -->
5186   <xsl:apply-templates select="." mode="titlepage.mode"/>
5187 </xsl:template>
5188
5189 </xsl:stylesheet>
5190