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