~todd-deshane/openstack-manuals/working

« back to all changes in this revision

Viewing changes to doc/buildpdf/rc-maven-cloud-docs/target/classes/cloud/fo/titlepage.templates.xsl

  • Committer: Anne Gentle
  • Date: 2011-04-04 17:54:52 UTC
  • Revision ID: anne@openstack.org-20110404175452-gtth3hfrniqhpp5o
Switching from Ant builds to Maven, still working out kinks but should be functional

Show diffs side-by-side

added added

removed removed

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