~annegentle/openstack-devel/working

« back to all changes in this revision

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

  • Committer: Anne Gentle
  • Date: 2011-01-28 23:01:29 UTC
  • Revision ID: anne@openstack.org-20110128230129-73peiiwoeebab2f9
Updates and edits while testing docs

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