Imported Upstream version 1.77.1
[platform/upstream/docbook-xsl.git] / fo / titlepage.templates.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
4
5 <!-- This stylesheet was created by template/titlepage.xsl-->
6
7 <xsl:template name="article.titlepage.recto">
8   <xsl:choose>
9     <xsl:when test="articleinfo/title">
10       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
11     </xsl:when>
12     <xsl:when test="artheader/title">
13       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
14     </xsl:when>
15     <xsl:when test="info/title">
16       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
17     </xsl:when>
18     <xsl:when test="title">
19       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
20     </xsl:when>
21   </xsl:choose>
22
23   <xsl:choose>
24     <xsl:when test="articleinfo/subtitle">
25       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
26     </xsl:when>
27     <xsl:when test="artheader/subtitle">
28       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
29     </xsl:when>
30     <xsl:when test="info/subtitle">
31       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
32     </xsl:when>
33     <xsl:when test="subtitle">
34       <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
35     </xsl:when>
36   </xsl:choose>
37
38   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
39   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
40   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
41   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
42   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
43   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
44   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
45   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
46   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
47   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
48   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
49   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
50   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
51   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
52   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
53   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
54   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
55   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
56   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
57   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
58   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
59   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
60   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
61   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
62   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
63   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
64   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
65   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
66   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
67   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
68   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
69   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
70   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
71   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/itermset"/>
72   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/itermset"/>
73   <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/itermset"/>
74 </xsl:template>
75
76 <xsl:template name="article.titlepage.verso">
77 </xsl:template>
78
79 <xsl:template name="article.titlepage.separator">
80 </xsl:template>
81
82 <xsl:template name="article.titlepage.before.recto">
83 </xsl:template>
84
85 <xsl:template name="article.titlepage.before.verso">
86 </xsl:template>
87
88 <xsl:template name="article.titlepage">
89   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
90     <xsl:variable name="recto.content">
91       <xsl:call-template name="article.titlepage.before.recto"/>
92       <xsl:call-template name="article.titlepage.recto"/>
93     </xsl:variable>
94     <xsl:variable name="recto.elements.count">
95       <xsl:choose>
96         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
97         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
98           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
99         <xsl:otherwise>1</xsl:otherwise>
100       </xsl:choose>
101     </xsl:variable>
102     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
103       <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
104     </xsl:if>
105     <xsl:variable name="verso.content">
106       <xsl:call-template name="article.titlepage.before.verso"/>
107       <xsl:call-template name="article.titlepage.verso"/>
108     </xsl:variable>
109     <xsl:variable name="verso.elements.count">
110       <xsl:choose>
111         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
112         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
113           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
114         <xsl:otherwise>1</xsl:otherwise>
115       </xsl:choose>
116     </xsl:variable>
117     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
118       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
119     </xsl:if>
120     <xsl:call-template name="article.titlepage.separator"/>
121   </fo:block>
122 </xsl:template>
123
124 <xsl:template match="*" mode="article.titlepage.recto.mode">
125   <!-- if an element isn't found in this mode, -->
126   <!-- try the generic titlepage.mode -->
127   <xsl:apply-templates select="." mode="titlepage.mode"/>
128 </xsl:template>
129
130 <xsl:template match="*" mode="article.titlepage.verso.mode">
131   <!-- if an element isn't found in this mode, -->
132   <!-- try the generic titlepage.mode -->
133   <xsl:apply-templates select="." mode="titlepage.mode"/>
134 </xsl:template>
135
136 <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
137 <fo:block 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">
138 <xsl:call-template name="component.title">
139 <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
140 </xsl:call-template>
141 </fo:block>
142 </xsl:template>
143
144 <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
145 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
146 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
147 </fo:block>
148 </xsl:template>
149
150 <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
151 <fo:block 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">
152 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
153 </fo:block>
154 </xsl:template>
155
156 <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
157 <fo:block 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">
158 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
159 </fo:block>
160 </xsl:template>
161
162 <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
163 <fo:block 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">
164 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
165 </fo:block>
166 </xsl:template>
167
168 <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
169 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
170 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
171 </fo:block>
172 </xsl:template>
173
174 <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
175 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
176 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
177 </fo:block>
178 </xsl:template>
179
180 <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
181 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
182 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
183 </fo:block>
184 </xsl:template>
185
186 <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
187 <fo:block 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}">
188 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
189 </fo:block>
190 </xsl:template>
191
192 <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
193 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
194 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
195 </fo:block>
196 </xsl:template>
197
198 <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
199 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
200 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
201 </fo:block>
202 </xsl:template>
203
204 <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
205 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
206 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
207 </fo:block>
208 </xsl:template>
209
210 <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
211 <fo:block 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}">
212 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
213 </fo:block>
214 </xsl:template>
215
216 <xsl:template match="itermset" mode="article.titlepage.recto.auto.mode">
217 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
218 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
219 </fo:block>
220 </xsl:template>
221
222 <xsl:template name="set.titlepage.recto">
223   <xsl:choose>
224     <xsl:when test="setinfo/title">
225       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
226     </xsl:when>
227     <xsl:when test="info/title">
228       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
229     </xsl:when>
230     <xsl:when test="title">
231       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
232     </xsl:when>
233   </xsl:choose>
234
235   <xsl:choose>
236     <xsl:when test="setinfo/subtitle">
237       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
238     </xsl:when>
239     <xsl:when test="info/subtitle">
240       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
241     </xsl:when>
242     <xsl:when test="subtitle">
243       <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
244     </xsl:when>
245   </xsl:choose>
246
247   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
248   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
249   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
250   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
251   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
252   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
253   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
254   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
255   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
256   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
257   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
258   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
259   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
260   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
261   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
262   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
263   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
264   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
265   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
266   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
267   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
268   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
269   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/itermset"/>
270   <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/itermset"/>
271 </xsl:template>
272
273 <xsl:template name="set.titlepage.verso">
274 </xsl:template>
275
276 <xsl:template name="set.titlepage.separator">
277 </xsl:template>
278
279 <xsl:template name="set.titlepage.before.recto">
280 </xsl:template>
281
282 <xsl:template name="set.titlepage.before.verso">
283 </xsl:template>
284
285 <xsl:template name="set.titlepage">
286   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
287     <xsl:variable name="recto.content">
288       <xsl:call-template name="set.titlepage.before.recto"/>
289       <xsl:call-template name="set.titlepage.recto"/>
290     </xsl:variable>
291     <xsl:variable name="recto.elements.count">
292       <xsl:choose>
293         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
294         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
295           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
296         <xsl:otherwise>1</xsl:otherwise>
297       </xsl:choose>
298     </xsl:variable>
299     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
300       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
301     </xsl:if>
302     <xsl:variable name="verso.content">
303       <xsl:call-template name="set.titlepage.before.verso"/>
304       <xsl:call-template name="set.titlepage.verso"/>
305     </xsl:variable>
306     <xsl:variable name="verso.elements.count">
307       <xsl:choose>
308         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
309         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
310           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
311         <xsl:otherwise>1</xsl:otherwise>
312       </xsl:choose>
313     </xsl:variable>
314     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
315       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
316     </xsl:if>
317     <xsl:call-template name="set.titlepage.separator"/>
318   </fo:block>
319 </xsl:template>
320
321 <xsl:template match="*" mode="set.titlepage.recto.mode">
322   <!-- if an element isn't found in this mode, -->
323   <!-- try the generic titlepage.mode -->
324   <xsl:apply-templates select="." mode="titlepage.mode"/>
325 </xsl:template>
326
327 <xsl:template match="*" mode="set.titlepage.verso.mode">
328   <!-- if an element isn't found in this mode, -->
329   <!-- try the generic titlepage.mode -->
330   <xsl:apply-templates select="." mode="titlepage.mode"/>
331 </xsl:template>
332
333 <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
334 <fo:block 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}">
335 <xsl:call-template name="division.title">
336 <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
337 </xsl:call-template>
338 </fo:block>
339 </xsl:template>
340
341 <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
342 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
343 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
344 </fo:block>
345 </xsl:template>
346
347 <xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
348 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
349 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
350 </fo:block>
351 </xsl:template>
352
353 <xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
354 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
355 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
356 </fo:block>
357 </xsl:template>
358
359 <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
360 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
361 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
362 </fo:block>
363 </xsl:template>
364
365 <xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
366 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
367 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
368 </fo:block>
369 </xsl:template>
370
371 <xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
372 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
373 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
374 </fo:block>
375 </xsl:template>
376
377 <xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
378 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
379 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
380 </fo:block>
381 </xsl:template>
382
383 <xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
384 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
385 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
386 </fo:block>
387 </xsl:template>
388
389 <xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
390 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
391 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
392 </fo:block>
393 </xsl:template>
394
395 <xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
396 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
397 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
398 </fo:block>
399 </xsl:template>
400
401 <xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
402 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
403 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
404 </fo:block>
405 </xsl:template>
406
407 <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
408 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
409 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
410 </fo:block>
411 </xsl:template>
412
413 <xsl:template match="itermset" mode="set.titlepage.recto.auto.mode">
414 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
415 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
416 </fo:block>
417 </xsl:template>
418
419 <xsl:template name="book.titlepage.recto">
420   <xsl:choose>
421     <xsl:when test="bookinfo/title">
422       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
423     </xsl:when>
424     <xsl:when test="info/title">
425       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
426     </xsl:when>
427     <xsl:when test="title">
428       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
429     </xsl:when>
430   </xsl:choose>
431
432   <xsl:choose>
433     <xsl:when test="bookinfo/subtitle">
434       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
435     </xsl:when>
436     <xsl:when test="info/subtitle">
437       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
438     </xsl:when>
439     <xsl:when test="subtitle">
440       <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
441     </xsl:when>
442   </xsl:choose>
443
444   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
445   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
446   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
447   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
448   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
449   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
450   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/itermset"/>
451   <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/itermset"/>
452 </xsl:template>
453
454 <xsl:template name="book.titlepage.verso">
455   <xsl:choose>
456     <xsl:when test="bookinfo/title">
457       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
458     </xsl:when>
459     <xsl:when test="info/title">
460       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
461     </xsl:when>
462     <xsl:when test="title">
463       <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
464     </xsl:when>
465   </xsl:choose>
466
467   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
468   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
469   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
470   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
471   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
472   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
473   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
474   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
475   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
476   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
477   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
478   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
479   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
480   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
481   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
482   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
483   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
484   <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
485 </xsl:template>
486
487 <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
488 </xsl:template>
489
490 <xsl:template name="book.titlepage.before.recto">
491 </xsl:template>
492
493 <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
494 </xsl:template>
495
496 <xsl:template name="book.titlepage">
497   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
498     <xsl:variable name="recto.content">
499       <xsl:call-template name="book.titlepage.before.recto"/>
500       <xsl:call-template name="book.titlepage.recto"/>
501     </xsl:variable>
502     <xsl:variable name="recto.elements.count">
503       <xsl:choose>
504         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
505         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
506           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
507         <xsl:otherwise>1</xsl:otherwise>
508       </xsl:choose>
509     </xsl:variable>
510     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
511       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
512     </xsl:if>
513     <xsl:variable name="verso.content">
514       <xsl:call-template name="book.titlepage.before.verso"/>
515       <xsl:call-template name="book.titlepage.verso"/>
516     </xsl:variable>
517     <xsl:variable name="verso.elements.count">
518       <xsl:choose>
519         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
520         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
521           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
522         <xsl:otherwise>1</xsl:otherwise>
523       </xsl:choose>
524     </xsl:variable>
525     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
526       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
527     </xsl:if>
528     <xsl:call-template name="book.titlepage.separator"/>
529   </fo:block>
530 </xsl:template>
531
532 <xsl:template match="*" mode="book.titlepage.recto.mode">
533   <!-- if an element isn't found in this mode, -->
534   <!-- try the generic titlepage.mode -->
535   <xsl:apply-templates select="." mode="titlepage.mode"/>
536 </xsl:template>
537
538 <xsl:template match="*" mode="book.titlepage.verso.mode">
539   <!-- if an element isn't found in this mode, -->
540   <!-- try the generic titlepage.mode -->
541   <xsl:apply-templates select="." mode="titlepage.mode"/>
542 </xsl:template>
543
544 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
545 <fo:block 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}">
546 <xsl:call-template name="division.title">
547 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
548 </xsl:call-template>
549 </fo:block>
550 </xsl:template>
551
552 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
553 <fo:block 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}">
554 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
555 </fo:block>
556 </xsl:template>
557
558 <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
559 <fo:block 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">
560 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
561 </fo:block>
562 </xsl:template>
563
564 <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
565 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
566 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
567 </fo:block>
568 </xsl:template>
569
570 <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
571 <fo:block 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">
572 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
573 </fo:block>
574 </xsl:template>
575
576 <xsl:template match="itermset" mode="book.titlepage.recto.auto.mode">
577 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style">
578 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
579 </fo:block>
580 </xsl:template>
581
582 <xsl:template match="title" mode="book.titlepage.verso.auto.mode">
583 <fo:block 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}">
584 <xsl:call-template name="book.verso.title">
585 </xsl:call-template>
586 </fo:block>
587 </xsl:template>
588
589 <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
590 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
591 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
592 </fo:block>
593 </xsl:template>
594
595 <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
596 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
597 <xsl:call-template name="verso.authorgroup">
598 </xsl:call-template>
599 </fo:block>
600 </xsl:template>
601
602 <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
603 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
604 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
605 </fo:block>
606 </xsl:template>
607
608 <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
609 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
610 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
611 </fo:block>
612 </xsl:template>
613
614 <xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
615 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
616 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
617 </fo:block>
618 </xsl:template>
619
620 <xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
621 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
622 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
623 </fo:block>
624 </xsl:template>
625
626 <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
627 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
628 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
629 </fo:block>
630 </xsl:template>
631
632 <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
633 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
634 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
635 </fo:block>
636 </xsl:template>
637
638 <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
639 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
640 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
641 </fo:block>
642 </xsl:template>
643
644 <xsl:template name="part.titlepage.recto">
645   <xsl:choose>
646     <xsl:when test="partinfo/title">
647       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
648     </xsl:when>
649     <xsl:when test="docinfo/title">
650       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
651     </xsl:when>
652     <xsl:when test="info/title">
653       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
654     </xsl:when>
655     <xsl:when test="title">
656       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
657     </xsl:when>
658   </xsl:choose>
659
660   <xsl:choose>
661     <xsl:when test="partinfo/subtitle">
662       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
663     </xsl:when>
664     <xsl:when test="docinfo/subtitle">
665       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
666     </xsl:when>
667     <xsl:when test="info/subtitle">
668       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
669     </xsl:when>
670     <xsl:when test="subtitle">
671       <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
672     </xsl:when>
673   </xsl:choose>
674
675   <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/itermset"/>
676   <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/itermset"/>
677   <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/itermset"/>
678 </xsl:template>
679
680 <xsl:template name="part.titlepage.verso">
681 </xsl:template>
682
683 <xsl:template name="part.titlepage.separator">
684 </xsl:template>
685
686 <xsl:template name="part.titlepage.before.recto">
687 </xsl:template>
688
689 <xsl:template name="part.titlepage.before.verso">
690 </xsl:template>
691
692 <xsl:template name="part.titlepage">
693   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
694     <xsl:variable name="recto.content">
695       <xsl:call-template name="part.titlepage.before.recto"/>
696       <xsl:call-template name="part.titlepage.recto"/>
697     </xsl:variable>
698     <xsl:variable name="recto.elements.count">
699       <xsl:choose>
700         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
701         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
702           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
703         <xsl:otherwise>1</xsl:otherwise>
704       </xsl:choose>
705     </xsl:variable>
706     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
707       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
708     </xsl:if>
709     <xsl:variable name="verso.content">
710       <xsl:call-template name="part.titlepage.before.verso"/>
711       <xsl:call-template name="part.titlepage.verso"/>
712     </xsl:variable>
713     <xsl:variable name="verso.elements.count">
714       <xsl:choose>
715         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
716         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
717           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
718         <xsl:otherwise>1</xsl:otherwise>
719       </xsl:choose>
720     </xsl:variable>
721     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
722       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
723     </xsl:if>
724     <xsl:call-template name="part.titlepage.separator"/>
725   </fo:block>
726 </xsl:template>
727
728 <xsl:template match="*" mode="part.titlepage.recto.mode">
729   <!-- if an element isn't found in this mode, -->
730   <!-- try the generic titlepage.mode -->
731   <xsl:apply-templates select="." mode="titlepage.mode"/>
732 </xsl:template>
733
734 <xsl:template match="*" mode="part.titlepage.verso.mode">
735   <!-- if an element isn't found in this mode, -->
736   <!-- try the generic titlepage.mode -->
737   <xsl:apply-templates select="." mode="titlepage.mode"/>
738 </xsl:template>
739
740 <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
741 <fo:block 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}">
742 <xsl:call-template name="division.title">
743 <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
744 </xsl:call-template>
745 </fo:block>
746 </xsl:template>
747
748 <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
749 <fo:block 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}">
750 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
751 </fo:block>
752 </xsl:template>
753
754 <xsl:template match="itermset" mode="part.titlepage.recto.auto.mode">
755 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style">
756 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
757 </fo:block>
758 </xsl:template>
759
760 <xsl:template name="partintro.titlepage.recto">
761   <xsl:choose>
762     <xsl:when test="partintroinfo/title">
763       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
764     </xsl:when>
765     <xsl:when test="docinfo/title">
766       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
767     </xsl:when>
768     <xsl:when test="info/title">
769       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
770     </xsl:when>
771     <xsl:when test="title">
772       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
773     </xsl:when>
774   </xsl:choose>
775
776   <xsl:choose>
777     <xsl:when test="partintroinfo/subtitle">
778       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
779     </xsl:when>
780     <xsl:when test="docinfo/subtitle">
781       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
782     </xsl:when>
783     <xsl:when test="info/subtitle">
784       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
785     </xsl:when>
786     <xsl:when test="subtitle">
787       <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
788     </xsl:when>
789   </xsl:choose>
790
791   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
792   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
793   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
794   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
795   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
796   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
797   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
798   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
799   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
800   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
801   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
802   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
803   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
804   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
805   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
806   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
807   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
808   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
809   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
810   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
811   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
812   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
813   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
814   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
815   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
816   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
817   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
818   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
819   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
820   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
821   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
822   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
823   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
824   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/itermset"/>
825   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/itermset"/>
826   <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/itermset"/>
827 </xsl:template>
828
829 <xsl:template name="partintro.titlepage.verso">
830 </xsl:template>
831
832 <xsl:template name="partintro.titlepage.separator">
833 </xsl:template>
834
835 <xsl:template name="partintro.titlepage.before.recto">
836 </xsl:template>
837
838 <xsl:template name="partintro.titlepage.before.verso">
839 </xsl:template>
840
841 <xsl:template name="partintro.titlepage">
842   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
843     <xsl:variable name="recto.content">
844       <xsl:call-template name="partintro.titlepage.before.recto"/>
845       <xsl:call-template name="partintro.titlepage.recto"/>
846     </xsl:variable>
847     <xsl:variable name="recto.elements.count">
848       <xsl:choose>
849         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
850         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
851           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
852         <xsl:otherwise>1</xsl:otherwise>
853       </xsl:choose>
854     </xsl:variable>
855     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
856       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
857     </xsl:if>
858     <xsl:variable name="verso.content">
859       <xsl:call-template name="partintro.titlepage.before.verso"/>
860       <xsl:call-template name="partintro.titlepage.verso"/>
861     </xsl:variable>
862     <xsl:variable name="verso.elements.count">
863       <xsl:choose>
864         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
865         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
866           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
867         <xsl:otherwise>1</xsl:otherwise>
868       </xsl:choose>
869     </xsl:variable>
870     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
871       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
872     </xsl:if>
873     <xsl:call-template name="partintro.titlepage.separator"/>
874   </fo:block>
875 </xsl:template>
876
877 <xsl:template match="*" mode="partintro.titlepage.recto.mode">
878   <!-- if an element isn't found in this mode, -->
879   <!-- try the generic titlepage.mode -->
880   <xsl:apply-templates select="." mode="titlepage.mode"/>
881 </xsl:template>
882
883 <xsl:template match="*" mode="partintro.titlepage.verso.mode">
884   <!-- if an element isn't found in this mode, -->
885   <!-- try the generic titlepage.mode -->
886   <xsl:apply-templates select="." mode="titlepage.mode"/>
887 </xsl:template>
888
889 <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
890 <fo:block 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}">
891 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
892 </fo:block>
893 </xsl:template>
894
895 <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
896 <fo:block 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}">
897 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
898 </fo:block>
899 </xsl:template>
900
901 <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
902 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
903 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
904 </fo:block>
905 </xsl:template>
906
907 <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
908 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
909 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
910 </fo:block>
911 </xsl:template>
912
913 <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
914 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
915 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
916 </fo:block>
917 </xsl:template>
918
919 <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
920 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
921 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
922 </fo:block>
923 </xsl:template>
924
925 <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
926 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
927 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
928 </fo:block>
929 </xsl:template>
930
931 <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
932 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
933 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
934 </fo:block>
935 </xsl:template>
936
937 <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
938 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
939 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
940 </fo:block>
941 </xsl:template>
942
943 <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
944 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
945 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
946 </fo:block>
947 </xsl:template>
948
949 <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
950 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
951 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
952 </fo:block>
953 </xsl:template>
954
955 <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
956 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
957 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
958 </fo:block>
959 </xsl:template>
960
961 <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
962 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
963 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
964 </fo:block>
965 </xsl:template>
966
967 <xsl:template match="itermset" mode="partintro.titlepage.recto.auto.mode">
968 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
969 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
970 </fo:block>
971 </xsl:template>
972
973 <xsl:template name="reference.titlepage.recto">
974   <xsl:choose>
975     <xsl:when test="referenceinfo/title">
976       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
977     </xsl:when>
978     <xsl:when test="docinfo/title">
979       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
980     </xsl:when>
981     <xsl:when test="info/title">
982       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
983     </xsl:when>
984     <xsl:when test="title">
985       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
986     </xsl:when>
987   </xsl:choose>
988
989   <xsl:choose>
990     <xsl:when test="referenceinfo/subtitle">
991       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
992     </xsl:when>
993     <xsl:when test="docinfo/subtitle">
994       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
995     </xsl:when>
996     <xsl:when test="info/subtitle">
997       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
998     </xsl:when>
999     <xsl:when test="subtitle">
1000       <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
1001     </xsl:when>
1002   </xsl:choose>
1003
1004   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
1005   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1006   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
1007   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
1008   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1009   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
1010   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
1011   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
1012   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
1013   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
1014   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1015   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
1016   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
1017   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1018   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1019   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
1020   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1021   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
1022   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
1023   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1024   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
1025   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
1026   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1027   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
1028   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
1029   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
1030   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
1031   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
1032   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1033   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
1034   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
1035   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1036   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
1037   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/itermset"/>
1038   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1039   <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/itermset"/>
1040 </xsl:template>
1041
1042 <xsl:template name="reference.titlepage.verso">
1043 </xsl:template>
1044
1045 <xsl:template name="reference.titlepage.separator">
1046 </xsl:template>
1047
1048 <xsl:template name="reference.titlepage.before.recto">
1049 </xsl:template>
1050
1051 <xsl:template name="reference.titlepage.before.verso">
1052 </xsl:template>
1053
1054 <xsl:template name="reference.titlepage">
1055   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1056     <xsl:variable name="recto.content">
1057       <xsl:call-template name="reference.titlepage.before.recto"/>
1058       <xsl:call-template name="reference.titlepage.recto"/>
1059     </xsl:variable>
1060     <xsl:variable name="recto.elements.count">
1061       <xsl:choose>
1062         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1063         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1064           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1065         <xsl:otherwise>1</xsl:otherwise>
1066       </xsl:choose>
1067     </xsl:variable>
1068     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1069       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1070     </xsl:if>
1071     <xsl:variable name="verso.content">
1072       <xsl:call-template name="reference.titlepage.before.verso"/>
1073       <xsl:call-template name="reference.titlepage.verso"/>
1074     </xsl:variable>
1075     <xsl:variable name="verso.elements.count">
1076       <xsl:choose>
1077         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1078         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1079           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1080         <xsl:otherwise>1</xsl:otherwise>
1081       </xsl:choose>
1082     </xsl:variable>
1083     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1084       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1085     </xsl:if>
1086     <xsl:call-template name="reference.titlepage.separator"/>
1087   </fo:block>
1088 </xsl:template>
1089
1090 <xsl:template match="*" mode="reference.titlepage.recto.mode">
1091   <!-- if an element isn't found in this mode, -->
1092   <!-- try the generic titlepage.mode -->
1093   <xsl:apply-templates select="." mode="titlepage.mode"/>
1094 </xsl:template>
1095
1096 <xsl:template match="*" mode="reference.titlepage.verso.mode">
1097   <!-- if an element isn't found in this mode, -->
1098   <!-- try the generic titlepage.mode -->
1099   <xsl:apply-templates select="." mode="titlepage.mode"/>
1100 </xsl:template>
1101
1102 <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
1103 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
1104 <xsl:call-template name="division.title">
1105 <xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
1106 </xsl:call-template>
1107 </fo:block>
1108 </xsl:template>
1109
1110 <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
1111 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
1112 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1113 </fo:block>
1114 </xsl:template>
1115
1116 <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
1117 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1118 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1119 </fo:block>
1120 </xsl:template>
1121
1122 <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
1123 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1124 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1125 </fo:block>
1126 </xsl:template>
1127
1128 <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
1129 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1130 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1131 </fo:block>
1132 </xsl:template>
1133
1134 <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
1135 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1136 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1137 </fo:block>
1138 </xsl:template>
1139
1140 <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
1141 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1142 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1143 </fo:block>
1144 </xsl:template>
1145
1146 <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
1147 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1148 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1149 </fo:block>
1150 </xsl:template>
1151
1152 <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
1153 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1154 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1155 </fo:block>
1156 </xsl:template>
1157
1158 <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
1159 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1160 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1161 </fo:block>
1162 </xsl:template>
1163
1164 <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
1165 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1166 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1167 </fo:block>
1168 </xsl:template>
1169
1170 <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
1171 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1172 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1173 </fo:block>
1174 </xsl:template>
1175
1176 <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
1177 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1178 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1179 </fo:block>
1180 </xsl:template>
1181
1182 <xsl:template match="itermset" mode="reference.titlepage.recto.auto.mode">
1183 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
1184 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1185 </fo:block>
1186 </xsl:template>
1187
1188 <xsl:template name="refsynopsisdiv.titlepage.recto">
1189   <xsl:choose>
1190     <xsl:when test="refsynopsisdivinfo/title">
1191       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
1192     </xsl:when>
1193     <xsl:when test="docinfo/title">
1194       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
1195     </xsl:when>
1196     <xsl:when test="info/title">
1197       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
1198     </xsl:when>
1199     <xsl:when test="title">
1200       <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
1201     </xsl:when>
1202   </xsl:choose>
1203
1204   <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/itermset"/>
1205   <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1206   <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/itermset"/>
1207 </xsl:template>
1208
1209 <xsl:template name="refsynopsisdiv.titlepage.verso">
1210 </xsl:template>
1211
1212 <xsl:template name="refsynopsisdiv.titlepage.separator">
1213 </xsl:template>
1214
1215 <xsl:template name="refsynopsisdiv.titlepage.before.recto">
1216 </xsl:template>
1217
1218 <xsl:template name="refsynopsisdiv.titlepage.before.verso">
1219 </xsl:template>
1220
1221 <xsl:template name="refsynopsisdiv.titlepage">
1222   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1223     <xsl:variable name="recto.content">
1224       <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
1225       <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
1226     </xsl:variable>
1227     <xsl:variable name="recto.elements.count">
1228       <xsl:choose>
1229         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1230         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1231           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1232         <xsl:otherwise>1</xsl:otherwise>
1233       </xsl:choose>
1234     </xsl:variable>
1235     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1236       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1237     </xsl:if>
1238     <xsl:variable name="verso.content">
1239       <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
1240       <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
1241     </xsl:variable>
1242     <xsl:variable name="verso.elements.count">
1243       <xsl:choose>
1244         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1245         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1246           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1247         <xsl:otherwise>1</xsl:otherwise>
1248       </xsl:choose>
1249     </xsl:variable>
1250     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1251       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1252     </xsl:if>
1253     <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
1254   </fo:block>
1255 </xsl:template>
1256
1257 <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
1258   <!-- if an element isn't found in this mode, -->
1259   <!-- try the generic titlepage.mode -->
1260   <xsl:apply-templates select="." mode="titlepage.mode"/>
1261 </xsl:template>
1262
1263 <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
1264   <!-- if an element isn't found in this mode, -->
1265   <!-- try the generic titlepage.mode -->
1266   <xsl:apply-templates select="." mode="titlepage.mode"/>
1267 </xsl:template>
1268
1269 <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
1270 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
1271 <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
1272 </fo:block>
1273 </xsl:template>
1274
1275 <xsl:template match="itermset" mode="refsynopsisdiv.titlepage.recto.auto.mode">
1276 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style">
1277 <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
1278 </fo:block>
1279 </xsl:template>
1280
1281 <xsl:template name="refsection.titlepage.recto">
1282   <xsl:choose>
1283     <xsl:when test="refsectioninfo/title">
1284       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
1285     </xsl:when>
1286     <xsl:when test="docinfo/title">
1287       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
1288     </xsl:when>
1289     <xsl:when test="info/title">
1290       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
1291     </xsl:when>
1292     <xsl:when test="title">
1293       <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
1294     </xsl:when>
1295   </xsl:choose>
1296
1297   <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/itermset"/>
1298   <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1299   <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/itermset"/>
1300 </xsl:template>
1301
1302 <xsl:template name="refsection.titlepage.verso">
1303 </xsl:template>
1304
1305 <xsl:template name="refsection.titlepage.separator">
1306 </xsl:template>
1307
1308 <xsl:template name="refsection.titlepage.before.recto">
1309 </xsl:template>
1310
1311 <xsl:template name="refsection.titlepage.before.verso">
1312 </xsl:template>
1313
1314 <xsl:template name="refsection.titlepage">
1315   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1316     <xsl:variable name="recto.content">
1317       <xsl:call-template name="refsection.titlepage.before.recto"/>
1318       <xsl:call-template name="refsection.titlepage.recto"/>
1319     </xsl:variable>
1320     <xsl:variable name="recto.elements.count">
1321       <xsl:choose>
1322         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1323         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1324           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1325         <xsl:otherwise>1</xsl:otherwise>
1326       </xsl:choose>
1327     </xsl:variable>
1328     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1329       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1330     </xsl:if>
1331     <xsl:variable name="verso.content">
1332       <xsl:call-template name="refsection.titlepage.before.verso"/>
1333       <xsl:call-template name="refsection.titlepage.verso"/>
1334     </xsl:variable>
1335     <xsl:variable name="verso.elements.count">
1336       <xsl:choose>
1337         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1338         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1339           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1340         <xsl:otherwise>1</xsl:otherwise>
1341       </xsl:choose>
1342     </xsl:variable>
1343     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1344       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1345     </xsl:if>
1346     <xsl:call-template name="refsection.titlepage.separator"/>
1347   </fo:block>
1348 </xsl:template>
1349
1350 <xsl:template match="*" mode="refsection.titlepage.recto.mode">
1351   <!-- if an element isn't found in this mode, -->
1352   <!-- try the generic titlepage.mode -->
1353   <xsl:apply-templates select="." mode="titlepage.mode"/>
1354 </xsl:template>
1355
1356 <xsl:template match="*" mode="refsection.titlepage.verso.mode">
1357   <!-- if an element isn't found in this mode, -->
1358   <!-- try the generic titlepage.mode -->
1359   <xsl:apply-templates select="." mode="titlepage.mode"/>
1360 </xsl:template>
1361
1362 <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
1363 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
1364 <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
1365 </fo:block>
1366 </xsl:template>
1367
1368 <xsl:template match="itermset" mode="refsection.titlepage.recto.auto.mode">
1369 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style">
1370 <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
1371 </fo:block>
1372 </xsl:template>
1373
1374 <xsl:template name="refsect1.titlepage.recto">
1375   <xsl:choose>
1376     <xsl:when test="refsect1info/title">
1377       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
1378     </xsl:when>
1379     <xsl:when test="docinfo/title">
1380       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
1381     </xsl:when>
1382     <xsl:when test="info/title">
1383       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
1384     </xsl:when>
1385     <xsl:when test="title">
1386       <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
1387     </xsl:when>
1388   </xsl:choose>
1389
1390   <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/itermset"/>
1391   <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1392   <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/itermset"/>
1393 </xsl:template>
1394
1395 <xsl:template name="refsect1.titlepage.verso">
1396 </xsl:template>
1397
1398 <xsl:template name="refsect1.titlepage.separator">
1399 </xsl:template>
1400
1401 <xsl:template name="refsect1.titlepage.before.recto">
1402 </xsl:template>
1403
1404 <xsl:template name="refsect1.titlepage.before.verso">
1405 </xsl:template>
1406
1407 <xsl:template name="refsect1.titlepage">
1408   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1409     <xsl:variable name="recto.content">
1410       <xsl:call-template name="refsect1.titlepage.before.recto"/>
1411       <xsl:call-template name="refsect1.titlepage.recto"/>
1412     </xsl:variable>
1413     <xsl:variable name="recto.elements.count">
1414       <xsl:choose>
1415         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1416         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1417           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1418         <xsl:otherwise>1</xsl:otherwise>
1419       </xsl:choose>
1420     </xsl:variable>
1421     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1422       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1423     </xsl:if>
1424     <xsl:variable name="verso.content">
1425       <xsl:call-template name="refsect1.titlepage.before.verso"/>
1426       <xsl:call-template name="refsect1.titlepage.verso"/>
1427     </xsl:variable>
1428     <xsl:variable name="verso.elements.count">
1429       <xsl:choose>
1430         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1431         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1432           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1433         <xsl:otherwise>1</xsl:otherwise>
1434       </xsl:choose>
1435     </xsl:variable>
1436     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1437       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1438     </xsl:if>
1439     <xsl:call-template name="refsect1.titlepage.separator"/>
1440   </fo:block>
1441 </xsl:template>
1442
1443 <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
1444   <!-- if an element isn't found in this mode, -->
1445   <!-- try the generic titlepage.mode -->
1446   <xsl:apply-templates select="." mode="titlepage.mode"/>
1447 </xsl:template>
1448
1449 <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
1450   <!-- if an element isn't found in this mode, -->
1451   <!-- try the generic titlepage.mode -->
1452   <xsl:apply-templates select="." mode="titlepage.mode"/>
1453 </xsl:template>
1454
1455 <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
1456 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
1457 <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
1458 </fo:block>
1459 </xsl:template>
1460
1461 <xsl:template match="itermset" mode="refsect1.titlepage.recto.auto.mode">
1462 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style">
1463 <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
1464 </fo:block>
1465 </xsl:template>
1466
1467 <xsl:template name="refsect2.titlepage.recto">
1468   <xsl:choose>
1469     <xsl:when test="refsect2info/title">
1470       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
1471     </xsl:when>
1472     <xsl:when test="docinfo/title">
1473       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
1474     </xsl:when>
1475     <xsl:when test="info/title">
1476       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
1477     </xsl:when>
1478     <xsl:when test="title">
1479       <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
1480     </xsl:when>
1481   </xsl:choose>
1482
1483   <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/itermset"/>
1484   <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1485   <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/itermset"/>
1486 </xsl:template>
1487
1488 <xsl:template name="refsect2.titlepage.verso">
1489 </xsl:template>
1490
1491 <xsl:template name="refsect2.titlepage.separator">
1492 </xsl:template>
1493
1494 <xsl:template name="refsect2.titlepage.before.recto">
1495 </xsl:template>
1496
1497 <xsl:template name="refsect2.titlepage.before.verso">
1498 </xsl:template>
1499
1500 <xsl:template name="refsect2.titlepage">
1501   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1502     <xsl:variable name="recto.content">
1503       <xsl:call-template name="refsect2.titlepage.before.recto"/>
1504       <xsl:call-template name="refsect2.titlepage.recto"/>
1505     </xsl:variable>
1506     <xsl:variable name="recto.elements.count">
1507       <xsl:choose>
1508         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1509         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1510           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1511         <xsl:otherwise>1</xsl:otherwise>
1512       </xsl:choose>
1513     </xsl:variable>
1514     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1515       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1516     </xsl:if>
1517     <xsl:variable name="verso.content">
1518       <xsl:call-template name="refsect2.titlepage.before.verso"/>
1519       <xsl:call-template name="refsect2.titlepage.verso"/>
1520     </xsl:variable>
1521     <xsl:variable name="verso.elements.count">
1522       <xsl:choose>
1523         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1524         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1525           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1526         <xsl:otherwise>1</xsl:otherwise>
1527       </xsl:choose>
1528     </xsl:variable>
1529     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1530       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1531     </xsl:if>
1532     <xsl:call-template name="refsect2.titlepage.separator"/>
1533   </fo:block>
1534 </xsl:template>
1535
1536 <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
1537   <!-- if an element isn't found in this mode, -->
1538   <!-- try the generic titlepage.mode -->
1539   <xsl:apply-templates select="." mode="titlepage.mode"/>
1540 </xsl:template>
1541
1542 <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
1543   <!-- if an element isn't found in this mode, -->
1544   <!-- try the generic titlepage.mode -->
1545   <xsl:apply-templates select="." mode="titlepage.mode"/>
1546 </xsl:template>
1547
1548 <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
1549 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
1550 <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
1551 </fo:block>
1552 </xsl:template>
1553
1554 <xsl:template match="itermset" mode="refsect2.titlepage.recto.auto.mode">
1555 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style">
1556 <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
1557 </fo:block>
1558 </xsl:template>
1559
1560 <xsl:template name="refsect3.titlepage.recto">
1561   <xsl:choose>
1562     <xsl:when test="refsect3info/title">
1563       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
1564     </xsl:when>
1565     <xsl:when test="docinfo/title">
1566       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
1567     </xsl:when>
1568     <xsl:when test="info/title">
1569       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
1570     </xsl:when>
1571     <xsl:when test="title">
1572       <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
1573     </xsl:when>
1574   </xsl:choose>
1575
1576   <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/itermset"/>
1577   <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1578   <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/itermset"/>
1579 </xsl:template>
1580
1581 <xsl:template name="refsect3.titlepage.verso">
1582 </xsl:template>
1583
1584 <xsl:template name="refsect3.titlepage.separator">
1585 </xsl:template>
1586
1587 <xsl:template name="refsect3.titlepage.before.recto">
1588 </xsl:template>
1589
1590 <xsl:template name="refsect3.titlepage.before.verso">
1591 </xsl:template>
1592
1593 <xsl:template name="refsect3.titlepage">
1594   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1595     <xsl:variable name="recto.content">
1596       <xsl:call-template name="refsect3.titlepage.before.recto"/>
1597       <xsl:call-template name="refsect3.titlepage.recto"/>
1598     </xsl:variable>
1599     <xsl:variable name="recto.elements.count">
1600       <xsl:choose>
1601         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1602         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1603           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1604         <xsl:otherwise>1</xsl:otherwise>
1605       </xsl:choose>
1606     </xsl:variable>
1607     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1608       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1609     </xsl:if>
1610     <xsl:variable name="verso.content">
1611       <xsl:call-template name="refsect3.titlepage.before.verso"/>
1612       <xsl:call-template name="refsect3.titlepage.verso"/>
1613     </xsl:variable>
1614     <xsl:variable name="verso.elements.count">
1615       <xsl:choose>
1616         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1617         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1618           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1619         <xsl:otherwise>1</xsl:otherwise>
1620       </xsl:choose>
1621     </xsl:variable>
1622     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1623       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1624     </xsl:if>
1625     <xsl:call-template name="refsect3.titlepage.separator"/>
1626   </fo:block>
1627 </xsl:template>
1628
1629 <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
1630   <!-- if an element isn't found in this mode, -->
1631   <!-- try the generic titlepage.mode -->
1632   <xsl:apply-templates select="." mode="titlepage.mode"/>
1633 </xsl:template>
1634
1635 <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
1636   <!-- if an element isn't found in this mode, -->
1637   <!-- try the generic titlepage.mode -->
1638   <xsl:apply-templates select="." mode="titlepage.mode"/>
1639 </xsl:template>
1640
1641 <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
1642 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
1643 <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
1644 </fo:block>
1645 </xsl:template>
1646
1647 <xsl:template match="itermset" mode="refsect3.titlepage.recto.auto.mode">
1648 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style">
1649 <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
1650 </fo:block>
1651 </xsl:template>
1652
1653 <xsl:template name="dedication.titlepage.recto">
1654   <fo:block 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">
1655 <xsl:call-template name="component.title">
1656 <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
1657 </xsl:call-template></fo:block>
1658   <xsl:choose>
1659     <xsl:when test="dedicationinfo/subtitle">
1660       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
1661     </xsl:when>
1662     <xsl:when test="docinfo/subtitle">
1663       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1664     </xsl:when>
1665     <xsl:when test="info/subtitle">
1666       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
1667     </xsl:when>
1668     <xsl:when test="subtitle">
1669       <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
1670     </xsl:when>
1671   </xsl:choose>
1672
1673   <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/itermset"/>
1674   <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1675   <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/itermset"/>
1676 </xsl:template>
1677
1678 <xsl:template name="dedication.titlepage.verso">
1679 </xsl:template>
1680
1681 <xsl:template name="dedication.titlepage.separator">
1682 </xsl:template>
1683
1684 <xsl:template name="dedication.titlepage.before.recto">
1685 </xsl:template>
1686
1687 <xsl:template name="dedication.titlepage.before.verso">
1688 </xsl:template>
1689
1690 <xsl:template name="dedication.titlepage">
1691   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1692     <xsl:variable name="recto.content">
1693       <xsl:call-template name="dedication.titlepage.before.recto"/>
1694       <xsl:call-template name="dedication.titlepage.recto"/>
1695     </xsl:variable>
1696     <xsl:variable name="recto.elements.count">
1697       <xsl:choose>
1698         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1699         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1700           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1701         <xsl:otherwise>1</xsl:otherwise>
1702       </xsl:choose>
1703     </xsl:variable>
1704     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1705       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1706     </xsl:if>
1707     <xsl:variable name="verso.content">
1708       <xsl:call-template name="dedication.titlepage.before.verso"/>
1709       <xsl:call-template name="dedication.titlepage.verso"/>
1710     </xsl:variable>
1711     <xsl:variable name="verso.elements.count">
1712       <xsl:choose>
1713         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1714         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1715           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1716         <xsl:otherwise>1</xsl:otherwise>
1717       </xsl:choose>
1718     </xsl:variable>
1719     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1720       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1721     </xsl:if>
1722     <xsl:call-template name="dedication.titlepage.separator"/>
1723   </fo:block>
1724 </xsl:template>
1725
1726 <xsl:template match="*" mode="dedication.titlepage.recto.mode">
1727   <!-- if an element isn't found in this mode, -->
1728   <!-- try the generic titlepage.mode -->
1729   <xsl:apply-templates select="." mode="titlepage.mode"/>
1730 </xsl:template>
1731
1732 <xsl:template match="*" mode="dedication.titlepage.verso.mode">
1733   <!-- if an element isn't found in this mode, -->
1734   <!-- try the generic titlepage.mode -->
1735   <xsl:apply-templates select="." mode="titlepage.mode"/>
1736 </xsl:template>
1737
1738 <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
1739 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
1740 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1741 </fo:block>
1742 </xsl:template>
1743
1744 <xsl:template match="itermset" mode="dedication.titlepage.recto.auto.mode">
1745 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style">
1746 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1747 </fo:block>
1748 </xsl:template>
1749
1750 <xsl:template name="acknowledgements.titlepage.recto">
1751   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
1752 <xsl:call-template name="component.title">
1753 <xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
1754 </xsl:call-template></fo:block>
1755   <xsl:choose>
1756     <xsl:when test="acknowledgementsinfo/subtitle">
1757       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
1758     </xsl:when>
1759     <xsl:when test="docinfo/subtitle">
1760       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1761     </xsl:when>
1762     <xsl:when test="info/subtitle">
1763       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
1764     </xsl:when>
1765     <xsl:when test="subtitle">
1766       <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
1767     </xsl:when>
1768   </xsl:choose>
1769
1770   <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/itermset"/>
1771   <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1772   <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/itermset"/>
1773 </xsl:template>
1774
1775 <xsl:template name="acknowledgements.titlepage.verso">
1776 </xsl:template>
1777
1778 <xsl:template name="acknowledgements.titlepage.separator">
1779 </xsl:template>
1780
1781 <xsl:template name="acknowledgements.titlepage.before.recto">
1782 </xsl:template>
1783
1784 <xsl:template name="acknowledgements.titlepage.before.verso">
1785 </xsl:template>
1786
1787 <xsl:template name="acknowledgements.titlepage">
1788   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1789     <xsl:variable name="recto.content">
1790       <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
1791       <xsl:call-template name="acknowledgements.titlepage.recto"/>
1792     </xsl:variable>
1793     <xsl:variable name="recto.elements.count">
1794       <xsl:choose>
1795         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1796         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1797           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1798         <xsl:otherwise>1</xsl:otherwise>
1799       </xsl:choose>
1800     </xsl:variable>
1801     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1802       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1803     </xsl:if>
1804     <xsl:variable name="verso.content">
1805       <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
1806       <xsl:call-template name="acknowledgements.titlepage.verso"/>
1807     </xsl:variable>
1808     <xsl:variable name="verso.elements.count">
1809       <xsl:choose>
1810         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1811         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1812           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1813         <xsl:otherwise>1</xsl:otherwise>
1814       </xsl:choose>
1815     </xsl:variable>
1816     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1817       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1818     </xsl:if>
1819     <xsl:call-template name="acknowledgements.titlepage.separator"/>
1820   </fo:block>
1821 </xsl:template>
1822
1823 <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
1824   <!-- if an element isn't found in this mode, -->
1825   <!-- try the generic titlepage.mode -->
1826   <xsl:apply-templates select="." mode="titlepage.mode"/>
1827 </xsl:template>
1828
1829 <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
1830   <!-- if an element isn't found in this mode, -->
1831   <!-- try the generic titlepage.mode -->
1832   <xsl:apply-templates select="." mode="titlepage.mode"/>
1833 </xsl:template>
1834
1835 <xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
1836 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" font-family="{$title.fontset}">
1837 <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1838 </fo:block>
1839 </xsl:template>
1840
1841 <xsl:template match="itermset" mode="acknowledgements.titlepage.recto.auto.mode">
1842 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1843 <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1844 </fo:block>
1845 </xsl:template>
1846
1847 <xsl:template name="preface.titlepage.recto">
1848   <fo:block 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">
1849 <xsl:call-template name="component.title">
1850 <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
1851 </xsl:call-template></fo:block>
1852   <xsl:choose>
1853     <xsl:when test="prefaceinfo/subtitle">
1854       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
1855     </xsl:when>
1856     <xsl:when test="docinfo/subtitle">
1857       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1858     </xsl:when>
1859     <xsl:when test="info/subtitle">
1860       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
1861     </xsl:when>
1862     <xsl:when test="subtitle">
1863       <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
1864     </xsl:when>
1865   </xsl:choose>
1866
1867   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
1868   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1869   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
1870   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
1871   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1872   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
1873   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
1874   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
1875   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
1876   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
1877   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1878   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
1879   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
1880   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1881   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1882   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
1883   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1884   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
1885   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
1886   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1887   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
1888   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
1889   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1890   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
1891   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
1892   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
1893   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
1894   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
1895   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1896   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
1897   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
1898   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1899   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
1900   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/itermset"/>
1901   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/itermset"/>
1902   <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/itermset"/>
1903 </xsl:template>
1904
1905 <xsl:template name="preface.titlepage.verso">
1906 </xsl:template>
1907
1908 <xsl:template name="preface.titlepage.separator">
1909 </xsl:template>
1910
1911 <xsl:template name="preface.titlepage.before.recto">
1912 </xsl:template>
1913
1914 <xsl:template name="preface.titlepage.before.verso">
1915 </xsl:template>
1916
1917 <xsl:template name="preface.titlepage">
1918   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1919     <xsl:variable name="recto.content">
1920       <xsl:call-template name="preface.titlepage.before.recto"/>
1921       <xsl:call-template name="preface.titlepage.recto"/>
1922     </xsl:variable>
1923     <xsl:variable name="recto.elements.count">
1924       <xsl:choose>
1925         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1926         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1927           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1928         <xsl:otherwise>1</xsl:otherwise>
1929       </xsl:choose>
1930     </xsl:variable>
1931     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1932       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
1933     </xsl:if>
1934     <xsl:variable name="verso.content">
1935       <xsl:call-template name="preface.titlepage.before.verso"/>
1936       <xsl:call-template name="preface.titlepage.verso"/>
1937     </xsl:variable>
1938     <xsl:variable name="verso.elements.count">
1939       <xsl:choose>
1940         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1941         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1942           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1943         <xsl:otherwise>1</xsl:otherwise>
1944       </xsl:choose>
1945     </xsl:variable>
1946     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1947       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
1948     </xsl:if>
1949     <xsl:call-template name="preface.titlepage.separator"/>
1950   </fo:block>
1951 </xsl:template>
1952
1953 <xsl:template match="*" mode="preface.titlepage.recto.mode">
1954   <!-- if an element isn't found in this mode, -->
1955   <!-- try the generic titlepage.mode -->
1956   <xsl:apply-templates select="." mode="titlepage.mode"/>
1957 </xsl:template>
1958
1959 <xsl:template match="*" mode="preface.titlepage.verso.mode">
1960   <!-- if an element isn't found in this mode, -->
1961   <!-- try the generic titlepage.mode -->
1962   <xsl:apply-templates select="." mode="titlepage.mode"/>
1963 </xsl:template>
1964
1965 <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
1966 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
1967 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1968 </fo:block>
1969 </xsl:template>
1970
1971 <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
1972 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1973 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1974 </fo:block>
1975 </xsl:template>
1976
1977 <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
1978 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1979 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1980 </fo:block>
1981 </xsl:template>
1982
1983 <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
1984 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1985 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1986 </fo:block>
1987 </xsl:template>
1988
1989 <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
1990 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1991 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1992 </fo:block>
1993 </xsl:template>
1994
1995 <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
1996 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
1997 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1998 </fo:block>
1999 </xsl:template>
2000
2001 <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
2002 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2003 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2004 </fo:block>
2005 </xsl:template>
2006
2007 <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
2008 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2009 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2010 </fo:block>
2011 </xsl:template>
2012
2013 <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
2014 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2015 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2016 </fo:block>
2017 </xsl:template>
2018
2019 <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
2020 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2021 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2022 </fo:block>
2023 </xsl:template>
2024
2025 <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
2026 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2027 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2028 </fo:block>
2029 </xsl:template>
2030
2031 <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
2032 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2033 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2034 </fo:block>
2035 </xsl:template>
2036
2037 <xsl:template match="itermset" mode="preface.titlepage.recto.auto.mode">
2038 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
2039 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
2040 </fo:block>
2041 </xsl:template>
2042
2043 <xsl:template name="chapter.titlepage.recto">
2044   <xsl:choose>
2045     <xsl:when test="chapterinfo/title">
2046       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
2047     </xsl:when>
2048     <xsl:when test="docinfo/title">
2049       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
2050     </xsl:when>
2051     <xsl:when test="info/title">
2052       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
2053     </xsl:when>
2054     <xsl:when test="title">
2055       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
2056     </xsl:when>
2057   </xsl:choose>
2058
2059   <xsl:choose>
2060     <xsl:when test="chapterinfo/subtitle">
2061       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
2062     </xsl:when>
2063     <xsl:when test="docinfo/subtitle">
2064       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2065     </xsl:when>
2066     <xsl:when test="info/subtitle">
2067       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
2068     </xsl:when>
2069     <xsl:when test="subtitle">
2070       <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
2071     </xsl:when>
2072   </xsl:choose>
2073
2074   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
2075   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
2076   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
2077   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
2078   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
2079   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
2080   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
2081   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
2082   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
2083   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
2084   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
2085   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
2086   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
2087   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
2088   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2089   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
2090   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
2091   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
2092   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
2093   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
2094   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
2095   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
2096   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
2097   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
2098   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
2099   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
2100   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
2101   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
2102   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
2103   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
2104   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
2105   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
2106   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
2107   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/itermset"/>
2108   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/itermset"/>
2109   <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/itermset"/>
2110 </xsl:template>
2111
2112 <xsl:template name="chapter.titlepage.verso">
2113 </xsl:template>
2114
2115 <xsl:template name="chapter.titlepage.separator">
2116 </xsl:template>
2117
2118 <xsl:template name="chapter.titlepage.before.recto">
2119 </xsl:template>
2120
2121 <xsl:template name="chapter.titlepage.before.verso">
2122 </xsl:template>
2123
2124 <xsl:template name="chapter.titlepage">
2125   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
2126     <xsl:variable name="recto.content">
2127       <xsl:call-template name="chapter.titlepage.before.recto"/>
2128       <xsl:call-template name="chapter.titlepage.recto"/>
2129     </xsl:variable>
2130     <xsl:variable name="recto.elements.count">
2131       <xsl:choose>
2132         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2133         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2134           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2135         <xsl:otherwise>1</xsl:otherwise>
2136       </xsl:choose>
2137     </xsl:variable>
2138     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2139       <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
2140     </xsl:if>
2141     <xsl:variable name="verso.content">
2142       <xsl:call-template name="chapter.titlepage.before.verso"/>
2143       <xsl:call-template name="chapter.titlepage.verso"/>
2144     </xsl:variable>
2145     <xsl:variable name="verso.elements.count">
2146       <xsl:choose>
2147         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2148         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2149           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2150         <xsl:otherwise>1</xsl:otherwise>
2151       </xsl:choose>
2152     </xsl:variable>
2153     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2154       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2155     </xsl:if>
2156     <xsl:call-template name="chapter.titlepage.separator"/>
2157   </fo:block>
2158 </xsl:template>
2159
2160 <xsl:template match="*" mode="chapter.titlepage.recto.mode">
2161   <!-- if an element isn't found in this mode, -->
2162   <!-- try the generic titlepage.mode -->
2163   <xsl:apply-templates select="." mode="titlepage.mode"/>
2164 </xsl:template>
2165
2166 <xsl:template match="*" mode="chapter.titlepage.verso.mode">
2167   <!-- if an element isn't found in this mode, -->
2168   <!-- try the generic titlepage.mode -->
2169   <xsl:apply-templates select="." mode="titlepage.mode"/>
2170 </xsl:template>
2171
2172 <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
2173 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
2174 <xsl:call-template name="component.title">
2175 <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
2176 </xsl:call-template>
2177 </fo:block>
2178 </xsl:template>
2179
2180 <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
2181 <fo:block 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">
2182 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2183 </fo:block>
2184 </xsl:template>
2185
2186 <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
2187 <fo:block 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">
2188 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2189 </fo:block>
2190 </xsl:template>
2191
2192 <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
2193 <fo:block 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">
2194 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2195 </fo:block>
2196 </xsl:template>
2197
2198 <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
2199 <fo:block 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">
2200 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2201 </fo:block>
2202 </xsl:template>
2203
2204 <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
2205 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2206 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2207 </fo:block>
2208 </xsl:template>
2209
2210 <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
2211 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2212 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2213 </fo:block>
2214 </xsl:template>
2215
2216 <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
2217 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2218 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2219 </fo:block>
2220 </xsl:template>
2221
2222 <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
2223 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2224 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2225 </fo:block>
2226 </xsl:template>
2227
2228 <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
2229 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2230 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2231 </fo:block>
2232 </xsl:template>
2233
2234 <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
2235 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2236 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2237 </fo:block>
2238 </xsl:template>
2239
2240 <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
2241 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2242 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2243 </fo:block>
2244 </xsl:template>
2245
2246 <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
2247 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2248 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2249 </fo:block>
2250 </xsl:template>
2251
2252 <xsl:template match="itermset" mode="chapter.titlepage.recto.auto.mode">
2253 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
2254 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
2255 </fo:block>
2256 </xsl:template>
2257
2258 <xsl:template name="appendix.titlepage.recto">
2259   <xsl:choose>
2260     <xsl:when test="appendixinfo/title">
2261       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
2262     </xsl:when>
2263     <xsl:when test="docinfo/title">
2264       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
2265     </xsl:when>
2266     <xsl:when test="info/title">
2267       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
2268     </xsl:when>
2269     <xsl:when test="title">
2270       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
2271     </xsl:when>
2272   </xsl:choose>
2273
2274   <xsl:choose>
2275     <xsl:when test="appendixinfo/subtitle">
2276       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
2277     </xsl:when>
2278     <xsl:when test="docinfo/subtitle">
2279       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2280     </xsl:when>
2281     <xsl:when test="info/subtitle">
2282       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
2283     </xsl:when>
2284     <xsl:when test="subtitle">
2285       <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
2286     </xsl:when>
2287   </xsl:choose>
2288
2289   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
2290   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
2291   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
2292   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
2293   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
2294   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
2295   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
2296   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
2297   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
2298   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
2299   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
2300   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
2301   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
2302   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
2303   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2304   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
2305   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
2306   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
2307   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
2308   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
2309   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
2310   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
2311   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
2312   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
2313   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
2314   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
2315   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
2316   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
2317   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
2318   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
2319   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
2320   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
2321   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
2322   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/itermset"/>
2323   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/itermset"/>
2324   <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/itermset"/>
2325 </xsl:template>
2326
2327 <xsl:template name="appendix.titlepage.verso">
2328 </xsl:template>
2329
2330 <xsl:template name="appendix.titlepage.separator">
2331 </xsl:template>
2332
2333 <xsl:template name="appendix.titlepage.before.recto">
2334 </xsl:template>
2335
2336 <xsl:template name="appendix.titlepage.before.verso">
2337 </xsl:template>
2338
2339 <xsl:template name="appendix.titlepage">
2340   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2341     <xsl:variable name="recto.content">
2342       <xsl:call-template name="appendix.titlepage.before.recto"/>
2343       <xsl:call-template name="appendix.titlepage.recto"/>
2344     </xsl:variable>
2345     <xsl:variable name="recto.elements.count">
2346       <xsl:choose>
2347         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2348         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2349           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2350         <xsl:otherwise>1</xsl:otherwise>
2351       </xsl:choose>
2352     </xsl:variable>
2353     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2354       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2355     </xsl:if>
2356     <xsl:variable name="verso.content">
2357       <xsl:call-template name="appendix.titlepage.before.verso"/>
2358       <xsl:call-template name="appendix.titlepage.verso"/>
2359     </xsl:variable>
2360     <xsl:variable name="verso.elements.count">
2361       <xsl:choose>
2362         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2363         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2364           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2365         <xsl:otherwise>1</xsl:otherwise>
2366       </xsl:choose>
2367     </xsl:variable>
2368     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2369       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2370     </xsl:if>
2371     <xsl:call-template name="appendix.titlepage.separator"/>
2372   </fo:block>
2373 </xsl:template>
2374
2375 <xsl:template match="*" mode="appendix.titlepage.recto.mode">
2376   <!-- if an element isn't found in this mode, -->
2377   <!-- try the generic titlepage.mode -->
2378   <xsl:apply-templates select="." mode="titlepage.mode"/>
2379 </xsl:template>
2380
2381 <xsl:template match="*" mode="appendix.titlepage.verso.mode">
2382   <!-- if an element isn't found in this mode, -->
2383   <!-- try the generic titlepage.mode -->
2384   <xsl:apply-templates select="." mode="titlepage.mode"/>
2385 </xsl:template>
2386
2387 <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
2388 <fo:block 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}">
2389 <xsl:call-template name="component.title">
2390 <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
2391 </xsl:call-template>
2392 </fo:block>
2393 </xsl:template>
2394
2395 <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
2396 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
2397 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2398 </fo:block>
2399 </xsl:template>
2400
2401 <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
2402 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2403 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2404 </fo:block>
2405 </xsl:template>
2406
2407 <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
2408 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2409 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2410 </fo:block>
2411 </xsl:template>
2412
2413 <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
2414 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2415 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2416 </fo:block>
2417 </xsl:template>
2418
2419 <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
2420 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2421 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2422 </fo:block>
2423 </xsl:template>
2424
2425 <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
2426 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2427 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2428 </fo:block>
2429 </xsl:template>
2430
2431 <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
2432 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2433 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2434 </fo:block>
2435 </xsl:template>
2436
2437 <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
2438 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2439 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2440 </fo:block>
2441 </xsl:template>
2442
2443 <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
2444 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2445 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2446 </fo:block>
2447 </xsl:template>
2448
2449 <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
2450 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2451 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2452 </fo:block>
2453 </xsl:template>
2454
2455 <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
2456 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2457 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2458 </fo:block>
2459 </xsl:template>
2460
2461 <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
2462 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2463 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2464 </fo:block>
2465 </xsl:template>
2466
2467 <xsl:template match="itermset" mode="appendix.titlepage.recto.auto.mode">
2468 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
2469 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2470 </fo:block>
2471 </xsl:template>
2472
2473 <xsl:template name="section.titlepage.recto">
2474   <xsl:choose>
2475     <xsl:when test="sectioninfo/title">
2476       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
2477     </xsl:when>
2478     <xsl:when test="info/title">
2479       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
2480     </xsl:when>
2481     <xsl:when test="title">
2482       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
2483     </xsl:when>
2484   </xsl:choose>
2485
2486   <xsl:choose>
2487     <xsl:when test="sectioninfo/subtitle">
2488       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
2489     </xsl:when>
2490     <xsl:when test="info/subtitle">
2491       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
2492     </xsl:when>
2493     <xsl:when test="subtitle">
2494       <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
2495     </xsl:when>
2496   </xsl:choose>
2497
2498   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
2499   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
2500   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
2501   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
2502   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
2503   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
2504   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
2505   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
2506   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
2507   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2508   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
2509   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
2510   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
2511   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
2512   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
2513   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
2514   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
2515   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
2516   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
2517   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
2518   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
2519   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
2520   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/itermset"/>
2521   <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/itermset"/>
2522 </xsl:template>
2523
2524 <xsl:template name="section.titlepage.verso">
2525 </xsl:template>
2526
2527 <xsl:template name="section.titlepage.separator">
2528 </xsl:template>
2529
2530 <xsl:template name="section.titlepage.before.recto">
2531 </xsl:template>
2532
2533 <xsl:template name="section.titlepage.before.verso">
2534 </xsl:template>
2535
2536 <xsl:template name="section.titlepage">
2537   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2538     <xsl:variable name="recto.content">
2539       <xsl:call-template name="section.titlepage.before.recto"/>
2540       <xsl:call-template name="section.titlepage.recto"/>
2541     </xsl:variable>
2542     <xsl:variable name="recto.elements.count">
2543       <xsl:choose>
2544         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2545         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2546           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2547         <xsl:otherwise>1</xsl:otherwise>
2548       </xsl:choose>
2549     </xsl:variable>
2550     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2551       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2552     </xsl:if>
2553     <xsl:variable name="verso.content">
2554       <xsl:call-template name="section.titlepage.before.verso"/>
2555       <xsl:call-template name="section.titlepage.verso"/>
2556     </xsl:variable>
2557     <xsl:variable name="verso.elements.count">
2558       <xsl:choose>
2559         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2560         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2561           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2562         <xsl:otherwise>1</xsl:otherwise>
2563       </xsl:choose>
2564     </xsl:variable>
2565     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2566       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2567     </xsl:if>
2568     <xsl:call-template name="section.titlepage.separator"/>
2569   </fo:block>
2570 </xsl:template>
2571
2572 <xsl:template match="*" mode="section.titlepage.recto.mode">
2573   <!-- if an element isn't found in this mode, -->
2574   <!-- try the generic titlepage.mode -->
2575   <xsl:apply-templates select="." mode="titlepage.mode"/>
2576 </xsl:template>
2577
2578 <xsl:template match="*" mode="section.titlepage.verso.mode">
2579   <!-- if an element isn't found in this mode, -->
2580   <!-- try the generic titlepage.mode -->
2581   <xsl:apply-templates select="." mode="titlepage.mode"/>
2582 </xsl:template>
2583
2584 <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
2585 <fo:block 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}">
2586 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2587 </fo:block>
2588 </xsl:template>
2589
2590 <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
2591 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
2592 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2593 </fo:block>
2594 </xsl:template>
2595
2596 <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
2597 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2598 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2599 </fo:block>
2600 </xsl:template>
2601
2602 <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
2603 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2604 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2605 </fo:block>
2606 </xsl:template>
2607
2608 <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
2609 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2610 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2611 </fo:block>
2612 </xsl:template>
2613
2614 <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
2615 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2616 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2617 </fo:block>
2618 </xsl:template>
2619
2620 <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
2621 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2622 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2623 </fo:block>
2624 </xsl:template>
2625
2626 <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
2627 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2628 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2629 </fo:block>
2630 </xsl:template>
2631
2632 <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
2633 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2634 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2635 </fo:block>
2636 </xsl:template>
2637
2638 <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
2639 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2640 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2641 </fo:block>
2642 </xsl:template>
2643
2644 <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
2645 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2646 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2647 </fo:block>
2648 </xsl:template>
2649
2650 <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
2651 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2652 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2653 </fo:block>
2654 </xsl:template>
2655
2656 <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
2657 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2658 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2659 </fo:block>
2660 </xsl:template>
2661
2662 <xsl:template match="itermset" mode="section.titlepage.recto.auto.mode">
2663 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
2664 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2665 </fo:block>
2666 </xsl:template>
2667
2668 <xsl:template name="sect1.titlepage.recto">
2669   <xsl:choose>
2670     <xsl:when test="sect1info/title">
2671       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
2672     </xsl:when>
2673     <xsl:when test="info/title">
2674       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
2675     </xsl:when>
2676     <xsl:when test="title">
2677       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
2678     </xsl:when>
2679   </xsl:choose>
2680
2681   <xsl:choose>
2682     <xsl:when test="sect1info/subtitle">
2683       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
2684     </xsl:when>
2685     <xsl:when test="info/subtitle">
2686       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
2687     </xsl:when>
2688     <xsl:when test="subtitle">
2689       <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
2690     </xsl:when>
2691   </xsl:choose>
2692
2693   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
2694   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
2695   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
2696   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
2697   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
2698   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
2699   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
2700   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
2701   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
2702   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2703   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
2704   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
2705   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
2706   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
2707   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
2708   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
2709   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
2710   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
2711   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
2712   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
2713   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
2714   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
2715   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/itermset"/>
2716   <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/itermset"/>
2717 </xsl:template>
2718
2719 <xsl:template name="sect1.titlepage.verso">
2720 </xsl:template>
2721
2722 <xsl:template name="sect1.titlepage.separator">
2723 </xsl:template>
2724
2725 <xsl:template name="sect1.titlepage.before.recto">
2726 </xsl:template>
2727
2728 <xsl:template name="sect1.titlepage.before.verso">
2729 </xsl:template>
2730
2731 <xsl:template name="sect1.titlepage">
2732   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2733     <xsl:variable name="recto.content">
2734       <xsl:call-template name="sect1.titlepage.before.recto"/>
2735       <xsl:call-template name="sect1.titlepage.recto"/>
2736     </xsl:variable>
2737     <xsl:variable name="recto.elements.count">
2738       <xsl:choose>
2739         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2740         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2741           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2742         <xsl:otherwise>1</xsl:otherwise>
2743       </xsl:choose>
2744     </xsl:variable>
2745     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2746       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2747     </xsl:if>
2748     <xsl:variable name="verso.content">
2749       <xsl:call-template name="sect1.titlepage.before.verso"/>
2750       <xsl:call-template name="sect1.titlepage.verso"/>
2751     </xsl:variable>
2752     <xsl:variable name="verso.elements.count">
2753       <xsl:choose>
2754         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2755         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2756           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2757         <xsl:otherwise>1</xsl:otherwise>
2758       </xsl:choose>
2759     </xsl:variable>
2760     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2761       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2762     </xsl:if>
2763     <xsl:call-template name="sect1.titlepage.separator"/>
2764   </fo:block>
2765 </xsl:template>
2766
2767 <xsl:template match="*" mode="sect1.titlepage.recto.mode">
2768   <!-- if an element isn't found in this mode, -->
2769   <!-- try the generic titlepage.mode -->
2770   <xsl:apply-templates select="." mode="titlepage.mode"/>
2771 </xsl:template>
2772
2773 <xsl:template match="*" mode="sect1.titlepage.verso.mode">
2774   <!-- if an element isn't found in this mode, -->
2775   <!-- try the generic titlepage.mode -->
2776   <xsl:apply-templates select="." mode="titlepage.mode"/>
2777 </xsl:template>
2778
2779 <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
2780 <fo:block 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}">
2781 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2782 </fo:block>
2783 </xsl:template>
2784
2785 <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
2786 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
2787 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2788 </fo:block>
2789 </xsl:template>
2790
2791 <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
2792 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2793 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2794 </fo:block>
2795 </xsl:template>
2796
2797 <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
2798 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2799 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2800 </fo:block>
2801 </xsl:template>
2802
2803 <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
2804 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2805 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2806 </fo:block>
2807 </xsl:template>
2808
2809 <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
2810 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2811 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2812 </fo:block>
2813 </xsl:template>
2814
2815 <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2816 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2817 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2818 </fo:block>
2819 </xsl:template>
2820
2821 <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
2822 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2823 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2824 </fo:block>
2825 </xsl:template>
2826
2827 <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
2828 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2829 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2830 </fo:block>
2831 </xsl:template>
2832
2833 <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
2834 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2835 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2836 </fo:block>
2837 </xsl:template>
2838
2839 <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
2840 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2841 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2842 </fo:block>
2843 </xsl:template>
2844
2845 <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
2846 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2847 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2848 </fo:block>
2849 </xsl:template>
2850
2851 <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
2852 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2853 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2854 </fo:block>
2855 </xsl:template>
2856
2857 <xsl:template match="itermset" mode="sect1.titlepage.recto.auto.mode">
2858 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
2859 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2860 </fo:block>
2861 </xsl:template>
2862
2863 <xsl:template name="sect2.titlepage.recto">
2864   <xsl:choose>
2865     <xsl:when test="sect2info/title">
2866       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
2867     </xsl:when>
2868     <xsl:when test="info/title">
2869       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
2870     </xsl:when>
2871     <xsl:when test="title">
2872       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
2873     </xsl:when>
2874   </xsl:choose>
2875
2876   <xsl:choose>
2877     <xsl:when test="sect2info/subtitle">
2878       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
2879     </xsl:when>
2880     <xsl:when test="info/subtitle">
2881       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
2882     </xsl:when>
2883     <xsl:when test="subtitle">
2884       <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
2885     </xsl:when>
2886   </xsl:choose>
2887
2888   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
2889   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
2890   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
2891   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
2892   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
2893   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
2894   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
2895   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
2896   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
2897   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2898   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
2899   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
2900   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
2901   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
2902   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
2903   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
2904   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
2905   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
2906   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
2907   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
2908   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
2909   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
2910   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/itermset"/>
2911   <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/itermset"/>
2912 </xsl:template>
2913
2914 <xsl:template name="sect2.titlepage.verso">
2915 </xsl:template>
2916
2917 <xsl:template name="sect2.titlepage.separator">
2918 </xsl:template>
2919
2920 <xsl:template name="sect2.titlepage.before.recto">
2921 </xsl:template>
2922
2923 <xsl:template name="sect2.titlepage.before.verso">
2924 </xsl:template>
2925
2926 <xsl:template name="sect2.titlepage">
2927   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2928     <xsl:variable name="recto.content">
2929       <xsl:call-template name="sect2.titlepage.before.recto"/>
2930       <xsl:call-template name="sect2.titlepage.recto"/>
2931     </xsl:variable>
2932     <xsl:variable name="recto.elements.count">
2933       <xsl:choose>
2934         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2935         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2936           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2937         <xsl:otherwise>1</xsl:otherwise>
2938       </xsl:choose>
2939     </xsl:variable>
2940     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2941       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
2942     </xsl:if>
2943     <xsl:variable name="verso.content">
2944       <xsl:call-template name="sect2.titlepage.before.verso"/>
2945       <xsl:call-template name="sect2.titlepage.verso"/>
2946     </xsl:variable>
2947     <xsl:variable name="verso.elements.count">
2948       <xsl:choose>
2949         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2950         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2951           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2952         <xsl:otherwise>1</xsl:otherwise>
2953       </xsl:choose>
2954     </xsl:variable>
2955     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2956       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
2957     </xsl:if>
2958     <xsl:call-template name="sect2.titlepage.separator"/>
2959   </fo:block>
2960 </xsl:template>
2961
2962 <xsl:template match="*" mode="sect2.titlepage.recto.mode">
2963   <!-- if an element isn't found in this mode, -->
2964   <!-- try the generic titlepage.mode -->
2965   <xsl:apply-templates select="." mode="titlepage.mode"/>
2966 </xsl:template>
2967
2968 <xsl:template match="*" mode="sect2.titlepage.verso.mode">
2969   <!-- if an element isn't found in this mode, -->
2970   <!-- try the generic titlepage.mode -->
2971   <xsl:apply-templates select="." mode="titlepage.mode"/>
2972 </xsl:template>
2973
2974 <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
2975 <fo:block 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}">
2976 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2977 </fo:block>
2978 </xsl:template>
2979
2980 <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
2981 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
2982 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2983 </fo:block>
2984 </xsl:template>
2985
2986 <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
2987 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2988 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2989 </fo:block>
2990 </xsl:template>
2991
2992 <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
2993 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
2994 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2995 </fo:block>
2996 </xsl:template>
2997
2998 <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
2999 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3000 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3001 </fo:block>
3002 </xsl:template>
3003
3004 <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
3005 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3006 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3007 </fo:block>
3008 </xsl:template>
3009
3010 <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
3011 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3012 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3013 </fo:block>
3014 </xsl:template>
3015
3016 <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
3017 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3018 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3019 </fo:block>
3020 </xsl:template>
3021
3022 <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
3023 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3024 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3025 </fo:block>
3026 </xsl:template>
3027
3028 <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
3029 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3030 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3031 </fo:block>
3032 </xsl:template>
3033
3034 <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
3035 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3036 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3037 </fo:block>
3038 </xsl:template>
3039
3040 <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
3041 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3042 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3043 </fo:block>
3044 </xsl:template>
3045
3046 <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
3047 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3048 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3049 </fo:block>
3050 </xsl:template>
3051
3052 <xsl:template match="itermset" mode="sect2.titlepage.recto.auto.mode">
3053 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
3054 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
3055 </fo:block>
3056 </xsl:template>
3057
3058 <xsl:template name="sect3.titlepage.recto">
3059   <xsl:choose>
3060     <xsl:when test="sect3info/title">
3061       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
3062     </xsl:when>
3063     <xsl:when test="info/title">
3064       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
3065     </xsl:when>
3066     <xsl:when test="title">
3067       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
3068     </xsl:when>
3069   </xsl:choose>
3070
3071   <xsl:choose>
3072     <xsl:when test="sect3info/subtitle">
3073       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
3074     </xsl:when>
3075     <xsl:when test="info/subtitle">
3076       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
3077     </xsl:when>
3078     <xsl:when test="subtitle">
3079       <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
3080     </xsl:when>
3081   </xsl:choose>
3082
3083   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
3084   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
3085   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
3086   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
3087   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
3088   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
3089   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
3090   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
3091   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
3092   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3093   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
3094   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
3095   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
3096   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
3097   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
3098   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
3099   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
3100   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
3101   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
3102   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
3103   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
3104   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
3105   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/itermset"/>
3106   <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/itermset"/>
3107 </xsl:template>
3108
3109 <xsl:template name="sect3.titlepage.verso">
3110 </xsl:template>
3111
3112 <xsl:template name="sect3.titlepage.separator">
3113 </xsl:template>
3114
3115 <xsl:template name="sect3.titlepage.before.recto">
3116 </xsl:template>
3117
3118 <xsl:template name="sect3.titlepage.before.verso">
3119 </xsl:template>
3120
3121 <xsl:template name="sect3.titlepage">
3122   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3123     <xsl:variable name="recto.content">
3124       <xsl:call-template name="sect3.titlepage.before.recto"/>
3125       <xsl:call-template name="sect3.titlepage.recto"/>
3126     </xsl:variable>
3127     <xsl:variable name="recto.elements.count">
3128       <xsl:choose>
3129         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3130         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3131           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3132         <xsl:otherwise>1</xsl:otherwise>
3133       </xsl:choose>
3134     </xsl:variable>
3135     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3136       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3137     </xsl:if>
3138     <xsl:variable name="verso.content">
3139       <xsl:call-template name="sect3.titlepage.before.verso"/>
3140       <xsl:call-template name="sect3.titlepage.verso"/>
3141     </xsl:variable>
3142     <xsl:variable name="verso.elements.count">
3143       <xsl:choose>
3144         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3145         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3146           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3147         <xsl:otherwise>1</xsl:otherwise>
3148       </xsl:choose>
3149     </xsl:variable>
3150     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3151       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3152     </xsl:if>
3153     <xsl:call-template name="sect3.titlepage.separator"/>
3154   </fo:block>
3155 </xsl:template>
3156
3157 <xsl:template match="*" mode="sect3.titlepage.recto.mode">
3158   <!-- if an element isn't found in this mode, -->
3159   <!-- try the generic titlepage.mode -->
3160   <xsl:apply-templates select="." mode="titlepage.mode"/>
3161 </xsl:template>
3162
3163 <xsl:template match="*" mode="sect3.titlepage.verso.mode">
3164   <!-- if an element isn't found in this mode, -->
3165   <!-- try the generic titlepage.mode -->
3166   <xsl:apply-templates select="." mode="titlepage.mode"/>
3167 </xsl:template>
3168
3169 <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
3170 <fo:block 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}">
3171 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3172 </fo:block>
3173 </xsl:template>
3174
3175 <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
3176 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
3177 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3178 </fo:block>
3179 </xsl:template>
3180
3181 <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
3182 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3183 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3184 </fo:block>
3185 </xsl:template>
3186
3187 <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
3188 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3189 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3190 </fo:block>
3191 </xsl:template>
3192
3193 <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
3194 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3195 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3196 </fo:block>
3197 </xsl:template>
3198
3199 <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
3200 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3201 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3202 </fo:block>
3203 </xsl:template>
3204
3205 <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
3206 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3207 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3208 </fo:block>
3209 </xsl:template>
3210
3211 <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
3212 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3213 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3214 </fo:block>
3215 </xsl:template>
3216
3217 <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
3218 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3219 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3220 </fo:block>
3221 </xsl:template>
3222
3223 <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
3224 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3225 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3226 </fo:block>
3227 </xsl:template>
3228
3229 <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
3230 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3231 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3232 </fo:block>
3233 </xsl:template>
3234
3235 <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
3236 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3237 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3238 </fo:block>
3239 </xsl:template>
3240
3241 <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
3242 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3243 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3244 </fo:block>
3245 </xsl:template>
3246
3247 <xsl:template match="itermset" mode="sect3.titlepage.recto.auto.mode">
3248 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
3249 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
3250 </fo:block>
3251 </xsl:template>
3252
3253 <xsl:template name="sect4.titlepage.recto">
3254   <xsl:choose>
3255     <xsl:when test="sect4info/title">
3256       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
3257     </xsl:when>
3258     <xsl:when test="info/title">
3259       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
3260     </xsl:when>
3261     <xsl:when test="title">
3262       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
3263     </xsl:when>
3264   </xsl:choose>
3265
3266   <xsl:choose>
3267     <xsl:when test="sect4info/subtitle">
3268       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
3269     </xsl:when>
3270     <xsl:when test="info/subtitle">
3271       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
3272     </xsl:when>
3273     <xsl:when test="subtitle">
3274       <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
3275     </xsl:when>
3276   </xsl:choose>
3277
3278   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
3279   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
3280   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
3281   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
3282   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
3283   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
3284   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
3285   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
3286   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
3287   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3288   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
3289   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
3290   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
3291   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
3292   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
3293   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
3294   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
3295   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
3296   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
3297   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
3298   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
3299   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
3300   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/itermset"/>
3301   <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/itermset"/>
3302 </xsl:template>
3303
3304 <xsl:template name="sect4.titlepage.verso">
3305 </xsl:template>
3306
3307 <xsl:template name="sect4.titlepage.separator">
3308 </xsl:template>
3309
3310 <xsl:template name="sect4.titlepage.before.recto">
3311 </xsl:template>
3312
3313 <xsl:template name="sect4.titlepage.before.verso">
3314 </xsl:template>
3315
3316 <xsl:template name="sect4.titlepage">
3317   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3318     <xsl:variable name="recto.content">
3319       <xsl:call-template name="sect4.titlepage.before.recto"/>
3320       <xsl:call-template name="sect4.titlepage.recto"/>
3321     </xsl:variable>
3322     <xsl:variable name="recto.elements.count">
3323       <xsl:choose>
3324         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3325         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3326           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3327         <xsl:otherwise>1</xsl:otherwise>
3328       </xsl:choose>
3329     </xsl:variable>
3330     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3331       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3332     </xsl:if>
3333     <xsl:variable name="verso.content">
3334       <xsl:call-template name="sect4.titlepage.before.verso"/>
3335       <xsl:call-template name="sect4.titlepage.verso"/>
3336     </xsl:variable>
3337     <xsl:variable name="verso.elements.count">
3338       <xsl:choose>
3339         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3340         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3341           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3342         <xsl:otherwise>1</xsl:otherwise>
3343       </xsl:choose>
3344     </xsl:variable>
3345     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3346       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3347     </xsl:if>
3348     <xsl:call-template name="sect4.titlepage.separator"/>
3349   </fo:block>
3350 </xsl:template>
3351
3352 <xsl:template match="*" mode="sect4.titlepage.recto.mode">
3353   <!-- if an element isn't found in this mode, -->
3354   <!-- try the generic titlepage.mode -->
3355   <xsl:apply-templates select="." mode="titlepage.mode"/>
3356 </xsl:template>
3357
3358 <xsl:template match="*" mode="sect4.titlepage.verso.mode">
3359   <!-- if an element isn't found in this mode, -->
3360   <!-- try the generic titlepage.mode -->
3361   <xsl:apply-templates select="." mode="titlepage.mode"/>
3362 </xsl:template>
3363
3364 <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
3365 <fo:block 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}">
3366 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3367 </fo:block>
3368 </xsl:template>
3369
3370 <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
3371 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
3372 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3373 </fo:block>
3374 </xsl:template>
3375
3376 <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
3377 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3378 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3379 </fo:block>
3380 </xsl:template>
3381
3382 <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
3383 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3384 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3385 </fo:block>
3386 </xsl:template>
3387
3388 <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
3389 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3390 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3391 </fo:block>
3392 </xsl:template>
3393
3394 <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
3395 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3396 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3397 </fo:block>
3398 </xsl:template>
3399
3400 <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
3401 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3402 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3403 </fo:block>
3404 </xsl:template>
3405
3406 <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
3407 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3408 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3409 </fo:block>
3410 </xsl:template>
3411
3412 <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
3413 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3414 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3415 </fo:block>
3416 </xsl:template>
3417
3418 <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
3419 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3420 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3421 </fo:block>
3422 </xsl:template>
3423
3424 <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
3425 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3426 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3427 </fo:block>
3428 </xsl:template>
3429
3430 <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
3431 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3432 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3433 </fo:block>
3434 </xsl:template>
3435
3436 <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
3437 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3438 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3439 </fo:block>
3440 </xsl:template>
3441
3442 <xsl:template match="itermset" mode="sect4.titlepage.recto.auto.mode">
3443 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
3444 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
3445 </fo:block>
3446 </xsl:template>
3447
3448 <xsl:template name="sect5.titlepage.recto">
3449   <xsl:choose>
3450     <xsl:when test="sect5info/title">
3451       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
3452     </xsl:when>
3453     <xsl:when test="info/title">
3454       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
3455     </xsl:when>
3456     <xsl:when test="title">
3457       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
3458     </xsl:when>
3459   </xsl:choose>
3460
3461   <xsl:choose>
3462     <xsl:when test="sect5info/subtitle">
3463       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
3464     </xsl:when>
3465     <xsl:when test="info/subtitle">
3466       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
3467     </xsl:when>
3468     <xsl:when test="subtitle">
3469       <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
3470     </xsl:when>
3471   </xsl:choose>
3472
3473   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
3474   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
3475   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
3476   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
3477   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
3478   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
3479   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
3480   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
3481   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
3482   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3483   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
3484   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
3485   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
3486   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
3487   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
3488   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
3489   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
3490   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
3491   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
3492   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
3493   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
3494   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
3495   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/itermset"/>
3496   <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/itermset"/>
3497 </xsl:template>
3498
3499 <xsl:template name="sect5.titlepage.verso">
3500 </xsl:template>
3501
3502 <xsl:template name="sect5.titlepage.separator">
3503 </xsl:template>
3504
3505 <xsl:template name="sect5.titlepage.before.recto">
3506 </xsl:template>
3507
3508 <xsl:template name="sect5.titlepage.before.verso">
3509 </xsl:template>
3510
3511 <xsl:template name="sect5.titlepage">
3512   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3513     <xsl:variable name="recto.content">
3514       <xsl:call-template name="sect5.titlepage.before.recto"/>
3515       <xsl:call-template name="sect5.titlepage.recto"/>
3516     </xsl:variable>
3517     <xsl:variable name="recto.elements.count">
3518       <xsl:choose>
3519         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3520         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3521           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3522         <xsl:otherwise>1</xsl:otherwise>
3523       </xsl:choose>
3524     </xsl:variable>
3525     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3526       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3527     </xsl:if>
3528     <xsl:variable name="verso.content">
3529       <xsl:call-template name="sect5.titlepage.before.verso"/>
3530       <xsl:call-template name="sect5.titlepage.verso"/>
3531     </xsl:variable>
3532     <xsl:variable name="verso.elements.count">
3533       <xsl:choose>
3534         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3535         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3536           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3537         <xsl:otherwise>1</xsl:otherwise>
3538       </xsl:choose>
3539     </xsl:variable>
3540     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3541       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3542     </xsl:if>
3543     <xsl:call-template name="sect5.titlepage.separator"/>
3544   </fo:block>
3545 </xsl:template>
3546
3547 <xsl:template match="*" mode="sect5.titlepage.recto.mode">
3548   <!-- if an element isn't found in this mode, -->
3549   <!-- try the generic titlepage.mode -->
3550   <xsl:apply-templates select="." mode="titlepage.mode"/>
3551 </xsl:template>
3552
3553 <xsl:template match="*" mode="sect5.titlepage.verso.mode">
3554   <!-- if an element isn't found in this mode, -->
3555   <!-- try the generic titlepage.mode -->
3556   <xsl:apply-templates select="." mode="titlepage.mode"/>
3557 </xsl:template>
3558
3559 <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
3560 <fo:block 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}">
3561 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3562 </fo:block>
3563 </xsl:template>
3564
3565 <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
3566 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
3567 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3568 </fo:block>
3569 </xsl:template>
3570
3571 <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
3572 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3573 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3574 </fo:block>
3575 </xsl:template>
3576
3577 <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
3578 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3579 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3580 </fo:block>
3581 </xsl:template>
3582
3583 <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
3584 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3585 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3586 </fo:block>
3587 </xsl:template>
3588
3589 <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
3590 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3591 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3592 </fo:block>
3593 </xsl:template>
3594
3595 <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3596 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3597 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3598 </fo:block>
3599 </xsl:template>
3600
3601 <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
3602 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3603 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3604 </fo:block>
3605 </xsl:template>
3606
3607 <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
3608 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3609 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3610 </fo:block>
3611 </xsl:template>
3612
3613 <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
3614 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3615 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3616 </fo:block>
3617 </xsl:template>
3618
3619 <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
3620 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3621 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3622 </fo:block>
3623 </xsl:template>
3624
3625 <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
3626 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3627 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3628 </fo:block>
3629 </xsl:template>
3630
3631 <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
3632 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3633 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3634 </fo:block>
3635 </xsl:template>
3636
3637 <xsl:template match="itermset" mode="sect5.titlepage.recto.auto.mode">
3638 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
3639 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3640 </fo:block>
3641 </xsl:template>
3642
3643 <xsl:template name="simplesect.titlepage.recto">
3644   <xsl:choose>
3645     <xsl:when test="simplesectinfo/title">
3646       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
3647     </xsl:when>
3648     <xsl:when test="docinfo/title">
3649       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
3650     </xsl:when>
3651     <xsl:when test="info/title">
3652       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
3653     </xsl:when>
3654     <xsl:when test="title">
3655       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
3656     </xsl:when>
3657   </xsl:choose>
3658
3659   <xsl:choose>
3660     <xsl:when test="simplesectinfo/subtitle">
3661       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
3662     </xsl:when>
3663     <xsl:when test="docinfo/subtitle">
3664       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3665     </xsl:when>
3666     <xsl:when test="info/subtitle">
3667       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
3668     </xsl:when>
3669     <xsl:when test="subtitle">
3670       <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
3671     </xsl:when>
3672   </xsl:choose>
3673
3674   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
3675   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3676   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
3677   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
3678   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3679   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
3680   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
3681   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
3682   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
3683   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
3684   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3685   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
3686   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
3687   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3688   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3689   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
3690   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3691   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
3692   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
3693   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3694   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
3695   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
3696   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3697   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
3698   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
3699   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
3700   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
3701   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
3702   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3703   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
3704   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
3705   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3706   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
3707   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/itermset"/>
3708   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/itermset"/>
3709   <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/itermset"/>
3710 </xsl:template>
3711
3712 <xsl:template name="simplesect.titlepage.verso">
3713 </xsl:template>
3714
3715 <xsl:template name="simplesect.titlepage.separator">
3716 </xsl:template>
3717
3718 <xsl:template name="simplesect.titlepage.before.recto">
3719 </xsl:template>
3720
3721 <xsl:template name="simplesect.titlepage.before.verso">
3722 </xsl:template>
3723
3724 <xsl:template name="simplesect.titlepage">
3725   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3726     <xsl:variable name="recto.content">
3727       <xsl:call-template name="simplesect.titlepage.before.recto"/>
3728       <xsl:call-template name="simplesect.titlepage.recto"/>
3729     </xsl:variable>
3730     <xsl:variable name="recto.elements.count">
3731       <xsl:choose>
3732         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3733         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3734           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3735         <xsl:otherwise>1</xsl:otherwise>
3736       </xsl:choose>
3737     </xsl:variable>
3738     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3739       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
3740     </xsl:if>
3741     <xsl:variable name="verso.content">
3742       <xsl:call-template name="simplesect.titlepage.before.verso"/>
3743       <xsl:call-template name="simplesect.titlepage.verso"/>
3744     </xsl:variable>
3745     <xsl:variable name="verso.elements.count">
3746       <xsl:choose>
3747         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3748         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3749           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3750         <xsl:otherwise>1</xsl:otherwise>
3751       </xsl:choose>
3752     </xsl:variable>
3753     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3754       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
3755     </xsl:if>
3756     <xsl:call-template name="simplesect.titlepage.separator"/>
3757   </fo:block>
3758 </xsl:template>
3759
3760 <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
3761   <!-- if an element isn't found in this mode, -->
3762   <!-- try the generic titlepage.mode -->
3763   <xsl:apply-templates select="." mode="titlepage.mode"/>
3764 </xsl:template>
3765
3766 <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
3767   <!-- if an element isn't found in this mode, -->
3768   <!-- try the generic titlepage.mode -->
3769   <xsl:apply-templates select="." mode="titlepage.mode"/>
3770 </xsl:template>
3771
3772 <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
3773 <fo:block 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}">
3774 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3775 </fo:block>
3776 </xsl:template>
3777
3778 <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
3779 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
3780 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3781 </fo:block>
3782 </xsl:template>
3783
3784 <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3785 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3786 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3787 </fo:block>
3788 </xsl:template>
3789
3790 <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3791 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3792 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3793 </fo:block>
3794 </xsl:template>
3795
3796 <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
3797 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3798 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3799 </fo:block>
3800 </xsl:template>
3801
3802 <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
3803 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3804 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3805 </fo:block>
3806 </xsl:template>
3807
3808 <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3809 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3810 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3811 </fo:block>
3812 </xsl:template>
3813
3814 <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
3815 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3816 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3817 </fo:block>
3818 </xsl:template>
3819
3820 <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3821 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3822 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3823 </fo:block>
3824 </xsl:template>
3825
3826 <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
3827 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3828 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3829 </fo:block>
3830 </xsl:template>
3831
3832 <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
3833 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3834 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3835 </fo:block>
3836 </xsl:template>
3837
3838 <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
3839 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3840 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3841 </fo:block>
3842 </xsl:template>
3843
3844 <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
3845 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3846 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3847 </fo:block>
3848 </xsl:template>
3849
3850 <xsl:template match="itermset" mode="simplesect.titlepage.recto.auto.mode">
3851 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3852 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3853 </fo:block>
3854 </xsl:template>
3855
3856 <xsl:template name="topic.titlepage.recto">
3857   <xsl:choose>
3858     <xsl:when test="topicinfo/title">
3859       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/title"/>
3860     </xsl:when>
3861     <xsl:when test="info/title">
3862       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/title"/>
3863     </xsl:when>
3864     <xsl:when test="title">
3865       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="title"/>
3866     </xsl:when>
3867   </xsl:choose>
3868
3869   <xsl:choose>
3870     <xsl:when test="topicinfo/subtitle">
3871       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/subtitle"/>
3872     </xsl:when>
3873     <xsl:when test="info/subtitle">
3874       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/subtitle"/>
3875     </xsl:when>
3876     <xsl:when test="subtitle">
3877       <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="subtitle"/>
3878     </xsl:when>
3879   </xsl:choose>
3880
3881 </xsl:template>
3882
3883 <xsl:template name="topic.titlepage.verso">
3884 </xsl:template>
3885
3886 <xsl:template name="topic.titlepage.separator">
3887 </xsl:template>
3888
3889 <xsl:template name="topic.titlepage.before.recto">
3890 </xsl:template>
3891
3892 <xsl:template name="topic.titlepage.before.verso">
3893 </xsl:template>
3894
3895 <xsl:template name="topic.titlepage">
3896   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3897     <xsl:variable name="recto.content">
3898       <xsl:call-template name="topic.titlepage.before.recto"/>
3899       <xsl:call-template name="topic.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="topic.titlepage.before.verso"/>
3914       <xsl:call-template name="topic.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="topic.titlepage.separator"/>
3928   </fo:block>
3929 </xsl:template>
3930
3931 <xsl:template match="*" mode="topic.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="topic.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="topic.titlepage.recto.auto.mode">
3944 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="topic.titlepage.recto.style" font-weight="bold" font-size="17.28pt" space-before="1em" space-after="1em" font-family="{$title.fontset}">
3945 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
3946 </fo:block>
3947 </xsl:template>
3948
3949 <xsl:template match="subtitle" mode="topic.titlepage.recto.auto.mode">
3950 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="topic.titlepage.recto.style" font-family="{$title.fontset}">
3951 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
3952 </fo:block>
3953 </xsl:template>
3954
3955 <xsl:template name="bibliography.titlepage.recto">
3956   <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">
3957 <xsl:call-template name="component.title">
3958 <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
3959 </xsl:call-template></fo:block>
3960   <xsl:choose>
3961     <xsl:when test="bibliographyinfo/subtitle">
3962       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
3963     </xsl:when>
3964     <xsl:when test="docinfo/subtitle">
3965       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3966     </xsl:when>
3967     <xsl:when test="info/subtitle">
3968       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
3969     </xsl:when>
3970     <xsl:when test="subtitle">
3971       <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
3972     </xsl:when>
3973   </xsl:choose>
3974
3975   <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/itermset"/>
3976   <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/itermset"/>
3977   <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/itermset"/>
3978 </xsl:template>
3979
3980 <xsl:template name="bibliography.titlepage.verso">
3981 </xsl:template>
3982
3983 <xsl:template name="bibliography.titlepage.separator">
3984 </xsl:template>
3985
3986 <xsl:template name="bibliography.titlepage.before.recto">
3987 </xsl:template>
3988
3989 <xsl:template name="bibliography.titlepage.before.verso">
3990 </xsl:template>
3991
3992 <xsl:template name="bibliography.titlepage">
3993   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
3994     <xsl:variable name="recto.content">
3995       <xsl:call-template name="bibliography.titlepage.before.recto"/>
3996       <xsl:call-template name="bibliography.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="bibliography.titlepage.before.verso"/>
4011       <xsl:call-template name="bibliography.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="bibliography.titlepage.separator"/>
4025   </fo:block>
4026 </xsl:template>
4027
4028 <xsl:template match="*" mode="bibliography.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="bibliography.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="bibliography.titlepage.recto.auto.mode">
4041 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
4042 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
4043 </fo:block>
4044 </xsl:template>
4045
4046 <xsl:template match="itermset" mode="bibliography.titlepage.recto.auto.mode">
4047 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style">
4048 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
4049 </fo:block>
4050 </xsl:template>
4051
4052 <xsl:template name="bibliodiv.titlepage.recto">
4053   <xsl:choose>
4054     <xsl:when test="bibliodivinfo/title">
4055       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
4056     </xsl:when>
4057     <xsl:when test="docinfo/title">
4058       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
4059     </xsl:when>
4060     <xsl:when test="info/title">
4061       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
4062     </xsl:when>
4063     <xsl:when test="title">
4064       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
4065     </xsl:when>
4066   </xsl:choose>
4067
4068   <xsl:choose>
4069     <xsl:when test="bibliodivinfo/subtitle">
4070       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
4071     </xsl:when>
4072     <xsl:when test="docinfo/subtitle">
4073       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4074     </xsl:when>
4075     <xsl:when test="info/subtitle">
4076       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4077     </xsl:when>
4078     <xsl:when test="subtitle">
4079       <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
4080     </xsl:when>
4081   </xsl:choose>
4082
4083   <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/itermset"/>
4084   <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4085   <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/itermset"/>
4086 </xsl:template>
4087
4088 <xsl:template name="bibliodiv.titlepage.verso">
4089 </xsl:template>
4090
4091 <xsl:template name="bibliodiv.titlepage.separator">
4092 </xsl:template>
4093
4094 <xsl:template name="bibliodiv.titlepage.before.recto">
4095 </xsl:template>
4096
4097 <xsl:template name="bibliodiv.titlepage.before.verso">
4098 </xsl:template>
4099
4100 <xsl:template name="bibliodiv.titlepage">
4101   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4102     <xsl:variable name="recto.content">
4103       <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
4104       <xsl:call-template name="bibliodiv.titlepage.recto"/>
4105     </xsl:variable>
4106     <xsl:variable name="recto.elements.count">
4107       <xsl:choose>
4108         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4109         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4110           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4111         <xsl:otherwise>1</xsl:otherwise>
4112       </xsl:choose>
4113     </xsl:variable>
4114     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4115       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4116     </xsl:if>
4117     <xsl:variable name="verso.content">
4118       <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
4119       <xsl:call-template name="bibliodiv.titlepage.verso"/>
4120     </xsl:variable>
4121     <xsl:variable name="verso.elements.count">
4122       <xsl:choose>
4123         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4124         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4125           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4126         <xsl:otherwise>1</xsl:otherwise>
4127       </xsl:choose>
4128     </xsl:variable>
4129     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4130       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4131     </xsl:if>
4132     <xsl:call-template name="bibliodiv.titlepage.separator"/>
4133   </fo:block>
4134 </xsl:template>
4135
4136 <xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
4137   <!-- if an element isn't found in this mode, -->
4138   <!-- try the generic titlepage.mode -->
4139   <xsl:apply-templates select="." mode="titlepage.mode"/>
4140 </xsl:template>
4141
4142 <xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
4143   <!-- if an element isn't found in this mode, -->
4144   <!-- try the generic titlepage.mode -->
4145   <xsl:apply-templates select="." mode="titlepage.mode"/>
4146 </xsl:template>
4147
4148 <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
4149 <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">
4150 <xsl:call-template name="component.title">
4151 <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
4152 </xsl:call-template>
4153 </fo:block>
4154 </xsl:template>
4155
4156 <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
4157 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
4158 <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
4159 </fo:block>
4160 </xsl:template>
4161
4162 <xsl:template match="itermset" mode="bibliodiv.titlepage.recto.auto.mode">
4163 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style">
4164 <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
4165 </fo:block>
4166 </xsl:template>
4167
4168 <xsl:template name="glossary.titlepage.recto">
4169   <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">
4170 <xsl:call-template name="component.title">
4171 <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
4172 </xsl:call-template></fo:block>
4173   <xsl:choose>
4174     <xsl:when test="glossaryinfo/subtitle">
4175       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
4176     </xsl:when>
4177     <xsl:when test="docinfo/subtitle">
4178       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4179     </xsl:when>
4180     <xsl:when test="info/subtitle">
4181       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
4182     </xsl:when>
4183     <xsl:when test="subtitle">
4184       <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
4185     </xsl:when>
4186   </xsl:choose>
4187
4188   <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/itermset"/>
4189   <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4190   <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/itermset"/>
4191 </xsl:template>
4192
4193 <xsl:template name="glossary.titlepage.verso">
4194 </xsl:template>
4195
4196 <xsl:template name="glossary.titlepage.separator">
4197 </xsl:template>
4198
4199 <xsl:template name="glossary.titlepage.before.recto">
4200 </xsl:template>
4201
4202 <xsl:template name="glossary.titlepage.before.verso">
4203 </xsl:template>
4204
4205 <xsl:template name="glossary.titlepage">
4206   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4207     <xsl:variable name="recto.content">
4208       <xsl:call-template name="glossary.titlepage.before.recto"/>
4209       <xsl:call-template name="glossary.titlepage.recto"/>
4210     </xsl:variable>
4211     <xsl:variable name="recto.elements.count">
4212       <xsl:choose>
4213         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4214         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4215           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4216         <xsl:otherwise>1</xsl:otherwise>
4217       </xsl:choose>
4218     </xsl:variable>
4219     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4220       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4221     </xsl:if>
4222     <xsl:variable name="verso.content">
4223       <xsl:call-template name="glossary.titlepage.before.verso"/>
4224       <xsl:call-template name="glossary.titlepage.verso"/>
4225     </xsl:variable>
4226     <xsl:variable name="verso.elements.count">
4227       <xsl:choose>
4228         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4229         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4230           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4231         <xsl:otherwise>1</xsl:otherwise>
4232       </xsl:choose>
4233     </xsl:variable>
4234     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4235       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4236     </xsl:if>
4237     <xsl:call-template name="glossary.titlepage.separator"/>
4238   </fo:block>
4239 </xsl:template>
4240
4241 <xsl:template match="*" mode="glossary.titlepage.recto.mode">
4242   <!-- if an element isn't found in this mode, -->
4243   <!-- try the generic titlepage.mode -->
4244   <xsl:apply-templates select="." mode="titlepage.mode"/>
4245 </xsl:template>
4246
4247 <xsl:template match="*" mode="glossary.titlepage.verso.mode">
4248   <!-- if an element isn't found in this mode, -->
4249   <!-- try the generic titlepage.mode -->
4250   <xsl:apply-templates select="." mode="titlepage.mode"/>
4251 </xsl:template>
4252
4253 <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
4254 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
4255 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
4256 </fo:block>
4257 </xsl:template>
4258
4259 <xsl:template match="itermset" mode="glossary.titlepage.recto.auto.mode">
4260 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style">
4261 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
4262 </fo:block>
4263 </xsl:template>
4264
4265 <xsl:template name="glossdiv.titlepage.recto">
4266   <xsl:choose>
4267     <xsl:when test="glossdivinfo/title">
4268       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
4269     </xsl:when>
4270     <xsl:when test="docinfo/title">
4271       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
4272     </xsl:when>
4273     <xsl:when test="info/title">
4274       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
4275     </xsl:when>
4276     <xsl:when test="title">
4277       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
4278     </xsl:when>
4279   </xsl:choose>
4280
4281   <xsl:choose>
4282     <xsl:when test="glossdivinfo/subtitle">
4283       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
4284     </xsl:when>
4285     <xsl:when test="docinfo/subtitle">
4286       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4287     </xsl:when>
4288     <xsl:when test="info/subtitle">
4289       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4290     </xsl:when>
4291     <xsl:when test="subtitle">
4292       <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
4293     </xsl:when>
4294   </xsl:choose>
4295
4296   <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/itermset"/>
4297   <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4298   <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/itermset"/>
4299 </xsl:template>
4300
4301 <xsl:template name="glossdiv.titlepage.verso">
4302 </xsl:template>
4303
4304 <xsl:template name="glossdiv.titlepage.separator">
4305 </xsl:template>
4306
4307 <xsl:template name="glossdiv.titlepage.before.recto">
4308 </xsl:template>
4309
4310 <xsl:template name="glossdiv.titlepage.before.verso">
4311 </xsl:template>
4312
4313 <xsl:template name="glossdiv.titlepage">
4314   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4315     <xsl:variable name="recto.content">
4316       <xsl:call-template name="glossdiv.titlepage.before.recto"/>
4317       <xsl:call-template name="glossdiv.titlepage.recto"/>
4318     </xsl:variable>
4319     <xsl:variable name="recto.elements.count">
4320       <xsl:choose>
4321         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4322         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4323           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4324         <xsl:otherwise>1</xsl:otherwise>
4325       </xsl:choose>
4326     </xsl:variable>
4327     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4328       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4329     </xsl:if>
4330     <xsl:variable name="verso.content">
4331       <xsl:call-template name="glossdiv.titlepage.before.verso"/>
4332       <xsl:call-template name="glossdiv.titlepage.verso"/>
4333     </xsl:variable>
4334     <xsl:variable name="verso.elements.count">
4335       <xsl:choose>
4336         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4337         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4338           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4339         <xsl:otherwise>1</xsl:otherwise>
4340       </xsl:choose>
4341     </xsl:variable>
4342     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4343       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4344     </xsl:if>
4345     <xsl:call-template name="glossdiv.titlepage.separator"/>
4346   </fo:block>
4347 </xsl:template>
4348
4349 <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
4350   <!-- if an element isn't found in this mode, -->
4351   <!-- try the generic titlepage.mode -->
4352   <xsl:apply-templates select="." mode="titlepage.mode"/>
4353 </xsl:template>
4354
4355 <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
4356   <!-- if an element isn't found in this mode, -->
4357   <!-- try the generic titlepage.mode -->
4358   <xsl:apply-templates select="." mode="titlepage.mode"/>
4359 </xsl:template>
4360
4361 <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
4362 <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">
4363 <xsl:call-template name="component.title">
4364 <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
4365 </xsl:call-template>
4366 </fo:block>
4367 </xsl:template>
4368
4369 <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
4370 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
4371 <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
4372 </fo:block>
4373 </xsl:template>
4374
4375 <xsl:template match="itermset" mode="glossdiv.titlepage.recto.auto.mode">
4376 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style">
4377 <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
4378 </fo:block>
4379 </xsl:template>
4380
4381 <xsl:template name="index.titlepage.recto">
4382   <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">
4383 <xsl:call-template name="component.title">
4384 <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
4385 <xsl:with-param name="pagewide" select="1"/>
4386 </xsl:call-template></fo:block>
4387   <xsl:choose>
4388     <xsl:when test="indexinfo/subtitle">
4389       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
4390     </xsl:when>
4391     <xsl:when test="docinfo/subtitle">
4392       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4393     </xsl:when>
4394     <xsl:when test="info/subtitle">
4395       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
4396     </xsl:when>
4397     <xsl:when test="subtitle">
4398       <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
4399     </xsl:when>
4400   </xsl:choose>
4401
4402   <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/itermset"/>
4403   <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4404   <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/itermset"/>
4405 </xsl:template>
4406
4407 <xsl:template name="index.titlepage.verso">
4408 </xsl:template>
4409
4410 <xsl:template name="index.titlepage.separator">
4411 </xsl:template>
4412
4413 <xsl:template name="index.titlepage.before.recto">
4414 </xsl:template>
4415
4416 <xsl:template name="index.titlepage.before.verso">
4417 </xsl:template>
4418
4419 <xsl:template name="index.titlepage">
4420   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4421     <xsl:variable name="recto.content">
4422       <xsl:call-template name="index.titlepage.before.recto"/>
4423       <xsl:call-template name="index.titlepage.recto"/>
4424     </xsl:variable>
4425     <xsl:variable name="recto.elements.count">
4426       <xsl:choose>
4427         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4428         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4429           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4430         <xsl:otherwise>1</xsl:otherwise>
4431       </xsl:choose>
4432     </xsl:variable>
4433     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4434       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4435     </xsl:if>
4436     <xsl:variable name="verso.content">
4437       <xsl:call-template name="index.titlepage.before.verso"/>
4438       <xsl:call-template name="index.titlepage.verso"/>
4439     </xsl:variable>
4440     <xsl:variable name="verso.elements.count">
4441       <xsl:choose>
4442         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4443         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4444           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4445         <xsl:otherwise>1</xsl:otherwise>
4446       </xsl:choose>
4447     </xsl:variable>
4448     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4449       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4450     </xsl:if>
4451     <xsl:call-template name="index.titlepage.separator"/>
4452   </fo:block>
4453 </xsl:template>
4454
4455 <xsl:template match="*" mode="index.titlepage.recto.mode">
4456   <!-- if an element isn't found in this mode, -->
4457   <!-- try the generic titlepage.mode -->
4458   <xsl:apply-templates select="." mode="titlepage.mode"/>
4459 </xsl:template>
4460
4461 <xsl:template match="*" mode="index.titlepage.verso.mode">
4462   <!-- if an element isn't found in this mode, -->
4463   <!-- try the generic titlepage.mode -->
4464   <xsl:apply-templates select="." mode="titlepage.mode"/>
4465 </xsl:template>
4466
4467 <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
4468 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
4469 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
4470 </fo:block>
4471 </xsl:template>
4472
4473 <xsl:template match="itermset" mode="index.titlepage.recto.auto.mode">
4474 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style">
4475 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
4476 </fo:block>
4477 </xsl:template>
4478
4479 <xsl:template name="indexdiv.titlepage.recto">
4480   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
4481 <xsl:call-template name="indexdiv.title">
4482 <xsl:with-param name="title" select="title"/>
4483 </xsl:call-template></fo:block>
4484   <xsl:choose>
4485     <xsl:when test="indexdivinfo/subtitle">
4486       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
4487     </xsl:when>
4488     <xsl:when test="docinfo/subtitle">
4489       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4490     </xsl:when>
4491     <xsl:when test="info/subtitle">
4492       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
4493     </xsl:when>
4494     <xsl:when test="subtitle">
4495       <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
4496     </xsl:when>
4497   </xsl:choose>
4498
4499   <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/itermset"/>
4500   <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4501   <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/itermset"/>
4502 </xsl:template>
4503
4504 <xsl:template name="indexdiv.titlepage.verso">
4505 </xsl:template>
4506
4507 <xsl:template name="indexdiv.titlepage.separator">
4508 </xsl:template>
4509
4510 <xsl:template name="indexdiv.titlepage.before.recto">
4511 </xsl:template>
4512
4513 <xsl:template name="indexdiv.titlepage.before.verso">
4514 </xsl:template>
4515
4516 <xsl:template name="indexdiv.titlepage">
4517   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4518     <xsl:variable name="recto.content">
4519       <xsl:call-template name="indexdiv.titlepage.before.recto"/>
4520       <xsl:call-template name="indexdiv.titlepage.recto"/>
4521     </xsl:variable>
4522     <xsl:variable name="recto.elements.count">
4523       <xsl:choose>
4524         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4525         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4526           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4527         <xsl:otherwise>1</xsl:otherwise>
4528       </xsl:choose>
4529     </xsl:variable>
4530     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4531       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4532     </xsl:if>
4533     <xsl:variable name="verso.content">
4534       <xsl:call-template name="indexdiv.titlepage.before.verso"/>
4535       <xsl:call-template name="indexdiv.titlepage.verso"/>
4536     </xsl:variable>
4537     <xsl:variable name="verso.elements.count">
4538       <xsl:choose>
4539         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4540         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4541           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4542         <xsl:otherwise>1</xsl:otherwise>
4543       </xsl:choose>
4544     </xsl:variable>
4545     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4546       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4547     </xsl:if>
4548     <xsl:call-template name="indexdiv.titlepage.separator"/>
4549   </fo:block>
4550 </xsl:template>
4551
4552 <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
4553   <!-- if an element isn't found in this mode, -->
4554   <!-- try the generic titlepage.mode -->
4555   <xsl:apply-templates select="." mode="titlepage.mode"/>
4556 </xsl:template>
4557
4558 <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
4559   <!-- if an element isn't found in this mode, -->
4560   <!-- try the generic titlepage.mode -->
4561   <xsl:apply-templates select="." mode="titlepage.mode"/>
4562 </xsl:template>
4563
4564 <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
4565 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
4566 <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
4567 </fo:block>
4568 </xsl:template>
4569
4570 <xsl:template match="itermset" mode="indexdiv.titlepage.recto.auto.mode">
4571 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
4572 <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
4573 </fo:block>
4574 </xsl:template>
4575
4576 <xsl:template name="setindex.titlepage.recto">
4577   <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">
4578 <xsl:call-template name="component.title">
4579 <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
4580 <xsl:with-param name="pagewide" select="1"/>
4581 </xsl:call-template></fo:block>
4582   <xsl:choose>
4583     <xsl:when test="setindexinfo/subtitle">
4584       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
4585     </xsl:when>
4586     <xsl:when test="docinfo/subtitle">
4587       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4588     </xsl:when>
4589     <xsl:when test="info/subtitle">
4590       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
4591     </xsl:when>
4592     <xsl:when test="subtitle">
4593       <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
4594     </xsl:when>
4595   </xsl:choose>
4596
4597   <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/itermset"/>
4598   <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4599   <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/itermset"/>
4600 </xsl:template>
4601
4602 <xsl:template name="setindex.titlepage.verso">
4603 </xsl:template>
4604
4605 <xsl:template name="setindex.titlepage.separator">
4606 </xsl:template>
4607
4608 <xsl:template name="setindex.titlepage.before.recto">
4609 </xsl:template>
4610
4611 <xsl:template name="setindex.titlepage.before.verso">
4612 </xsl:template>
4613
4614 <xsl:template name="setindex.titlepage">
4615   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4616     <xsl:variable name="recto.content">
4617       <xsl:call-template name="setindex.titlepage.before.recto"/>
4618       <xsl:call-template name="setindex.titlepage.recto"/>
4619     </xsl:variable>
4620     <xsl:variable name="recto.elements.count">
4621       <xsl:choose>
4622         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4623         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4624           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4625         <xsl:otherwise>1</xsl:otherwise>
4626       </xsl:choose>
4627     </xsl:variable>
4628     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4629       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4630     </xsl:if>
4631     <xsl:variable name="verso.content">
4632       <xsl:call-template name="setindex.titlepage.before.verso"/>
4633       <xsl:call-template name="setindex.titlepage.verso"/>
4634     </xsl:variable>
4635     <xsl:variable name="verso.elements.count">
4636       <xsl:choose>
4637         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4638         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4639           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4640         <xsl:otherwise>1</xsl:otherwise>
4641       </xsl:choose>
4642     </xsl:variable>
4643     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4644       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4645     </xsl:if>
4646     <xsl:call-template name="setindex.titlepage.separator"/>
4647   </fo:block>
4648 </xsl:template>
4649
4650 <xsl:template match="*" mode="setindex.titlepage.recto.mode">
4651   <!-- if an element isn't found in this mode, -->
4652   <!-- try the generic titlepage.mode -->
4653   <xsl:apply-templates select="." mode="titlepage.mode"/>
4654 </xsl:template>
4655
4656 <xsl:template match="*" mode="setindex.titlepage.verso.mode">
4657   <!-- if an element isn't found in this mode, -->
4658   <!-- try the generic titlepage.mode -->
4659   <xsl:apply-templates select="." mode="titlepage.mode"/>
4660 </xsl:template>
4661
4662 <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
4663 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
4664 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
4665 </fo:block>
4666 </xsl:template>
4667
4668 <xsl:template match="itermset" mode="setindex.titlepage.recto.auto.mode">
4669 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style">
4670 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
4671 </fo:block>
4672 </xsl:template>
4673
4674 <xsl:template name="colophon.titlepage.recto">
4675   <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">
4676 <xsl:call-template name="component.title">
4677 <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
4678 </xsl:call-template></fo:block>
4679   <xsl:choose>
4680     <xsl:when test="colophoninfo/subtitle">
4681       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
4682     </xsl:when>
4683     <xsl:when test="docinfo/subtitle">
4684       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4685     </xsl:when>
4686     <xsl:when test="info/subtitle">
4687       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
4688     </xsl:when>
4689     <xsl:when test="subtitle">
4690       <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
4691     </xsl:when>
4692   </xsl:choose>
4693
4694   <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/itermset"/>
4695   <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4696   <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/itermset"/>
4697 </xsl:template>
4698
4699 <xsl:template name="colophon.titlepage.verso">
4700 </xsl:template>
4701
4702 <xsl:template name="colophon.titlepage.separator">
4703 </xsl:template>
4704
4705 <xsl:template name="colophon.titlepage.before.recto">
4706 </xsl:template>
4707
4708 <xsl:template name="colophon.titlepage.before.verso">
4709 </xsl:template>
4710
4711 <xsl:template name="colophon.titlepage">
4712   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4713     <xsl:variable name="recto.content">
4714       <xsl:call-template name="colophon.titlepage.before.recto"/>
4715       <xsl:call-template name="colophon.titlepage.recto"/>
4716     </xsl:variable>
4717     <xsl:variable name="recto.elements.count">
4718       <xsl:choose>
4719         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4720         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4721           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4722         <xsl:otherwise>1</xsl:otherwise>
4723       </xsl:choose>
4724     </xsl:variable>
4725     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4726       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4727     </xsl:if>
4728     <xsl:variable name="verso.content">
4729       <xsl:call-template name="colophon.titlepage.before.verso"/>
4730       <xsl:call-template name="colophon.titlepage.verso"/>
4731     </xsl:variable>
4732     <xsl:variable name="verso.elements.count">
4733       <xsl:choose>
4734         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4735         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4736           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4737         <xsl:otherwise>1</xsl:otherwise>
4738       </xsl:choose>
4739     </xsl:variable>
4740     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4741       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4742     </xsl:if>
4743     <xsl:call-template name="colophon.titlepage.separator"/>
4744   </fo:block>
4745 </xsl:template>
4746
4747 <xsl:template match="*" mode="colophon.titlepage.recto.mode">
4748   <!-- if an element isn't found in this mode, -->
4749   <!-- try the generic titlepage.mode -->
4750   <xsl:apply-templates select="." mode="titlepage.mode"/>
4751 </xsl:template>
4752
4753 <xsl:template match="*" mode="colophon.titlepage.verso.mode">
4754   <!-- if an element isn't found in this mode, -->
4755   <!-- try the generic titlepage.mode -->
4756   <xsl:apply-templates select="." mode="titlepage.mode"/>
4757 </xsl:template>
4758
4759 <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
4760 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
4761 <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
4762 </fo:block>
4763 </xsl:template>
4764
4765 <xsl:template match="itermset" mode="colophon.titlepage.recto.auto.mode">
4766 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style">
4767 <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
4768 </fo:block>
4769 </xsl:template>
4770
4771 <xsl:template name="sidebar.titlepage.recto">
4772   <xsl:choose>
4773     <xsl:when test="sidebarinfo/title">
4774       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
4775     </xsl:when>
4776     <xsl:when test="docinfo/title">
4777       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
4778     </xsl:when>
4779     <xsl:when test="info/title">
4780       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
4781     </xsl:when>
4782     <xsl:when test="title">
4783       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
4784     </xsl:when>
4785   </xsl:choose>
4786
4787   <xsl:choose>
4788     <xsl:when test="sidebarinfo/subtitle">
4789       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
4790     </xsl:when>
4791     <xsl:when test="docinfo/subtitle">
4792       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
4793     </xsl:when>
4794     <xsl:when test="info/subtitle">
4795       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
4796     </xsl:when>
4797     <xsl:when test="subtitle">
4798       <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
4799     </xsl:when>
4800   </xsl:choose>
4801
4802   <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/itermset"/>
4803   <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/itermset"/>
4804   <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/itermset"/>
4805 </xsl:template>
4806
4807 <xsl:template name="sidebar.titlepage.verso">
4808 </xsl:template>
4809
4810 <xsl:template name="sidebar.titlepage.separator">
4811 </xsl:template>
4812
4813 <xsl:template name="sidebar.titlepage.before.recto">
4814 </xsl:template>
4815
4816 <xsl:template name="sidebar.titlepage.before.verso">
4817 </xsl:template>
4818
4819 <xsl:template name="sidebar.titlepage">
4820   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
4821     <xsl:variable name="recto.content">
4822       <xsl:call-template name="sidebar.titlepage.before.recto"/>
4823       <xsl:call-template name="sidebar.titlepage.recto"/>
4824     </xsl:variable>
4825     <xsl:variable name="recto.elements.count">
4826       <xsl:choose>
4827         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4828         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4829           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4830         <xsl:otherwise>1</xsl:otherwise>
4831       </xsl:choose>
4832     </xsl:variable>
4833     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4834       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
4835     </xsl:if>
4836     <xsl:variable name="verso.content">
4837       <xsl:call-template name="sidebar.titlepage.before.verso"/>
4838       <xsl:call-template name="sidebar.titlepage.verso"/>
4839     </xsl:variable>
4840     <xsl:variable name="verso.elements.count">
4841       <xsl:choose>
4842         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4843         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4844           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4845         <xsl:otherwise>1</xsl:otherwise>
4846       </xsl:choose>
4847     </xsl:variable>
4848     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4849       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4850     </xsl:if>
4851     <xsl:call-template name="sidebar.titlepage.separator"/>
4852   </fo:block>
4853 </xsl:template>
4854
4855 <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
4856   <!-- if an element isn't found in this mode, -->
4857   <!-- try the generic titlepage.mode -->
4858   <xsl:apply-templates select="." mode="titlepage.mode"/>
4859 </xsl:template>
4860
4861 <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
4862   <!-- if an element isn't found in this mode, -->
4863   <!-- try the generic titlepage.mode -->
4864   <xsl:apply-templates select="." mode="titlepage.mode"/>
4865 </xsl:template>
4866
4867 <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
4868 <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">
4869 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4870 </fo:block>
4871 </xsl:template>
4872
4873 <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
4874 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
4875 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4876 </fo:block>
4877 </xsl:template>
4878
4879 <xsl:template match="itermset" mode="sidebar.titlepage.recto.auto.mode">
4880 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style">
4881 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
4882 </fo:block>
4883 </xsl:template>
4884
4885 <xsl:template name="qandaset.titlepage.recto">
4886   <xsl:choose>
4887     <xsl:when test="qandasetinfo/title">
4888       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
4889     </xsl:when>
4890     <xsl:when test="blockinfo/title">
4891       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
4892     </xsl:when>
4893     <xsl:when test="info/title">
4894       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
4895     </xsl:when>
4896     <xsl:when test="title">
4897       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
4898     </xsl:when>
4899   </xsl:choose>
4900
4901   <xsl:choose>
4902     <xsl:when test="qandasetinfo/subtitle">
4903       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
4904     </xsl:when>
4905     <xsl:when test="blockinfo/subtitle">
4906       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
4907     </xsl:when>
4908     <xsl:when test="info/subtitle">
4909       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
4910     </xsl:when>
4911     <xsl:when test="subtitle">
4912       <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
4913     </xsl:when>
4914   </xsl:choose>
4915
4916   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
4917   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
4918   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
4919   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
4920   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
4921   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
4922   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
4923   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
4924   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
4925   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
4926   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
4927   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
4928   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
4929   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
4930   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
4931   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
4932   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
4933   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
4934   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
4935   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
4936   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
4937   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
4938   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
4939   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
4940   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
4941   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
4942   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
4943   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
4944   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
4945   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
4946   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
4947   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
4948   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
4949   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/itermset"/>
4950   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/itermset"/>
4951   <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/itermset"/>
4952 </xsl:template>
4953
4954 <xsl:template name="qandaset.titlepage.verso">
4955 </xsl:template>
4956
4957 <xsl:template name="qandaset.titlepage.separator">
4958 </xsl:template>
4959
4960 <xsl:template name="qandaset.titlepage.before.recto">
4961 </xsl:template>
4962
4963 <xsl:template name="qandaset.titlepage.before.verso">
4964 </xsl:template>
4965
4966 <xsl:template name="qandaset.titlepage">
4967   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
4968     <xsl:variable name="recto.content">
4969       <xsl:call-template name="qandaset.titlepage.before.recto"/>
4970       <xsl:call-template name="qandaset.titlepage.recto"/>
4971     </xsl:variable>
4972     <xsl:variable name="recto.elements.count">
4973       <xsl:choose>
4974         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4975         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4976           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
4977         <xsl:otherwise>1</xsl:otherwise>
4978       </xsl:choose>
4979     </xsl:variable>
4980     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
4981       <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
4982     </xsl:if>
4983     <xsl:variable name="verso.content">
4984       <xsl:call-template name="qandaset.titlepage.before.verso"/>
4985       <xsl:call-template name="qandaset.titlepage.verso"/>
4986     </xsl:variable>
4987     <xsl:variable name="verso.elements.count">
4988       <xsl:choose>
4989         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4990         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
4991           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
4992         <xsl:otherwise>1</xsl:otherwise>
4993       </xsl:choose>
4994     </xsl:variable>
4995     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
4996       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
4997     </xsl:if>
4998     <xsl:call-template name="qandaset.titlepage.separator"/>
4999   </fo:block>
5000 </xsl:template>
5001
5002 <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
5003   <!-- if an element isn't found in this mode, -->
5004   <!-- try the generic titlepage.mode -->
5005   <xsl:apply-templates select="." mode="titlepage.mode"/>
5006 </xsl:template>
5007
5008 <xsl:template match="*" mode="qandaset.titlepage.verso.mode">
5009   <!-- if an element isn't found in this mode, -->
5010   <!-- try the generic titlepage.mode -->
5011   <xsl:apply-templates select="." mode="titlepage.mode"/>
5012 </xsl:template>
5013
5014 <xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
5015 <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">
5016 <xsl:call-template name="component.title">
5017 <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
5018 </xsl:call-template>
5019 </fo:block>
5020 </xsl:template>
5021
5022 <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
5023 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
5024 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5025 </fo:block>
5026 </xsl:template>
5027
5028 <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
5029 <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">
5030 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5031 </fo:block>
5032 </xsl:template>
5033
5034 <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
5035 <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">
5036 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5037 </fo:block>
5038 </xsl:template>
5039
5040 <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
5041 <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">
5042 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5043 </fo:block>
5044 </xsl:template>
5045
5046 <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
5047 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5048 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5049 </fo:block>
5050 </xsl:template>
5051
5052 <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
5053 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5054 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5055 </fo:block>
5056 </xsl:template>
5057
5058 <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
5059 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5060 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5061 </fo:block>
5062 </xsl:template>
5063
5064 <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
5065 <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}">
5066 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5067 </fo:block>
5068 </xsl:template>
5069
5070 <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
5071 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5072 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5073 </fo:block>
5074 </xsl:template>
5075
5076 <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
5077 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5078 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5079 </fo:block>
5080 </xsl:template>
5081
5082 <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
5083 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
5084 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5085 </fo:block>
5086 </xsl:template>
5087
5088 <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
5089 <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}">
5090 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5091 </fo:block>
5092 </xsl:template>
5093
5094 <xsl:template match="itermset" mode="qandaset.titlepage.recto.auto.mode">
5095 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
5096 <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
5097 </fo:block>
5098 </xsl:template>
5099
5100 <xsl:template name="table.of.contents.titlepage.recto">
5101   <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}">
5102 <xsl:call-template name="gentext">
5103 <xsl:with-param name="key" select="'TableofContents'"/>
5104 </xsl:call-template></fo:block>
5105 </xsl:template>
5106
5107 <xsl:template name="table.of.contents.titlepage.verso">
5108 </xsl:template>
5109
5110 <xsl:template name="table.of.contents.titlepage.separator">
5111 </xsl:template>
5112
5113 <xsl:template name="table.of.contents.titlepage.before.recto">
5114 </xsl:template>
5115
5116 <xsl:template name="table.of.contents.titlepage.before.verso">
5117 </xsl:template>
5118
5119 <xsl:template name="table.of.contents.titlepage">
5120   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5121     <xsl:variable name="recto.content">
5122       <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
5123       <xsl:call-template name="table.of.contents.titlepage.recto"/>
5124     </xsl:variable>
5125     <xsl:variable name="recto.elements.count">
5126       <xsl:choose>
5127         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5128         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5129           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5130         <xsl:otherwise>1</xsl:otherwise>
5131       </xsl:choose>
5132     </xsl:variable>
5133     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5134       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5135     </xsl:if>
5136     <xsl:variable name="verso.content">
5137       <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
5138       <xsl:call-template name="table.of.contents.titlepage.verso"/>
5139     </xsl:variable>
5140     <xsl:variable name="verso.elements.count">
5141       <xsl:choose>
5142         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5143         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5144           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5145         <xsl:otherwise>1</xsl:otherwise>
5146       </xsl:choose>
5147     </xsl:variable>
5148     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5149       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5150     </xsl:if>
5151     <xsl:call-template name="table.of.contents.titlepage.separator"/>
5152   </fo:block>
5153 </xsl:template>
5154
5155 <xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
5156   <!-- if an element isn't found in this mode, -->
5157   <!-- try the generic titlepage.mode -->
5158   <xsl:apply-templates select="." mode="titlepage.mode"/>
5159 </xsl:template>
5160
5161 <xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
5162   <!-- if an element isn't found in this mode, -->
5163   <!-- try the generic titlepage.mode -->
5164   <xsl:apply-templates select="." mode="titlepage.mode"/>
5165 </xsl:template>
5166
5167 <xsl:template name="list.of.tables.titlepage.recto">
5168   <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}">
5169 <xsl:call-template name="gentext">
5170 <xsl:with-param name="key" select="'ListofTables'"/>
5171 </xsl:call-template></fo:block>
5172 </xsl:template>
5173
5174 <xsl:template name="list.of.tables.titlepage.verso">
5175 </xsl:template>
5176
5177 <xsl:template name="list.of.tables.titlepage.separator">
5178 </xsl:template>
5179
5180 <xsl:template name="list.of.tables.titlepage.before.recto">
5181 </xsl:template>
5182
5183 <xsl:template name="list.of.tables.titlepage.before.verso">
5184 </xsl:template>
5185
5186 <xsl:template name="list.of.tables.titlepage">
5187   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5188     <xsl:variable name="recto.content">
5189       <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
5190       <xsl:call-template name="list.of.tables.titlepage.recto"/>
5191     </xsl:variable>
5192     <xsl:variable name="recto.elements.count">
5193       <xsl:choose>
5194         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5195         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5196           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5197         <xsl:otherwise>1</xsl:otherwise>
5198       </xsl:choose>
5199     </xsl:variable>
5200     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5201       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5202     </xsl:if>
5203     <xsl:variable name="verso.content">
5204       <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
5205       <xsl:call-template name="list.of.tables.titlepage.verso"/>
5206     </xsl:variable>
5207     <xsl:variable name="verso.elements.count">
5208       <xsl:choose>
5209         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5210         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5211           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5212         <xsl:otherwise>1</xsl:otherwise>
5213       </xsl:choose>
5214     </xsl:variable>
5215     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5216       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5217     </xsl:if>
5218     <xsl:call-template name="list.of.tables.titlepage.separator"/>
5219   </fo:block>
5220 </xsl:template>
5221
5222 <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
5223   <!-- if an element isn't found in this mode, -->
5224   <!-- try the generic titlepage.mode -->
5225   <xsl:apply-templates select="." mode="titlepage.mode"/>
5226 </xsl:template>
5227
5228 <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
5229   <!-- if an element isn't found in this mode, -->
5230   <!-- try the generic titlepage.mode -->
5231   <xsl:apply-templates select="." mode="titlepage.mode"/>
5232 </xsl:template>
5233
5234 <xsl:template name="list.of.figures.titlepage.recto">
5235   <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}">
5236 <xsl:call-template name="gentext">
5237 <xsl:with-param name="key" select="'ListofFigures'"/>
5238 </xsl:call-template></fo:block>
5239 </xsl:template>
5240
5241 <xsl:template name="list.of.figures.titlepage.verso">
5242 </xsl:template>
5243
5244 <xsl:template name="list.of.figures.titlepage.separator">
5245 </xsl:template>
5246
5247 <xsl:template name="list.of.figures.titlepage.before.recto">
5248 </xsl:template>
5249
5250 <xsl:template name="list.of.figures.titlepage.before.verso">
5251 </xsl:template>
5252
5253 <xsl:template name="list.of.figures.titlepage">
5254   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5255     <xsl:variable name="recto.content">
5256       <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
5257       <xsl:call-template name="list.of.figures.titlepage.recto"/>
5258     </xsl:variable>
5259     <xsl:variable name="recto.elements.count">
5260       <xsl:choose>
5261         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5262         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5263           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5264         <xsl:otherwise>1</xsl:otherwise>
5265       </xsl:choose>
5266     </xsl:variable>
5267     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5268       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5269     </xsl:if>
5270     <xsl:variable name="verso.content">
5271       <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
5272       <xsl:call-template name="list.of.figures.titlepage.verso"/>
5273     </xsl:variable>
5274     <xsl:variable name="verso.elements.count">
5275       <xsl:choose>
5276         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5277         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5278           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5279         <xsl:otherwise>1</xsl:otherwise>
5280       </xsl:choose>
5281     </xsl:variable>
5282     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5283       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5284     </xsl:if>
5285     <xsl:call-template name="list.of.figures.titlepage.separator"/>
5286   </fo:block>
5287 </xsl:template>
5288
5289 <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
5290   <!-- if an element isn't found in this mode, -->
5291   <!-- try the generic titlepage.mode -->
5292   <xsl:apply-templates select="." mode="titlepage.mode"/>
5293 </xsl:template>
5294
5295 <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
5296   <!-- if an element isn't found in this mode, -->
5297   <!-- try the generic titlepage.mode -->
5298   <xsl:apply-templates select="." mode="titlepage.mode"/>
5299 </xsl:template>
5300
5301 <xsl:template name="list.of.examples.titlepage.recto">
5302   <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}">
5303 <xsl:call-template name="gentext">
5304 <xsl:with-param name="key" select="'ListofExamples'"/>
5305 </xsl:call-template></fo:block>
5306 </xsl:template>
5307
5308 <xsl:template name="list.of.examples.titlepage.verso">
5309 </xsl:template>
5310
5311 <xsl:template name="list.of.examples.titlepage.separator">
5312 </xsl:template>
5313
5314 <xsl:template name="list.of.examples.titlepage.before.recto">
5315 </xsl:template>
5316
5317 <xsl:template name="list.of.examples.titlepage.before.verso">
5318 </xsl:template>
5319
5320 <xsl:template name="list.of.examples.titlepage">
5321   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5322     <xsl:variable name="recto.content">
5323       <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
5324       <xsl:call-template name="list.of.examples.titlepage.recto"/>
5325     </xsl:variable>
5326     <xsl:variable name="recto.elements.count">
5327       <xsl:choose>
5328         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5329         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5330           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5331         <xsl:otherwise>1</xsl:otherwise>
5332       </xsl:choose>
5333     </xsl:variable>
5334     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5335       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5336     </xsl:if>
5337     <xsl:variable name="verso.content">
5338       <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
5339       <xsl:call-template name="list.of.examples.titlepage.verso"/>
5340     </xsl:variable>
5341     <xsl:variable name="verso.elements.count">
5342       <xsl:choose>
5343         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5344         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5345           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5346         <xsl:otherwise>1</xsl:otherwise>
5347       </xsl:choose>
5348     </xsl:variable>
5349     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5350       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5351     </xsl:if>
5352     <xsl:call-template name="list.of.examples.titlepage.separator"/>
5353   </fo:block>
5354 </xsl:template>
5355
5356 <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
5357   <!-- if an element isn't found in this mode, -->
5358   <!-- try the generic titlepage.mode -->
5359   <xsl:apply-templates select="." mode="titlepage.mode"/>
5360 </xsl:template>
5361
5362 <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
5363   <!-- if an element isn't found in this mode, -->
5364   <!-- try the generic titlepage.mode -->
5365   <xsl:apply-templates select="." mode="titlepage.mode"/>
5366 </xsl:template>
5367
5368 <xsl:template name="list.of.equations.titlepage.recto">
5369   <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}">
5370 <xsl:call-template name="gentext">
5371 <xsl:with-param name="key" select="'ListofEquations'"/>
5372 </xsl:call-template></fo:block>
5373 </xsl:template>
5374
5375 <xsl:template name="list.of.equations.titlepage.verso">
5376 </xsl:template>
5377
5378 <xsl:template name="list.of.equations.titlepage.separator">
5379 </xsl:template>
5380
5381 <xsl:template name="list.of.equations.titlepage.before.recto">
5382 </xsl:template>
5383
5384 <xsl:template name="list.of.equations.titlepage.before.verso">
5385 </xsl:template>
5386
5387 <xsl:template name="list.of.equations.titlepage">
5388   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5389     <xsl:variable name="recto.content">
5390       <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
5391       <xsl:call-template name="list.of.equations.titlepage.recto"/>
5392     </xsl:variable>
5393     <xsl:variable name="recto.elements.count">
5394       <xsl:choose>
5395         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5396         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5397           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5398         <xsl:otherwise>1</xsl:otherwise>
5399       </xsl:choose>
5400     </xsl:variable>
5401     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5402       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5403     </xsl:if>
5404     <xsl:variable name="verso.content">
5405       <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
5406       <xsl:call-template name="list.of.equations.titlepage.verso"/>
5407     </xsl:variable>
5408     <xsl:variable name="verso.elements.count">
5409       <xsl:choose>
5410         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5411         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5412           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5413         <xsl:otherwise>1</xsl:otherwise>
5414       </xsl:choose>
5415     </xsl:variable>
5416     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5417       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5418     </xsl:if>
5419     <xsl:call-template name="list.of.equations.titlepage.separator"/>
5420   </fo:block>
5421 </xsl:template>
5422
5423 <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
5424   <!-- if an element isn't found in this mode, -->
5425   <!-- try the generic titlepage.mode -->
5426   <xsl:apply-templates select="." mode="titlepage.mode"/>
5427 </xsl:template>
5428
5429 <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
5430   <!-- if an element isn't found in this mode, -->
5431   <!-- try the generic titlepage.mode -->
5432   <xsl:apply-templates select="." mode="titlepage.mode"/>
5433 </xsl:template>
5434
5435 <xsl:template name="list.of.procedures.titlepage.recto">
5436   <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}">
5437 <xsl:call-template name="gentext">
5438 <xsl:with-param name="key" select="'ListofProcedures'"/>
5439 </xsl:call-template></fo:block>
5440 </xsl:template>
5441
5442 <xsl:template name="list.of.procedures.titlepage.verso">
5443 </xsl:template>
5444
5445 <xsl:template name="list.of.procedures.titlepage.separator">
5446 </xsl:template>
5447
5448 <xsl:template name="list.of.procedures.titlepage.before.recto">
5449 </xsl:template>
5450
5451 <xsl:template name="list.of.procedures.titlepage.before.verso">
5452 </xsl:template>
5453
5454 <xsl:template name="list.of.procedures.titlepage">
5455   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5456     <xsl:variable name="recto.content">
5457       <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
5458       <xsl:call-template name="list.of.procedures.titlepage.recto"/>
5459     </xsl:variable>
5460     <xsl:variable name="recto.elements.count">
5461       <xsl:choose>
5462         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5463         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5464           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5465         <xsl:otherwise>1</xsl:otherwise>
5466       </xsl:choose>
5467     </xsl:variable>
5468     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5469       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5470     </xsl:if>
5471     <xsl:variable name="verso.content">
5472       <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
5473       <xsl:call-template name="list.of.procedures.titlepage.verso"/>
5474     </xsl:variable>
5475     <xsl:variable name="verso.elements.count">
5476       <xsl:choose>
5477         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5478         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5479           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5480         <xsl:otherwise>1</xsl:otherwise>
5481       </xsl:choose>
5482     </xsl:variable>
5483     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5484       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5485     </xsl:if>
5486     <xsl:call-template name="list.of.procedures.titlepage.separator"/>
5487   </fo:block>
5488 </xsl:template>
5489
5490 <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
5491   <!-- if an element isn't found in this mode, -->
5492   <!-- try the generic titlepage.mode -->
5493   <xsl:apply-templates select="." mode="titlepage.mode"/>
5494 </xsl:template>
5495
5496 <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
5497   <!-- if an element isn't found in this mode, -->
5498   <!-- try the generic titlepage.mode -->
5499   <xsl:apply-templates select="." mode="titlepage.mode"/>
5500 </xsl:template>
5501
5502 <xsl:template name="list.of.unknowns.titlepage.recto">
5503   <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}">
5504 <xsl:call-template name="gentext">
5505 <xsl:with-param name="key" select="'ListofUnknown'"/>
5506 </xsl:call-template></fo:block>
5507 </xsl:template>
5508
5509 <xsl:template name="list.of.unknowns.titlepage.verso">
5510 </xsl:template>
5511
5512 <xsl:template name="list.of.unknowns.titlepage.separator">
5513 </xsl:template>
5514
5515 <xsl:template name="list.of.unknowns.titlepage.before.recto">
5516 </xsl:template>
5517
5518 <xsl:template name="list.of.unknowns.titlepage.before.verso">
5519 </xsl:template>
5520
5521 <xsl:template name="list.of.unknowns.titlepage">
5522   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5523     <xsl:variable name="recto.content">
5524       <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
5525       <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
5526     </xsl:variable>
5527     <xsl:variable name="recto.elements.count">
5528       <xsl:choose>
5529         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5530         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5531           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5532         <xsl:otherwise>1</xsl:otherwise>
5533       </xsl:choose>
5534     </xsl:variable>
5535     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5536       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5537     </xsl:if>
5538     <xsl:variable name="verso.content">
5539       <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
5540       <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
5541     </xsl:variable>
5542     <xsl:variable name="verso.elements.count">
5543       <xsl:choose>
5544         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5545         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5546           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5547         <xsl:otherwise>1</xsl:otherwise>
5548       </xsl:choose>
5549     </xsl:variable>
5550     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5551       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5552     </xsl:if>
5553     <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
5554   </fo:block>
5555 </xsl:template>
5556
5557 <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
5558   <!-- if an element isn't found in this mode, -->
5559   <!-- try the generic titlepage.mode -->
5560   <xsl:apply-templates select="." mode="titlepage.mode"/>
5561 </xsl:template>
5562
5563 <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
5564   <!-- if an element isn't found in this mode, -->
5565   <!-- try the generic titlepage.mode -->
5566   <xsl:apply-templates select="." mode="titlepage.mode"/>
5567 </xsl:template>
5568
5569 <xsl:template name="component.list.of.tables.titlepage.recto">
5570   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
5571 <xsl:call-template name="gentext">
5572 <xsl:with-param name="key" select="'ListofTables'"/>
5573 </xsl:call-template></fo:block>
5574 </xsl:template>
5575
5576 <xsl:template name="component.list.of.tables.titlepage.verso">
5577 </xsl:template>
5578
5579 <xsl:template name="component.list.of.tables.titlepage.separator">
5580 </xsl:template>
5581
5582 <xsl:template name="component.list.of.tables.titlepage.before.recto">
5583 </xsl:template>
5584
5585 <xsl:template name="component.list.of.tables.titlepage.before.verso">
5586 </xsl:template>
5587
5588 <xsl:template name="component.list.of.tables.titlepage">
5589   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5590     <xsl:variable name="recto.content">
5591       <xsl:call-template name="component.list.of.tables.titlepage.before.recto"/>
5592       <xsl:call-template name="component.list.of.tables.titlepage.recto"/>
5593     </xsl:variable>
5594     <xsl:variable name="recto.elements.count">
5595       <xsl:choose>
5596         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5597         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5598           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5599         <xsl:otherwise>1</xsl:otherwise>
5600       </xsl:choose>
5601     </xsl:variable>
5602     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5603       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5604     </xsl:if>
5605     <xsl:variable name="verso.content">
5606       <xsl:call-template name="component.list.of.tables.titlepage.before.verso"/>
5607       <xsl:call-template name="component.list.of.tables.titlepage.verso"/>
5608     </xsl:variable>
5609     <xsl:variable name="verso.elements.count">
5610       <xsl:choose>
5611         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5612         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5613           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5614         <xsl:otherwise>1</xsl:otherwise>
5615       </xsl:choose>
5616     </xsl:variable>
5617     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5618       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5619     </xsl:if>
5620     <xsl:call-template name="component.list.of.tables.titlepage.separator"/>
5621   </fo:block>
5622 </xsl:template>
5623
5624 <xsl:template match="*" mode="component.list.of.tables.titlepage.recto.mode">
5625   <!-- if an element isn't found in this mode, -->
5626   <!-- try the generic titlepage.mode -->
5627   <xsl:apply-templates select="." mode="titlepage.mode"/>
5628 </xsl:template>
5629
5630 <xsl:template match="*" mode="component.list.of.tables.titlepage.verso.mode">
5631   <!-- if an element isn't found in this mode, -->
5632   <!-- try the generic titlepage.mode -->
5633   <xsl:apply-templates select="." mode="titlepage.mode"/>
5634 </xsl:template>
5635
5636 <xsl:template name="component.list.of.figures.titlepage.recto">
5637   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
5638 <xsl:call-template name="gentext">
5639 <xsl:with-param name="key" select="'ListofFigures'"/>
5640 </xsl:call-template></fo:block>
5641 </xsl:template>
5642
5643 <xsl:template name="component.list.of.figures.titlepage.verso">
5644 </xsl:template>
5645
5646 <xsl:template name="component.list.of.figures.titlepage.separator">
5647 </xsl:template>
5648
5649 <xsl:template name="component.list.of.figures.titlepage.before.recto">
5650 </xsl:template>
5651
5652 <xsl:template name="component.list.of.figures.titlepage.before.verso">
5653 </xsl:template>
5654
5655 <xsl:template name="component.list.of.figures.titlepage">
5656   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5657     <xsl:variable name="recto.content">
5658       <xsl:call-template name="component.list.of.figures.titlepage.before.recto"/>
5659       <xsl:call-template name="component.list.of.figures.titlepage.recto"/>
5660     </xsl:variable>
5661     <xsl:variable name="recto.elements.count">
5662       <xsl:choose>
5663         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5664         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5665           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5666         <xsl:otherwise>1</xsl:otherwise>
5667       </xsl:choose>
5668     </xsl:variable>
5669     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5670       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5671     </xsl:if>
5672     <xsl:variable name="verso.content">
5673       <xsl:call-template name="component.list.of.figures.titlepage.before.verso"/>
5674       <xsl:call-template name="component.list.of.figures.titlepage.verso"/>
5675     </xsl:variable>
5676     <xsl:variable name="verso.elements.count">
5677       <xsl:choose>
5678         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5679         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5680           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5681         <xsl:otherwise>1</xsl:otherwise>
5682       </xsl:choose>
5683     </xsl:variable>
5684     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5685       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5686     </xsl:if>
5687     <xsl:call-template name="component.list.of.figures.titlepage.separator"/>
5688   </fo:block>
5689 </xsl:template>
5690
5691 <xsl:template match="*" mode="component.list.of.figures.titlepage.recto.mode">
5692   <!-- if an element isn't found in this mode, -->
5693   <!-- try the generic titlepage.mode -->
5694   <xsl:apply-templates select="." mode="titlepage.mode"/>
5695 </xsl:template>
5696
5697 <xsl:template match="*" mode="component.list.of.figures.titlepage.verso.mode">
5698   <!-- if an element isn't found in this mode, -->
5699   <!-- try the generic titlepage.mode -->
5700   <xsl:apply-templates select="." mode="titlepage.mode"/>
5701 </xsl:template>
5702
5703 <xsl:template name="component.list.of.examples.titlepage.recto">
5704   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
5705 <xsl:call-template name="gentext">
5706 <xsl:with-param name="key" select="'ListofExamples'"/>
5707 </xsl:call-template></fo:block>
5708 </xsl:template>
5709
5710 <xsl:template name="component.list.of.examples.titlepage.verso">
5711 </xsl:template>
5712
5713 <xsl:template name="component.list.of.examples.titlepage.separator">
5714 </xsl:template>
5715
5716 <xsl:template name="component.list.of.examples.titlepage.before.recto">
5717 </xsl:template>
5718
5719 <xsl:template name="component.list.of.examples.titlepage.before.verso">
5720 </xsl:template>
5721
5722 <xsl:template name="component.list.of.examples.titlepage">
5723   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5724     <xsl:variable name="recto.content">
5725       <xsl:call-template name="component.list.of.examples.titlepage.before.recto"/>
5726       <xsl:call-template name="component.list.of.examples.titlepage.recto"/>
5727     </xsl:variable>
5728     <xsl:variable name="recto.elements.count">
5729       <xsl:choose>
5730         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5731         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5732           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5733         <xsl:otherwise>1</xsl:otherwise>
5734       </xsl:choose>
5735     </xsl:variable>
5736     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5737       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5738     </xsl:if>
5739     <xsl:variable name="verso.content">
5740       <xsl:call-template name="component.list.of.examples.titlepage.before.verso"/>
5741       <xsl:call-template name="component.list.of.examples.titlepage.verso"/>
5742     </xsl:variable>
5743     <xsl:variable name="verso.elements.count">
5744       <xsl:choose>
5745         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5746         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5747           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5748         <xsl:otherwise>1</xsl:otherwise>
5749       </xsl:choose>
5750     </xsl:variable>
5751     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5752       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5753     </xsl:if>
5754     <xsl:call-template name="component.list.of.examples.titlepage.separator"/>
5755   </fo:block>
5756 </xsl:template>
5757
5758 <xsl:template match="*" mode="component.list.of.examples.titlepage.recto.mode">
5759   <!-- if an element isn't found in this mode, -->
5760   <!-- try the generic titlepage.mode -->
5761   <xsl:apply-templates select="." mode="titlepage.mode"/>
5762 </xsl:template>
5763
5764 <xsl:template match="*" mode="component.list.of.examples.titlepage.verso.mode">
5765   <!-- if an element isn't found in this mode, -->
5766   <!-- try the generic titlepage.mode -->
5767   <xsl:apply-templates select="." mode="titlepage.mode"/>
5768 </xsl:template>
5769
5770 <xsl:template name="component.list.of.equations.titlepage.recto">
5771   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
5772 <xsl:call-template name="gentext">
5773 <xsl:with-param name="key" select="'ListofEquations'"/>
5774 </xsl:call-template></fo:block>
5775 </xsl:template>
5776
5777 <xsl:template name="component.list.of.equations.titlepage.verso">
5778 </xsl:template>
5779
5780 <xsl:template name="component.list.of.equations.titlepage.separator">
5781 </xsl:template>
5782
5783 <xsl:template name="component.list.of.equations.titlepage.before.recto">
5784 </xsl:template>
5785
5786 <xsl:template name="component.list.of.equations.titlepage.before.verso">
5787 </xsl:template>
5788
5789 <xsl:template name="component.list.of.equations.titlepage">
5790   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5791     <xsl:variable name="recto.content">
5792       <xsl:call-template name="component.list.of.equations.titlepage.before.recto"/>
5793       <xsl:call-template name="component.list.of.equations.titlepage.recto"/>
5794     </xsl:variable>
5795     <xsl:variable name="recto.elements.count">
5796       <xsl:choose>
5797         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5798         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5799           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5800         <xsl:otherwise>1</xsl:otherwise>
5801       </xsl:choose>
5802     </xsl:variable>
5803     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5804       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5805     </xsl:if>
5806     <xsl:variable name="verso.content">
5807       <xsl:call-template name="component.list.of.equations.titlepage.before.verso"/>
5808       <xsl:call-template name="component.list.of.equations.titlepage.verso"/>
5809     </xsl:variable>
5810     <xsl:variable name="verso.elements.count">
5811       <xsl:choose>
5812         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5813         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5814           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5815         <xsl:otherwise>1</xsl:otherwise>
5816       </xsl:choose>
5817     </xsl:variable>
5818     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5819       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5820     </xsl:if>
5821     <xsl:call-template name="component.list.of.equations.titlepage.separator"/>
5822   </fo:block>
5823 </xsl:template>
5824
5825 <xsl:template match="*" mode="component.list.of.equations.titlepage.recto.mode">
5826   <!-- if an element isn't found in this mode, -->
5827   <!-- try the generic titlepage.mode -->
5828   <xsl:apply-templates select="." mode="titlepage.mode"/>
5829 </xsl:template>
5830
5831 <xsl:template match="*" mode="component.list.of.equations.titlepage.verso.mode">
5832   <!-- if an element isn't found in this mode, -->
5833   <!-- try the generic titlepage.mode -->
5834   <xsl:apply-templates select="." mode="titlepage.mode"/>
5835 </xsl:template>
5836
5837 <xsl:template name="component.list.of.procedures.titlepage.recto">
5838   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
5839 <xsl:call-template name="gentext">
5840 <xsl:with-param name="key" select="'ListofProcedures'"/>
5841 </xsl:call-template></fo:block>
5842 </xsl:template>
5843
5844 <xsl:template name="component.list.of.procedures.titlepage.verso">
5845 </xsl:template>
5846
5847 <xsl:template name="component.list.of.procedures.titlepage.separator">
5848 </xsl:template>
5849
5850 <xsl:template name="component.list.of.procedures.titlepage.before.recto">
5851 </xsl:template>
5852
5853 <xsl:template name="component.list.of.procedures.titlepage.before.verso">
5854 </xsl:template>
5855
5856 <xsl:template name="component.list.of.procedures.titlepage">
5857   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5858     <xsl:variable name="recto.content">
5859       <xsl:call-template name="component.list.of.procedures.titlepage.before.recto"/>
5860       <xsl:call-template name="component.list.of.procedures.titlepage.recto"/>
5861     </xsl:variable>
5862     <xsl:variable name="recto.elements.count">
5863       <xsl:choose>
5864         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5865         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5866           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5867         <xsl:otherwise>1</xsl:otherwise>
5868       </xsl:choose>
5869     </xsl:variable>
5870     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5871       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5872     </xsl:if>
5873     <xsl:variable name="verso.content">
5874       <xsl:call-template name="component.list.of.procedures.titlepage.before.verso"/>
5875       <xsl:call-template name="component.list.of.procedures.titlepage.verso"/>
5876     </xsl:variable>
5877     <xsl:variable name="verso.elements.count">
5878       <xsl:choose>
5879         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5880         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5881           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5882         <xsl:otherwise>1</xsl:otherwise>
5883       </xsl:choose>
5884     </xsl:variable>
5885     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5886       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5887     </xsl:if>
5888     <xsl:call-template name="component.list.of.procedures.titlepage.separator"/>
5889   </fo:block>
5890 </xsl:template>
5891
5892 <xsl:template match="*" mode="component.list.of.procedures.titlepage.recto.mode">
5893   <!-- if an element isn't found in this mode, -->
5894   <!-- try the generic titlepage.mode -->
5895   <xsl:apply-templates select="." mode="titlepage.mode"/>
5896 </xsl:template>
5897
5898 <xsl:template match="*" mode="component.list.of.procedures.titlepage.verso.mode">
5899   <!-- if an element isn't found in this mode, -->
5900   <!-- try the generic titlepage.mode -->
5901   <xsl:apply-templates select="." mode="titlepage.mode"/>
5902 </xsl:template>
5903
5904 <xsl:template name="component.list.of.unknowns.titlepage.recto">
5905   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="component.list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="12pt" font-weight="bold" font-family="{$title.fontset}">
5906 <xsl:call-template name="gentext">
5907 <xsl:with-param name="key" select="'ListofUnknown'"/>
5908 </xsl:call-template></fo:block>
5909 </xsl:template>
5910
5911 <xsl:template name="component.list.of.unknowns.titlepage.verso">
5912 </xsl:template>
5913
5914 <xsl:template name="component.list.of.unknowns.titlepage.separator">
5915 </xsl:template>
5916
5917 <xsl:template name="component.list.of.unknowns.titlepage.before.recto">
5918 </xsl:template>
5919
5920 <xsl:template name="component.list.of.unknowns.titlepage.before.verso">
5921 </xsl:template>
5922
5923 <xsl:template name="component.list.of.unknowns.titlepage">
5924   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
5925     <xsl:variable name="recto.content">
5926       <xsl:call-template name="component.list.of.unknowns.titlepage.before.recto"/>
5927       <xsl:call-template name="component.list.of.unknowns.titlepage.recto"/>
5928     </xsl:variable>
5929     <xsl:variable name="recto.elements.count">
5930       <xsl:choose>
5931         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5932         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5933           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
5934         <xsl:otherwise>1</xsl:otherwise>
5935       </xsl:choose>
5936     </xsl:variable>
5937     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
5938       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
5939     </xsl:if>
5940     <xsl:variable name="verso.content">
5941       <xsl:call-template name="component.list.of.unknowns.titlepage.before.verso"/>
5942       <xsl:call-template name="component.list.of.unknowns.titlepage.verso"/>
5943     </xsl:variable>
5944     <xsl:variable name="verso.elements.count">
5945       <xsl:choose>
5946         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5947         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
5948           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
5949         <xsl:otherwise>1</xsl:otherwise>
5950       </xsl:choose>
5951     </xsl:variable>
5952     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
5953       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
5954     </xsl:if>
5955     <xsl:call-template name="component.list.of.unknowns.titlepage.separator"/>
5956   </fo:block>
5957 </xsl:template>
5958
5959 <xsl:template match="*" mode="component.list.of.unknowns.titlepage.recto.mode">
5960   <!-- if an element isn't found in this mode, -->
5961   <!-- try the generic titlepage.mode -->
5962   <xsl:apply-templates select="." mode="titlepage.mode"/>
5963 </xsl:template>
5964
5965 <xsl:template match="*" mode="component.list.of.unknowns.titlepage.verso.mode">
5966   <!-- if an element isn't found in this mode, -->
5967   <!-- try the generic titlepage.mode -->
5968   <xsl:apply-templates select="." mode="titlepage.mode"/>
5969 </xsl:template>
5970
5971 </xsl:stylesheet>
5972