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