docbook_xsl_wrapper 0.1.2 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/CHANGELOG +41 -0
  4. data/README.md +9 -17
  5. data/bin/docbook_xsl_wrapper +9 -14
  6. data/docbook_xsl_wrapper.gemspec +8 -7
  7. data/lib/docbook_xsl_wrapper.rb +24 -1
  8. data/lib/docbook_xsl_wrapper/epub.rb +124 -122
  9. data/lib/docbook_xsl_wrapper/options.rb +1 -1
  10. data/lib/docbook_xsl_wrapper/validate.rb +22 -0
  11. data/lib/docbook_xsl_wrapper/version.rb +1 -1
  12. data/schema/docbookxi.rng +18654 -0
  13. data/spec/docbook_xsl_wrapper/validate_spec.rb +64 -0
  14. data/xsl/AUTHORS +4 -0
  15. data/xsl/COPYING +48 -0
  16. data/xsl/REVISION +1 -0
  17. data/xsl/VERSION.xsl +115 -0
  18. data/xsl/common/addns.xsl +124 -0
  19. data/xsl/common/af.xml +1272 -0
  20. data/xsl/common/am.xml +1272 -0
  21. data/xsl/common/ar.xml +1272 -0
  22. data/xsl/common/as.xml +703 -0
  23. data/xsl/common/ast.xml +703 -0
  24. data/xsl/common/autoidx-kimber.xsl +45 -0
  25. data/xsl/common/autoidx-kosek.xsl +155 -0
  26. data/xsl/common/az.xml +715 -0
  27. data/xsl/common/bg.xml +767 -0
  28. data/xsl/common/bn.xml +1272 -0
  29. data/xsl/common/bn_in.xml +703 -0
  30. data/xsl/common/bs.xml +705 -0
  31. data/xsl/common/ca.xml +703 -0
  32. data/xsl/common/charmap.xsl +222 -0
  33. data/xsl/common/common.xsl +2129 -0
  34. data/xsl/common/cs.xml +743 -0
  35. data/xsl/common/cy.xml +1288 -0
  36. data/xsl/common/da.xml +707 -0
  37. data/xsl/common/de.xml +709 -0
  38. data/xsl/common/el.xml +772 -0
  39. data/xsl/common/en.xml +1272 -0
  40. data/xsl/common/entities.ent +67 -0
  41. data/xsl/common/eo.xml +1272 -0
  42. data/xsl/common/es.xml +719 -0
  43. data/xsl/common/et.xml +1272 -0
  44. data/xsl/common/eu.xml +1272 -0
  45. data/xsl/common/fa.xml +703 -0
  46. data/xsl/common/fi.xml +713 -0
  47. data/xsl/common/fr.xml +733 -0
  48. data/xsl/common/ga.xml +1272 -0
  49. data/xsl/common/gentext.xsl +855 -0
  50. data/xsl/common/gl.xml +1272 -0
  51. data/xsl/common/gu.xml +703 -0
  52. data/xsl/common/he.xml +1272 -0
  53. data/xsl/common/hi.xml +703 -0
  54. data/xsl/common/hr.xml +705 -0
  55. data/xsl/common/hu.xml +721 -0
  56. data/xsl/common/id.xml +1272 -0
  57. data/xsl/common/insertfile.xsl +113 -0
  58. data/xsl/common/is.xml +715 -0
  59. data/xsl/common/it.xml +1272 -0
  60. data/xsl/common/ja.xml +703 -0
  61. data/xsl/common/ka.xml +743 -0
  62. data/xsl/common/kn.xml +1272 -0
  63. data/xsl/common/ko.xml +1272 -0
  64. data/xsl/common/ky.xml +775 -0
  65. data/xsl/common/l10n.dtd +64 -0
  66. data/xsl/common/l10n.xml +78 -0
  67. data/xsl/common/l10n.xsl +598 -0
  68. data/xsl/common/la.xml +1272 -0
  69. data/xsl/common/labels.xsl +933 -0
  70. data/xsl/common/lt.xml +721 -0
  71. data/xsl/common/lv.xml +1272 -0
  72. data/xsl/common/ml.xml +703 -0
  73. data/xsl/common/mn.xml +773 -0
  74. data/xsl/common/mr.xml +703 -0
  75. data/xsl/common/nb.xml +1272 -0
  76. data/xsl/common/nds.xml +709 -0
  77. data/xsl/common/nl.xml +703 -0
  78. data/xsl/common/nn.xml +1272 -0
  79. data/xsl/common/olink.xsl +1284 -0
  80. data/xsl/common/or.xml +1272 -0
  81. data/xsl/common/pa.xml +703 -0
  82. data/xsl/common/pi.xml +168 -0
  83. data/xsl/common/pi.xsl +347 -0
  84. data/xsl/common/pl.xml +721 -0
  85. data/xsl/common/pt.xml +1272 -0
  86. data/xsl/common/pt_br.xml +1272 -0
  87. data/xsl/common/refentry.xsl +1353 -0
  88. data/xsl/common/ro.xml +1272 -0
  89. data/xsl/common/ru.xml +769 -0
  90. data/xsl/common/sk.xml +1272 -0
  91. data/xsl/common/sl.xml +1272 -0
  92. data/xsl/common/sq.xml +1272 -0
  93. data/xsl/common/sr.xml +763 -0
  94. data/xsl/common/sr_Latn.xml +722 -0
  95. data/xsl/common/subtitles.xsl +181 -0
  96. data/xsl/common/sv.xml +707 -0
  97. data/xsl/common/ta.xml +703 -0
  98. data/xsl/common/table.xsl +515 -0
  99. data/xsl/common/targetdatabase.dtd +49 -0
  100. data/xsl/common/targets.xsl +338 -0
  101. data/xsl/common/te.xml +703 -0
  102. data/xsl/common/th.xml +1272 -0
  103. data/xsl/common/titles.xsl +850 -0
  104. data/xsl/common/tl.xml +1272 -0
  105. data/xsl/common/tr.xml +709 -0
  106. data/xsl/common/uk.xml +769 -0
  107. data/xsl/common/ur.xml +705 -0
  108. data/xsl/common/utility.xsl +291 -0
  109. data/xsl/common/vi.xml +1272 -0
  110. data/xsl/common/xh.xml +1272 -0
  111. data/xsl/common/zh.xml +703 -0
  112. data/xsl/common/zh_cn.xml +703 -0
  113. data/xsl/common/zh_tw.xml +703 -0
  114. data/xsl/epub/docbook.xsl +1769 -0
  115. data/xsl/epub3/chunk.xsl +30 -0
  116. data/xsl/epub3/docbook-epub.css.xml +142 -0
  117. data/xsl/epub3/docbook.xsl +20 -0
  118. data/xsl/epub3/epub3-chunk-mods.xsl +52 -0
  119. data/xsl/epub3/epub3-element-mods.xsl +2533 -0
  120. data/xsl/epub3/titlepage.templates.xml +712 -0
  121. data/xsl/epub3/titlepage.templates.xsl +3842 -0
  122. data/xsl/lib/lib.xsl +533 -0
  123. data/xsl/xhtml/admon.xsl +142 -0
  124. data/xsl/xhtml/annotations.xsl +160 -0
  125. data/xsl/xhtml/autoidx.xsl +831 -0
  126. data/xsl/xhtml/autotoc.xsl +706 -0
  127. data/xsl/xhtml/biblio-iso690.xsl +1302 -0
  128. data/xsl/xhtml/biblio.xsl +1371 -0
  129. data/xsl/xhtml/block.xsl +584 -0
  130. data/xsl/xhtml/callout.xsl +210 -0
  131. data/xsl/xhtml/chunk-code.xsl +675 -0
  132. data/xsl/xhtml/chunk-common.xsl +1627 -0
  133. data/xsl/xhtml/chunker.xsl +317 -0
  134. data/xsl/xhtml/component.xsl +440 -0
  135. data/xsl/xhtml/division.xsl +214 -0
  136. data/xsl/xhtml/ebnf.xsl +331 -0
  137. data/xsl/xhtml/footnote.xsl +346 -0
  138. data/xsl/xhtml/formal.xsl +496 -0
  139. data/xsl/xhtml/glossary.xsl +602 -0
  140. data/xsl/xhtml/graphics.xsl +1537 -0
  141. data/xsl/xhtml/html-rtf.xsl +321 -0
  142. data/xsl/xhtml/html.xsl +690 -0
  143. data/xsl/xhtml/htmltbl.xsl +102 -0
  144. data/xsl/xhtml/index.xsl +264 -0
  145. data/xsl/xhtml/info.xsl +48 -0
  146. data/xsl/xhtml/inline.xsl +1508 -0
  147. data/xsl/xhtml/its.xsl +109 -0
  148. data/xsl/xhtml/keywords.xsl +38 -0
  149. data/xsl/xhtml/lists.xsl +1227 -0
  150. data/xsl/xhtml/math.xsl +286 -0
  151. data/xsl/xhtml/param.xsl +449 -0
  152. data/xsl/xhtml/pi.xsl +1237 -0
  153. data/xsl/xhtml/qandaset.xsl +440 -0
  154. data/xsl/xhtml/refentry.xsl +307 -0
  155. data/xsl/xhtml/sections.xsl +564 -0
  156. data/xsl/xhtml/synop.xsl +1623 -0
  157. data/xsl/xhtml/table.xsl +1179 -0
  158. data/xsl/xhtml/task.xsl +76 -0
  159. data/xsl/xhtml/titlepage.templates.xsl +4005 -0
  160. data/xsl/xhtml/titlepage.xsl +1108 -0
  161. data/xsl/xhtml/toc.xsl +334 -0
  162. data/xsl/xhtml/verbatim.xsl +389 -0
  163. data/xsl/xhtml/xref.xsl +1268 -0
  164. data/xsl/xhtml5/docbook.xsl +22 -0
  165. data/xsl/xhtml5/html5-chunk-mods.xsl +112 -0
  166. data/xsl/xhtml5/html5-element-mods.xsl +791 -0
  167. data/xsl/xhtml5/xhtml-docbook.xsl +531 -0
  168. metadata +207 -27
  169. data/.rvmrc +0 -48
  170. data/xslt/obfuscate.xsl +0 -12
@@ -0,0 +1,3842 @@
1
+ <?xml version="1.0"?>
2
+
3
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
4
+ xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl d">
5
+
6
+ <!-- This stylesheet was created by template/titlepage.xsl-->
7
+
8
+ <xsl:template name="article.titlepage.recto">
9
+ <xsl:choose>
10
+ <xsl:when test="d:articleinfo/d:title">
11
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:title"/>
12
+ </xsl:when>
13
+ <xsl:when test="d:artheader/d:title">
14
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:title"/>
15
+ </xsl:when>
16
+ <xsl:when test="d:info/d:title">
17
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:title"/>
18
+ </xsl:when>
19
+ <xsl:when test="d:title">
20
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:title"/>
21
+ </xsl:when>
22
+ </xsl:choose>
23
+
24
+ <xsl:choose>
25
+ <xsl:when test="d:articleinfo/d:subtitle">
26
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:subtitle"/>
27
+ </xsl:when>
28
+ <xsl:when test="d:artheader/d:subtitle">
29
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:subtitle"/>
30
+ </xsl:when>
31
+ <xsl:when test="d:info/d:subtitle">
32
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
33
+ </xsl:when>
34
+ <xsl:when test="d:subtitle">
35
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:subtitle"/>
36
+ </xsl:when>
37
+ </xsl:choose>
38
+
39
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:corpauthor"/>
40
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:corpauthor"/>
41
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
42
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:authorgroup"/>
43
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:authorgroup"/>
44
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
45
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:author"/>
46
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:author"/>
47
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:author"/>
48
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:othercredit"/>
49
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:othercredit"/>
50
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
51
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:releaseinfo"/>
52
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:releaseinfo"/>
53
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
54
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:copyright"/>
55
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:copyright"/>
56
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
57
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:legalnotice"/>
58
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:legalnotice"/>
59
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
60
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:pubdate"/>
61
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:pubdate"/>
62
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
63
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:revision"/>
64
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:revision"/>
65
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:revision"/>
66
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:revhistory"/>
67
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:revhistory"/>
68
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
69
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:abstract"/>
70
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:abstract"/>
71
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
72
+ </xsl:template>
73
+
74
+ <xsl:template name="article.titlepage.verso">
75
+ </xsl:template>
76
+
77
+ <xsl:template name="article.titlepage.separator"><hr/>
78
+ </xsl:template>
79
+
80
+ <xsl:template name="article.titlepage.before.recto">
81
+ </xsl:template>
82
+
83
+ <xsl:template name="article.titlepage.before.verso">
84
+ </xsl:template>
85
+
86
+ <xsl:template name="article.titlepage">
87
+ <div class="titlepage">
88
+ <xsl:variable name="recto.content">
89
+ <xsl:call-template name="article.titlepage.before.recto"/>
90
+ <xsl:call-template name="article.titlepage.recto"/>
91
+ </xsl:variable>
92
+ <xsl:variable name="recto.elements.count">
93
+ <xsl:choose>
94
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
95
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
96
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
97
+ <xsl:otherwise>1</xsl:otherwise>
98
+ </xsl:choose>
99
+ </xsl:variable>
100
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
101
+ <div><xsl:copy-of select="$recto.content"/></div>
102
+ </xsl:if>
103
+ <xsl:variable name="verso.content">
104
+ <xsl:call-template name="article.titlepage.before.verso"/>
105
+ <xsl:call-template name="article.titlepage.verso"/>
106
+ </xsl:variable>
107
+ <xsl:variable name="verso.elements.count">
108
+ <xsl:choose>
109
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
110
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
111
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
112
+ <xsl:otherwise>1</xsl:otherwise>
113
+ </xsl:choose>
114
+ </xsl:variable>
115
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
116
+ <div><xsl:copy-of select="$verso.content"/></div>
117
+ </xsl:if>
118
+ <xsl:call-template name="article.titlepage.separator"/>
119
+ </div>
120
+ </xsl:template>
121
+
122
+ <xsl:template match="*" mode="article.titlepage.recto.mode">
123
+ <!-- if an element isn't found in this mode, -->
124
+ <!-- try the generic titlepage.mode -->
125
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
126
+ </xsl:template>
127
+
128
+ <xsl:template match="*" mode="article.titlepage.verso.mode">
129
+ <!-- if an element isn't found in this mode, -->
130
+ <!-- try the generic titlepage.mode -->
131
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
132
+ </xsl:template>
133
+
134
+ <xsl:template match="d:title" mode="article.titlepage.recto.auto.mode">
135
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
136
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
137
+ </div>
138
+ </xsl:template>
139
+
140
+ <xsl:template match="d:subtitle" mode="article.titlepage.recto.auto.mode">
141
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
142
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
143
+ </div>
144
+ </xsl:template>
145
+
146
+ <xsl:template match="d:corpauthor" mode="article.titlepage.recto.auto.mode">
147
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
148
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
149
+ </div>
150
+ </xsl:template>
151
+
152
+ <xsl:template match="d:authorgroup" mode="article.titlepage.recto.auto.mode">
153
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
154
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
155
+ </div>
156
+ </xsl:template>
157
+
158
+ <xsl:template match="d:author" mode="article.titlepage.recto.auto.mode">
159
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
160
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
161
+ </div>
162
+ </xsl:template>
163
+
164
+ <xsl:template match="d:othercredit" mode="article.titlepage.recto.auto.mode">
165
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
166
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
167
+ </div>
168
+ </xsl:template>
169
+
170
+ <xsl:template match="d:releaseinfo" mode="article.titlepage.recto.auto.mode">
171
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
172
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
173
+ </div>
174
+ </xsl:template>
175
+
176
+ <xsl:template match="d:copyright" mode="article.titlepage.recto.auto.mode">
177
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
178
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
179
+ </div>
180
+ </xsl:template>
181
+
182
+ <xsl:template match="d:legalnotice" mode="article.titlepage.recto.auto.mode">
183
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
184
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
185
+ </div>
186
+ </xsl:template>
187
+
188
+ <xsl:template match="d:pubdate" mode="article.titlepage.recto.auto.mode">
189
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
190
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
191
+ </div>
192
+ </xsl:template>
193
+
194
+ <xsl:template match="d:revision" mode="article.titlepage.recto.auto.mode">
195
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
196
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
197
+ </div>
198
+ </xsl:template>
199
+
200
+ <xsl:template match="d:revhistory" mode="article.titlepage.recto.auto.mode">
201
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
202
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
203
+ </div>
204
+ </xsl:template>
205
+
206
+ <xsl:template match="d:abstract" mode="article.titlepage.recto.auto.mode">
207
+ <div xsl:use-attribute-sets="article.titlepage.recto.style">
208
+ <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
209
+ </div>
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"><hr/>
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
+ <div class="titlepage">
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
+ <div><xsl:copy-of select="$recto.content"/></div>
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
+ <div><xsl:copy-of select="$verso.content"/></div>
304
+ </xsl:if>
305
+ <xsl:call-template name="set.titlepage.separator"/>
306
+ </div>
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
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
323
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
324
+ </div>
325
+ </xsl:template>
326
+
327
+ <xsl:template match="d:subtitle" mode="set.titlepage.recto.auto.mode">
328
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
329
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
330
+ </div>
331
+ </xsl:template>
332
+
333
+ <xsl:template match="d:corpauthor" mode="set.titlepage.recto.auto.mode">
334
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
335
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
336
+ </div>
337
+ </xsl:template>
338
+
339
+ <xsl:template match="d:authorgroup" mode="set.titlepage.recto.auto.mode">
340
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
341
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
342
+ </div>
343
+ </xsl:template>
344
+
345
+ <xsl:template match="d:author" mode="set.titlepage.recto.auto.mode">
346
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
347
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
348
+ </div>
349
+ </xsl:template>
350
+
351
+ <xsl:template match="d:othercredit" mode="set.titlepage.recto.auto.mode">
352
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
353
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
354
+ </div>
355
+ </xsl:template>
356
+
357
+ <xsl:template match="d:releaseinfo" mode="set.titlepage.recto.auto.mode">
358
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
359
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
360
+ </div>
361
+ </xsl:template>
362
+
363
+ <xsl:template match="d:copyright" mode="set.titlepage.recto.auto.mode">
364
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
365
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
366
+ </div>
367
+ </xsl:template>
368
+
369
+ <xsl:template match="d:legalnotice" mode="set.titlepage.recto.auto.mode">
370
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
371
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
372
+ </div>
373
+ </xsl:template>
374
+
375
+ <xsl:template match="d:pubdate" mode="set.titlepage.recto.auto.mode">
376
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
377
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
378
+ </div>
379
+ </xsl:template>
380
+
381
+ <xsl:template match="d:revision" mode="set.titlepage.recto.auto.mode">
382
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
383
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
384
+ </div>
385
+ </xsl:template>
386
+
387
+ <xsl:template match="d:revhistory" mode="set.titlepage.recto.auto.mode">
388
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
389
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
390
+ </div>
391
+ </xsl:template>
392
+
393
+ <xsl:template match="d:abstract" mode="set.titlepage.recto.auto.mode">
394
+ <div xsl:use-attribute-sets="set.titlepage.recto.style">
395
+ <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
396
+ </div>
397
+ </xsl:template>
398
+
399
+ <xsl:template name="book.titlepage.recto">
400
+ <xsl:choose>
401
+ <xsl:when test="d:bookinfo/d:title">
402
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:title"/>
403
+ </xsl:when>
404
+ <xsl:when test="d:info/d:title">
405
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:title"/>
406
+ </xsl:when>
407
+ <xsl:when test="d:title">
408
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:title"/>
409
+ </xsl:when>
410
+ </xsl:choose>
411
+
412
+ <xsl:choose>
413
+ <xsl:when test="d:bookinfo/d:subtitle">
414
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:subtitle"/>
415
+ </xsl:when>
416
+ <xsl:when test="d:info/d:subtitle">
417
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
418
+ </xsl:when>
419
+ <xsl:when test="d:subtitle">
420
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:subtitle"/>
421
+ </xsl:when>
422
+ </xsl:choose>
423
+
424
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:isbn"/>
425
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:isbn"/>
426
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:issn"/>
427
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:issn"/>
428
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:biblioid"/>
429
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:biblioid"/>
430
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:corpauthor"/>
431
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
432
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:authorgroup"/>
433
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
434
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:author"/>
435
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:author"/>
436
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:othercredit"/>
437
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
438
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:releaseinfo"/>
439
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
440
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:copyright"/>
441
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
442
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:legalnotice"/>
443
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
444
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:pubdate"/>
445
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
446
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:revision"/>
447
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:revision"/>
448
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:revhistory"/>
449
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
450
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:abstract"/>
451
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
452
+ </xsl:template>
453
+
454
+ <xsl:template name="book.titlepage.verso">
455
+ </xsl:template>
456
+
457
+ <xsl:template name="book.titlepage.separator"><hr/>
458
+ </xsl:template>
459
+
460
+ <xsl:template name="book.titlepage.before.recto">
461
+ </xsl:template>
462
+
463
+ <xsl:template name="book.titlepage.before.verso">
464
+ </xsl:template>
465
+
466
+ <xsl:template name="book.titlepage">
467
+ <div class="titlepage">
468
+ <xsl:variable name="recto.content">
469
+ <xsl:call-template name="book.titlepage.before.recto"/>
470
+ <xsl:call-template name="book.titlepage.recto"/>
471
+ </xsl:variable>
472
+ <xsl:variable name="recto.elements.count">
473
+ <xsl:choose>
474
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
475
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
476
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
477
+ <xsl:otherwise>1</xsl:otherwise>
478
+ </xsl:choose>
479
+ </xsl:variable>
480
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
481
+ <div><xsl:copy-of select="$recto.content"/></div>
482
+ </xsl:if>
483
+ <xsl:variable name="verso.content">
484
+ <xsl:call-template name="book.titlepage.before.verso"/>
485
+ <xsl:call-template name="book.titlepage.verso"/>
486
+ </xsl:variable>
487
+ <xsl:variable name="verso.elements.count">
488
+ <xsl:choose>
489
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
490
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
491
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
492
+ <xsl:otherwise>1</xsl:otherwise>
493
+ </xsl:choose>
494
+ </xsl:variable>
495
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
496
+ <div><xsl:copy-of select="$verso.content"/></div>
497
+ </xsl:if>
498
+ <xsl:call-template name="book.titlepage.separator"/>
499
+ </div>
500
+ </xsl:template>
501
+
502
+ <xsl:template match="*" mode="book.titlepage.recto.mode">
503
+ <!-- if an element isn't found in this mode, -->
504
+ <!-- try the generic titlepage.mode -->
505
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
506
+ </xsl:template>
507
+
508
+ <xsl:template match="*" mode="book.titlepage.verso.mode">
509
+ <!-- if an element isn't found in this mode, -->
510
+ <!-- try the generic titlepage.mode -->
511
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
512
+ </xsl:template>
513
+
514
+ <xsl:template match="d:title" mode="book.titlepage.recto.auto.mode">
515
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
516
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
517
+ </div>
518
+ </xsl:template>
519
+
520
+ <xsl:template match="d:subtitle" mode="book.titlepage.recto.auto.mode">
521
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
522
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
523
+ </div>
524
+ </xsl:template>
525
+
526
+ <xsl:template match="d:isbn" mode="book.titlepage.recto.auto.mode">
527
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
528
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
529
+ </div>
530
+ </xsl:template>
531
+
532
+ <xsl:template match="d:issn" mode="book.titlepage.recto.auto.mode">
533
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
534
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
535
+ </div>
536
+ </xsl:template>
537
+
538
+ <xsl:template match="d:biblioid" mode="book.titlepage.recto.auto.mode">
539
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
540
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
541
+ </div>
542
+ </xsl:template>
543
+
544
+ <xsl:template match="d:corpauthor" mode="book.titlepage.recto.auto.mode">
545
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
546
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
547
+ </div>
548
+ </xsl:template>
549
+
550
+ <xsl:template match="d:authorgroup" mode="book.titlepage.recto.auto.mode">
551
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
552
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
553
+ </div>
554
+ </xsl:template>
555
+
556
+ <xsl:template match="d:author" mode="book.titlepage.recto.auto.mode">
557
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
558
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
559
+ </div>
560
+ </xsl:template>
561
+
562
+ <xsl:template match="d:othercredit" mode="book.titlepage.recto.auto.mode">
563
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
564
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
565
+ </div>
566
+ </xsl:template>
567
+
568
+ <xsl:template match="d:releaseinfo" mode="book.titlepage.recto.auto.mode">
569
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
570
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
571
+ </div>
572
+ </xsl:template>
573
+
574
+ <xsl:template match="d:copyright" mode="book.titlepage.recto.auto.mode">
575
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
576
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
577
+ </div>
578
+ </xsl:template>
579
+
580
+ <xsl:template match="d:legalnotice" mode="book.titlepage.recto.auto.mode">
581
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
582
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
583
+ </div>
584
+ </xsl:template>
585
+
586
+ <xsl:template match="d:pubdate" mode="book.titlepage.recto.auto.mode">
587
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
588
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
589
+ </div>
590
+ </xsl:template>
591
+
592
+ <xsl:template match="d:revision" mode="book.titlepage.recto.auto.mode">
593
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
594
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
595
+ </div>
596
+ </xsl:template>
597
+
598
+ <xsl:template match="d:revhistory" mode="book.titlepage.recto.auto.mode">
599
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
600
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
601
+ </div>
602
+ </xsl:template>
603
+
604
+ <xsl:template match="d:abstract" mode="book.titlepage.recto.auto.mode">
605
+ <div xsl:use-attribute-sets="book.titlepage.recto.style">
606
+ <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
607
+ </div>
608
+ </xsl:template>
609
+
610
+ <xsl:template name="part.titlepage.recto">
611
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
612
+ <xsl:call-template name="division.title">
613
+ <xsl:with-param name="node" select="ancestor-or-self::d:part[1]"/>
614
+ </xsl:call-template></div>
615
+ <xsl:choose>
616
+ <xsl:when test="d:partinfo/d:subtitle">
617
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:subtitle"/>
618
+ </xsl:when>
619
+ <xsl:when test="d:docinfo/d:subtitle">
620
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
621
+ </xsl:when>
622
+ <xsl:when test="d:info/d:subtitle">
623
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
624
+ </xsl:when>
625
+ <xsl:when test="d:subtitle">
626
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:subtitle"/>
627
+ </xsl:when>
628
+ </xsl:choose>
629
+
630
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:corpauthor"/>
631
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
632
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
633
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:authorgroup"/>
634
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
635
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
636
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:author"/>
637
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
638
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:author"/>
639
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:othercredit"/>
640
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
641
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
642
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:releaseinfo"/>
643
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
644
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
645
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:copyright"/>
646
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
647
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
648
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:legalnotice"/>
649
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
650
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
651
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:pubdate"/>
652
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
653
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
654
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:revision"/>
655
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
656
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:revision"/>
657
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:revhistory"/>
658
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
659
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
660
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:abstract"/>
661
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
662
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
663
+ </xsl:template>
664
+
665
+ <xsl:template name="part.titlepage.verso">
666
+ </xsl:template>
667
+
668
+ <xsl:template name="part.titlepage.separator">
669
+ </xsl:template>
670
+
671
+ <xsl:template name="part.titlepage.before.recto">
672
+ </xsl:template>
673
+
674
+ <xsl:template name="part.titlepage.before.verso">
675
+ </xsl:template>
676
+
677
+ <xsl:template name="part.titlepage">
678
+ <div class="titlepage">
679
+ <xsl:variable name="recto.content">
680
+ <xsl:call-template name="part.titlepage.before.recto"/>
681
+ <xsl:call-template name="part.titlepage.recto"/>
682
+ </xsl:variable>
683
+ <xsl:variable name="recto.elements.count">
684
+ <xsl:choose>
685
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
686
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
687
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
688
+ <xsl:otherwise>1</xsl:otherwise>
689
+ </xsl:choose>
690
+ </xsl:variable>
691
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
692
+ <div><xsl:copy-of select="$recto.content"/></div>
693
+ </xsl:if>
694
+ <xsl:variable name="verso.content">
695
+ <xsl:call-template name="part.titlepage.before.verso"/>
696
+ <xsl:call-template name="part.titlepage.verso"/>
697
+ </xsl:variable>
698
+ <xsl:variable name="verso.elements.count">
699
+ <xsl:choose>
700
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
701
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
702
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
703
+ <xsl:otherwise>1</xsl:otherwise>
704
+ </xsl:choose>
705
+ </xsl:variable>
706
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
707
+ <div><xsl:copy-of select="$verso.content"/></div>
708
+ </xsl:if>
709
+ <xsl:call-template name="part.titlepage.separator"/>
710
+ </div>
711
+ </xsl:template>
712
+
713
+ <xsl:template match="*" mode="part.titlepage.recto.mode">
714
+ <!-- if an element isn't found in this mode, -->
715
+ <!-- try the generic titlepage.mode -->
716
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
717
+ </xsl:template>
718
+
719
+ <xsl:template match="*" mode="part.titlepage.verso.mode">
720
+ <!-- if an element isn't found in this mode, -->
721
+ <!-- try the generic titlepage.mode -->
722
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
723
+ </xsl:template>
724
+
725
+ <xsl:template match="d:subtitle" mode="part.titlepage.recto.auto.mode">
726
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
727
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
728
+ </div>
729
+ </xsl:template>
730
+
731
+ <xsl:template match="d:corpauthor" mode="part.titlepage.recto.auto.mode">
732
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
733
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
734
+ </div>
735
+ </xsl:template>
736
+
737
+ <xsl:template match="d:authorgroup" mode="part.titlepage.recto.auto.mode">
738
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
739
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
740
+ </div>
741
+ </xsl:template>
742
+
743
+ <xsl:template match="d:author" mode="part.titlepage.recto.auto.mode">
744
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
745
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
746
+ </div>
747
+ </xsl:template>
748
+
749
+ <xsl:template match="d:othercredit" mode="part.titlepage.recto.auto.mode">
750
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
751
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
752
+ </div>
753
+ </xsl:template>
754
+
755
+ <xsl:template match="d:releaseinfo" mode="part.titlepage.recto.auto.mode">
756
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
757
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
758
+ </div>
759
+ </xsl:template>
760
+
761
+ <xsl:template match="d:copyright" mode="part.titlepage.recto.auto.mode">
762
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
763
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
764
+ </div>
765
+ </xsl:template>
766
+
767
+ <xsl:template match="d:legalnotice" mode="part.titlepage.recto.auto.mode">
768
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
769
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
770
+ </div>
771
+ </xsl:template>
772
+
773
+ <xsl:template match="d:pubdate" mode="part.titlepage.recto.auto.mode">
774
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
775
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
776
+ </div>
777
+ </xsl:template>
778
+
779
+ <xsl:template match="d:revision" mode="part.titlepage.recto.auto.mode">
780
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
781
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
782
+ </div>
783
+ </xsl:template>
784
+
785
+ <xsl:template match="d:revhistory" mode="part.titlepage.recto.auto.mode">
786
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
787
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
788
+ </div>
789
+ </xsl:template>
790
+
791
+ <xsl:template match="d:abstract" mode="part.titlepage.recto.auto.mode">
792
+ <div xsl:use-attribute-sets="part.titlepage.recto.style">
793
+ <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
794
+ </div>
795
+ </xsl:template>
796
+
797
+ <xsl:template name="partintro.titlepage.recto">
798
+ <xsl:choose>
799
+ <xsl:when test="d:partintroinfo/d:title">
800
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:title"/>
801
+ </xsl:when>
802
+ <xsl:when test="d:docinfo/d:title">
803
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
804
+ </xsl:when>
805
+ <xsl:when test="d:info/d:title">
806
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:title"/>
807
+ </xsl:when>
808
+ <xsl:when test="d:title">
809
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:title"/>
810
+ </xsl:when>
811
+ </xsl:choose>
812
+
813
+ <xsl:choose>
814
+ <xsl:when test="d:partintroinfo/d:subtitle">
815
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:subtitle"/>
816
+ </xsl:when>
817
+ <xsl:when test="d:docinfo/d:subtitle">
818
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
819
+ </xsl:when>
820
+ <xsl:when test="d:info/d:subtitle">
821
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
822
+ </xsl:when>
823
+ <xsl:when test="d:subtitle">
824
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:subtitle"/>
825
+ </xsl:when>
826
+ </xsl:choose>
827
+
828
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:corpauthor"/>
829
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
830
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
831
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:authorgroup"/>
832
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
833
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
834
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:author"/>
835
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
836
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:author"/>
837
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:othercredit"/>
838
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
839
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
840
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:releaseinfo"/>
841
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
842
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
843
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:copyright"/>
844
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
845
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
846
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:legalnotice"/>
847
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
848
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
849
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:pubdate"/>
850
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
851
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
852
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:revision"/>
853
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
854
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:revision"/>
855
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:revhistory"/>
856
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
857
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
858
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:abstract"/>
859
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
860
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
861
+ </xsl:template>
862
+
863
+ <xsl:template name="partintro.titlepage.verso">
864
+ </xsl:template>
865
+
866
+ <xsl:template name="partintro.titlepage.separator">
867
+ </xsl:template>
868
+
869
+ <xsl:template name="partintro.titlepage.before.recto">
870
+ </xsl:template>
871
+
872
+ <xsl:template name="partintro.titlepage.before.verso">
873
+ </xsl:template>
874
+
875
+ <xsl:template name="partintro.titlepage">
876
+ <div>
877
+ <xsl:variable name="recto.content">
878
+ <xsl:call-template name="partintro.titlepage.before.recto"/>
879
+ <xsl:call-template name="partintro.titlepage.recto"/>
880
+ </xsl:variable>
881
+ <xsl:variable name="recto.elements.count">
882
+ <xsl:choose>
883
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
884
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
885
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
886
+ <xsl:otherwise>1</xsl:otherwise>
887
+ </xsl:choose>
888
+ </xsl:variable>
889
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
890
+ <div><xsl:copy-of select="$recto.content"/></div>
891
+ </xsl:if>
892
+ <xsl:variable name="verso.content">
893
+ <xsl:call-template name="partintro.titlepage.before.verso"/>
894
+ <xsl:call-template name="partintro.titlepage.verso"/>
895
+ </xsl:variable>
896
+ <xsl:variable name="verso.elements.count">
897
+ <xsl:choose>
898
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
899
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
900
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
901
+ <xsl:otherwise>1</xsl:otherwise>
902
+ </xsl:choose>
903
+ </xsl:variable>
904
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
905
+ <div><xsl:copy-of select="$verso.content"/></div>
906
+ </xsl:if>
907
+ <xsl:call-template name="partintro.titlepage.separator"/>
908
+ </div>
909
+ </xsl:template>
910
+
911
+ <xsl:template match="*" mode="partintro.titlepage.recto.mode">
912
+ <!-- if an element isn't found in this mode, -->
913
+ <!-- try the generic titlepage.mode -->
914
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
915
+ </xsl:template>
916
+
917
+ <xsl:template match="*" mode="partintro.titlepage.verso.mode">
918
+ <!-- if an element isn't found in this mode, -->
919
+ <!-- try the generic titlepage.mode -->
920
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
921
+ </xsl:template>
922
+
923
+ <xsl:template match="d:title" mode="partintro.titlepage.recto.auto.mode">
924
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
925
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
926
+ </div>
927
+ </xsl:template>
928
+
929
+ <xsl:template match="d:subtitle" mode="partintro.titlepage.recto.auto.mode">
930
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
931
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
932
+ </div>
933
+ </xsl:template>
934
+
935
+ <xsl:template match="d:corpauthor" mode="partintro.titlepage.recto.auto.mode">
936
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
937
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
938
+ </div>
939
+ </xsl:template>
940
+
941
+ <xsl:template match="d:authorgroup" mode="partintro.titlepage.recto.auto.mode">
942
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
943
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
944
+ </div>
945
+ </xsl:template>
946
+
947
+ <xsl:template match="d:author" mode="partintro.titlepage.recto.auto.mode">
948
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
949
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
950
+ </div>
951
+ </xsl:template>
952
+
953
+ <xsl:template match="d:othercredit" mode="partintro.titlepage.recto.auto.mode">
954
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
955
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
956
+ </div>
957
+ </xsl:template>
958
+
959
+ <xsl:template match="d:releaseinfo" mode="partintro.titlepage.recto.auto.mode">
960
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
961
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
962
+ </div>
963
+ </xsl:template>
964
+
965
+ <xsl:template match="d:copyright" mode="partintro.titlepage.recto.auto.mode">
966
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
967
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
968
+ </div>
969
+ </xsl:template>
970
+
971
+ <xsl:template match="d:legalnotice" mode="partintro.titlepage.recto.auto.mode">
972
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
973
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
974
+ </div>
975
+ </xsl:template>
976
+
977
+ <xsl:template match="d:pubdate" mode="partintro.titlepage.recto.auto.mode">
978
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
979
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
980
+ </div>
981
+ </xsl:template>
982
+
983
+ <xsl:template match="d:revision" mode="partintro.titlepage.recto.auto.mode">
984
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
985
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
986
+ </div>
987
+ </xsl:template>
988
+
989
+ <xsl:template match="d:revhistory" mode="partintro.titlepage.recto.auto.mode">
990
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
991
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
992
+ </div>
993
+ </xsl:template>
994
+
995
+ <xsl:template match="d:abstract" mode="partintro.titlepage.recto.auto.mode">
996
+ <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
997
+ <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
998
+ </div>
999
+ </xsl:template>
1000
+
1001
+ <xsl:template name="reference.titlepage.recto">
1002
+ <xsl:choose>
1003
+ <xsl:when test="d:referenceinfo/d:title">
1004
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:title"/>
1005
+ </xsl:when>
1006
+ <xsl:when test="d:docinfo/d:title">
1007
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
1008
+ </xsl:when>
1009
+ <xsl:when test="d:info/d:title">
1010
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:title"/>
1011
+ </xsl:when>
1012
+ <xsl:when test="d:title">
1013
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:title"/>
1014
+ </xsl:when>
1015
+ </xsl:choose>
1016
+
1017
+ <xsl:choose>
1018
+ <xsl:when test="d:referenceinfo/d:subtitle">
1019
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:subtitle"/>
1020
+ </xsl:when>
1021
+ <xsl:when test="d:docinfo/d:subtitle">
1022
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
1023
+ </xsl:when>
1024
+ <xsl:when test="d:info/d:subtitle">
1025
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
1026
+ </xsl:when>
1027
+ <xsl:when test="d:subtitle">
1028
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:subtitle"/>
1029
+ </xsl:when>
1030
+ </xsl:choose>
1031
+
1032
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:corpauthor"/>
1033
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
1034
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
1035
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:authorgroup"/>
1036
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
1037
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
1038
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:author"/>
1039
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
1040
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:author"/>
1041
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:othercredit"/>
1042
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
1043
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
1044
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:releaseinfo"/>
1045
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
1046
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
1047
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:copyright"/>
1048
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
1049
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
1050
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:legalnotice"/>
1051
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
1052
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
1053
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:pubdate"/>
1054
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
1055
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
1056
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:revision"/>
1057
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
1058
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:revision"/>
1059
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:revhistory"/>
1060
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
1061
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
1062
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:abstract"/>
1063
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
1064
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
1065
+ </xsl:template>
1066
+
1067
+ <xsl:template name="reference.titlepage.verso">
1068
+ </xsl:template>
1069
+
1070
+ <xsl:template name="reference.titlepage.separator"><hr/>
1071
+ </xsl:template>
1072
+
1073
+ <xsl:template name="reference.titlepage.before.recto">
1074
+ </xsl:template>
1075
+
1076
+ <xsl:template name="reference.titlepage.before.verso">
1077
+ </xsl:template>
1078
+
1079
+ <xsl:template name="reference.titlepage">
1080
+ <div class="titlepage">
1081
+ <xsl:variable name="recto.content">
1082
+ <xsl:call-template name="reference.titlepage.before.recto"/>
1083
+ <xsl:call-template name="reference.titlepage.recto"/>
1084
+ </xsl:variable>
1085
+ <xsl:variable name="recto.elements.count">
1086
+ <xsl:choose>
1087
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1088
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1089
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1090
+ <xsl:otherwise>1</xsl:otherwise>
1091
+ </xsl:choose>
1092
+ </xsl:variable>
1093
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1094
+ <div><xsl:copy-of select="$recto.content"/></div>
1095
+ </xsl:if>
1096
+ <xsl:variable name="verso.content">
1097
+ <xsl:call-template name="reference.titlepage.before.verso"/>
1098
+ <xsl:call-template name="reference.titlepage.verso"/>
1099
+ </xsl:variable>
1100
+ <xsl:variable name="verso.elements.count">
1101
+ <xsl:choose>
1102
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1103
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1104
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1105
+ <xsl:otherwise>1</xsl:otherwise>
1106
+ </xsl:choose>
1107
+ </xsl:variable>
1108
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1109
+ <div><xsl:copy-of select="$verso.content"/></div>
1110
+ </xsl:if>
1111
+ <xsl:call-template name="reference.titlepage.separator"/>
1112
+ </div>
1113
+ </xsl:template>
1114
+
1115
+ <xsl:template match="*" mode="reference.titlepage.recto.mode">
1116
+ <!-- if an element isn't found in this mode, -->
1117
+ <!-- try the generic titlepage.mode -->
1118
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1119
+ </xsl:template>
1120
+
1121
+ <xsl:template match="*" mode="reference.titlepage.verso.mode">
1122
+ <!-- if an element isn't found in this mode, -->
1123
+ <!-- try the generic titlepage.mode -->
1124
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1125
+ </xsl:template>
1126
+
1127
+ <xsl:template match="d:title" mode="reference.titlepage.recto.auto.mode">
1128
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1129
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1130
+ </div>
1131
+ </xsl:template>
1132
+
1133
+ <xsl:template match="d:subtitle" mode="reference.titlepage.recto.auto.mode">
1134
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1135
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1136
+ </div>
1137
+ </xsl:template>
1138
+
1139
+ <xsl:template match="d:corpauthor" mode="reference.titlepage.recto.auto.mode">
1140
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1141
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1142
+ </div>
1143
+ </xsl:template>
1144
+
1145
+ <xsl:template match="d:authorgroup" mode="reference.titlepage.recto.auto.mode">
1146
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1147
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1148
+ </div>
1149
+ </xsl:template>
1150
+
1151
+ <xsl:template match="d:author" mode="reference.titlepage.recto.auto.mode">
1152
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1153
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1154
+ </div>
1155
+ </xsl:template>
1156
+
1157
+ <xsl:template match="d:othercredit" mode="reference.titlepage.recto.auto.mode">
1158
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1159
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1160
+ </div>
1161
+ </xsl:template>
1162
+
1163
+ <xsl:template match="d:releaseinfo" mode="reference.titlepage.recto.auto.mode">
1164
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1165
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1166
+ </div>
1167
+ </xsl:template>
1168
+
1169
+ <xsl:template match="d:copyright" mode="reference.titlepage.recto.auto.mode">
1170
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1171
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1172
+ </div>
1173
+ </xsl:template>
1174
+
1175
+ <xsl:template match="d:legalnotice" mode="reference.titlepage.recto.auto.mode">
1176
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1177
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1178
+ </div>
1179
+ </xsl:template>
1180
+
1181
+ <xsl:template match="d:pubdate" mode="reference.titlepage.recto.auto.mode">
1182
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1183
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1184
+ </div>
1185
+ </xsl:template>
1186
+
1187
+ <xsl:template match="d:revision" mode="reference.titlepage.recto.auto.mode">
1188
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1189
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1190
+ </div>
1191
+ </xsl:template>
1192
+
1193
+ <xsl:template match="d:revhistory" mode="reference.titlepage.recto.auto.mode">
1194
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1195
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1196
+ </div>
1197
+ </xsl:template>
1198
+
1199
+ <xsl:template match="d:abstract" mode="reference.titlepage.recto.auto.mode">
1200
+ <div xsl:use-attribute-sets="reference.titlepage.recto.style">
1201
+ <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1202
+ </div>
1203
+ </xsl:template>
1204
+
1205
+ <xsl:template name="refentry.titlepage.recto">
1206
+ </xsl:template>
1207
+
1208
+ <xsl:template name="refentry.titlepage.verso">
1209
+ </xsl:template>
1210
+
1211
+ <xsl:template name="refentry.titlepage.separator">
1212
+ </xsl:template>
1213
+
1214
+ <xsl:template name="refentry.titlepage.before.recto">
1215
+ </xsl:template>
1216
+
1217
+ <xsl:template name="refentry.titlepage.before.verso">
1218
+ </xsl:template>
1219
+
1220
+ <xsl:template name="refentry.titlepage">
1221
+ <div class="titlepage">
1222
+ <xsl:variable name="recto.content">
1223
+ <xsl:call-template name="refentry.titlepage.before.recto"/>
1224
+ <xsl:call-template name="refentry.titlepage.recto"/>
1225
+ </xsl:variable>
1226
+ <xsl:variable name="recto.elements.count">
1227
+ <xsl:choose>
1228
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1229
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1230
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1231
+ <xsl:otherwise>1</xsl:otherwise>
1232
+ </xsl:choose>
1233
+ </xsl:variable>
1234
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1235
+ <div><xsl:copy-of select="$recto.content"/></div>
1236
+ </xsl:if>
1237
+ <xsl:variable name="verso.content">
1238
+ <xsl:call-template name="refentry.titlepage.before.verso"/>
1239
+ <xsl:call-template name="refentry.titlepage.verso"/>
1240
+ </xsl:variable>
1241
+ <xsl:variable name="verso.elements.count">
1242
+ <xsl:choose>
1243
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1244
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1245
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1246
+ <xsl:otherwise>1</xsl:otherwise>
1247
+ </xsl:choose>
1248
+ </xsl:variable>
1249
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1250
+ <div><xsl:copy-of select="$verso.content"/></div>
1251
+ </xsl:if>
1252
+ <xsl:call-template name="refentry.titlepage.separator"/>
1253
+ </div>
1254
+ </xsl:template>
1255
+
1256
+ <xsl:template match="*" mode="refentry.titlepage.recto.mode">
1257
+ <!-- if an element isn't found in this mode, -->
1258
+ <!-- try the generic titlepage.mode -->
1259
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1260
+ </xsl:template>
1261
+
1262
+ <xsl:template match="*" mode="refentry.titlepage.verso.mode">
1263
+ <!-- if an element isn't found in this mode, -->
1264
+ <!-- try the generic titlepage.mode -->
1265
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1266
+ </xsl:template>
1267
+
1268
+ <xsl:template name="dedication.titlepage.recto">
1269
+ <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
1270
+ <xsl:call-template name="component.title">
1271
+ <xsl:with-param name="node" select="ancestor-or-self::d:dedication[1]"/>
1272
+ </xsl:call-template></div>
1273
+ <xsl:choose>
1274
+ <xsl:when test="d:dedicationinfo/d:subtitle">
1275
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:dedicationinfo/d:subtitle"/>
1276
+ </xsl:when>
1277
+ <xsl:when test="d:docinfo/d:subtitle">
1278
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
1279
+ </xsl:when>
1280
+ <xsl:when test="d:info/d:subtitle">
1281
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
1282
+ </xsl:when>
1283
+ <xsl:when test="d:subtitle">
1284
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:subtitle"/>
1285
+ </xsl:when>
1286
+ </xsl:choose>
1287
+
1288
+ </xsl:template>
1289
+
1290
+ <xsl:template name="dedication.titlepage.verso">
1291
+ </xsl:template>
1292
+
1293
+ <xsl:template name="dedication.titlepage.separator">
1294
+ </xsl:template>
1295
+
1296
+ <xsl:template name="dedication.titlepage.before.recto">
1297
+ </xsl:template>
1298
+
1299
+ <xsl:template name="dedication.titlepage.before.verso">
1300
+ </xsl:template>
1301
+
1302
+ <xsl:template name="dedication.titlepage">
1303
+ <div class="titlepage">
1304
+ <xsl:variable name="recto.content">
1305
+ <xsl:call-template name="dedication.titlepage.before.recto"/>
1306
+ <xsl:call-template name="dedication.titlepage.recto"/>
1307
+ </xsl:variable>
1308
+ <xsl:variable name="recto.elements.count">
1309
+ <xsl:choose>
1310
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1311
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1312
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1313
+ <xsl:otherwise>1</xsl:otherwise>
1314
+ </xsl:choose>
1315
+ </xsl:variable>
1316
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1317
+ <div><xsl:copy-of select="$recto.content"/></div>
1318
+ </xsl:if>
1319
+ <xsl:variable name="verso.content">
1320
+ <xsl:call-template name="dedication.titlepage.before.verso"/>
1321
+ <xsl:call-template name="dedication.titlepage.verso"/>
1322
+ </xsl:variable>
1323
+ <xsl:variable name="verso.elements.count">
1324
+ <xsl:choose>
1325
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1326
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1327
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1328
+ <xsl:otherwise>1</xsl:otherwise>
1329
+ </xsl:choose>
1330
+ </xsl:variable>
1331
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1332
+ <div><xsl:copy-of select="$verso.content"/></div>
1333
+ </xsl:if>
1334
+ <xsl:call-template name="dedication.titlepage.separator"/>
1335
+ </div>
1336
+ </xsl:template>
1337
+
1338
+ <xsl:template match="*" mode="dedication.titlepage.recto.mode">
1339
+ <!-- if an element isn't found in this mode, -->
1340
+ <!-- try the generic titlepage.mode -->
1341
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1342
+ </xsl:template>
1343
+
1344
+ <xsl:template match="*" mode="dedication.titlepage.verso.mode">
1345
+ <!-- if an element isn't found in this mode, -->
1346
+ <!-- try the generic titlepage.mode -->
1347
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1348
+ </xsl:template>
1349
+
1350
+ <xsl:template match="d:subtitle" mode="dedication.titlepage.recto.auto.mode">
1351
+ <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
1352
+ <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1353
+ </div>
1354
+ </xsl:template>
1355
+
1356
+ <xsl:template name="acknowledgements.titlepage.recto">
1357
+ <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1358
+ <xsl:call-template name="component.title">
1359
+ <xsl:with-param name="node" select="ancestor-or-self::d:acknowledgements[1]"/>
1360
+ </xsl:call-template></div>
1361
+ <xsl:choose>
1362
+ <xsl:when test="d:acknowledgementsinfo/d:subtitle">
1363
+ <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:acknowledgementsinfo/d:subtitle"/>
1364
+ </xsl:when>
1365
+ <xsl:when test="d:docinfo/d:subtitle">
1366
+ <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
1367
+ </xsl:when>
1368
+ <xsl:when test="d:info/d:subtitle">
1369
+ <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
1370
+ </xsl:when>
1371
+ <xsl:when test="d:subtitle">
1372
+ <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:subtitle"/>
1373
+ </xsl:when>
1374
+ </xsl:choose>
1375
+
1376
+ </xsl:template>
1377
+
1378
+ <xsl:template name="acknowledgements.titlepage.verso">
1379
+ </xsl:template>
1380
+
1381
+ <xsl:template name="acknowledgements.titlepage.separator">
1382
+ </xsl:template>
1383
+
1384
+ <xsl:template name="acknowledgements.titlepage.before.recto">
1385
+ </xsl:template>
1386
+
1387
+ <xsl:template name="acknowledgements.titlepage.before.verso">
1388
+ </xsl:template>
1389
+
1390
+ <xsl:template name="acknowledgements.titlepage">
1391
+ <div class="titlepage">
1392
+ <xsl:variable name="recto.content">
1393
+ <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
1394
+ <xsl:call-template name="acknowledgements.titlepage.recto"/>
1395
+ </xsl:variable>
1396
+ <xsl:variable name="recto.elements.count">
1397
+ <xsl:choose>
1398
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1399
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1400
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1401
+ <xsl:otherwise>1</xsl:otherwise>
1402
+ </xsl:choose>
1403
+ </xsl:variable>
1404
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1405
+ <div><xsl:copy-of select="$recto.content"/></div>
1406
+ </xsl:if>
1407
+ <xsl:variable name="verso.content">
1408
+ <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
1409
+ <xsl:call-template name="acknowledgements.titlepage.verso"/>
1410
+ </xsl:variable>
1411
+ <xsl:variable name="verso.elements.count">
1412
+ <xsl:choose>
1413
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1414
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1415
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1416
+ <xsl:otherwise>1</xsl:otherwise>
1417
+ </xsl:choose>
1418
+ </xsl:variable>
1419
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1420
+ <div><xsl:copy-of select="$verso.content"/></div>
1421
+ </xsl:if>
1422
+ <xsl:call-template name="acknowledgements.titlepage.separator"/>
1423
+ </div>
1424
+ </xsl:template>
1425
+
1426
+ <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
1427
+ <!-- if an element isn't found in this mode, -->
1428
+ <!-- try the generic titlepage.mode -->
1429
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1430
+ </xsl:template>
1431
+
1432
+ <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
1433
+ <!-- if an element isn't found in this mode, -->
1434
+ <!-- try the generic titlepage.mode -->
1435
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1436
+ </xsl:template>
1437
+
1438
+ <xsl:template match="d:subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
1439
+ <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1440
+ <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1441
+ </div>
1442
+ </xsl:template>
1443
+
1444
+ <xsl:template name="preface.titlepage.recto">
1445
+ <xsl:choose>
1446
+ <xsl:when test="d:prefaceinfo/d:title">
1447
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:title"/>
1448
+ </xsl:when>
1449
+ <xsl:when test="d:docinfo/d:title">
1450
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
1451
+ </xsl:when>
1452
+ <xsl:when test="d:info/d:title">
1453
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:title"/>
1454
+ </xsl:when>
1455
+ <xsl:when test="d:title">
1456
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:title"/>
1457
+ </xsl:when>
1458
+ </xsl:choose>
1459
+
1460
+ <xsl:choose>
1461
+ <xsl:when test="d:prefaceinfo/d:subtitle">
1462
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:subtitle"/>
1463
+ </xsl:when>
1464
+ <xsl:when test="d:docinfo/d:subtitle">
1465
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
1466
+ </xsl:when>
1467
+ <xsl:when test="d:info/d:subtitle">
1468
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
1469
+ </xsl:when>
1470
+ <xsl:when test="d:subtitle">
1471
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:subtitle"/>
1472
+ </xsl:when>
1473
+ </xsl:choose>
1474
+
1475
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:corpauthor"/>
1476
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
1477
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
1478
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:authorgroup"/>
1479
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
1480
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
1481
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:author"/>
1482
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
1483
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:author"/>
1484
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:othercredit"/>
1485
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
1486
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
1487
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:releaseinfo"/>
1488
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
1489
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
1490
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:copyright"/>
1491
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
1492
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
1493
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:legalnotice"/>
1494
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
1495
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
1496
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:pubdate"/>
1497
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
1498
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
1499
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:revision"/>
1500
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
1501
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:revision"/>
1502
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:revhistory"/>
1503
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
1504
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
1505
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:abstract"/>
1506
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
1507
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
1508
+ </xsl:template>
1509
+
1510
+ <xsl:template name="preface.titlepage.verso">
1511
+ </xsl:template>
1512
+
1513
+ <xsl:template name="preface.titlepage.separator">
1514
+ </xsl:template>
1515
+
1516
+ <xsl:template name="preface.titlepage.before.recto">
1517
+ </xsl:template>
1518
+
1519
+ <xsl:template name="preface.titlepage.before.verso">
1520
+ </xsl:template>
1521
+
1522
+ <xsl:template name="preface.titlepage">
1523
+ <div class="titlepage">
1524
+ <xsl:variable name="recto.content">
1525
+ <xsl:call-template name="preface.titlepage.before.recto"/>
1526
+ <xsl:call-template name="preface.titlepage.recto"/>
1527
+ </xsl:variable>
1528
+ <xsl:variable name="recto.elements.count">
1529
+ <xsl:choose>
1530
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1531
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1532
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1533
+ <xsl:otherwise>1</xsl:otherwise>
1534
+ </xsl:choose>
1535
+ </xsl:variable>
1536
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1537
+ <div><xsl:copy-of select="$recto.content"/></div>
1538
+ </xsl:if>
1539
+ <xsl:variable name="verso.content">
1540
+ <xsl:call-template name="preface.titlepage.before.verso"/>
1541
+ <xsl:call-template name="preface.titlepage.verso"/>
1542
+ </xsl:variable>
1543
+ <xsl:variable name="verso.elements.count">
1544
+ <xsl:choose>
1545
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1546
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1547
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1548
+ <xsl:otherwise>1</xsl:otherwise>
1549
+ </xsl:choose>
1550
+ </xsl:variable>
1551
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1552
+ <div><xsl:copy-of select="$verso.content"/></div>
1553
+ </xsl:if>
1554
+ <xsl:call-template name="preface.titlepage.separator"/>
1555
+ </div>
1556
+ </xsl:template>
1557
+
1558
+ <xsl:template match="*" mode="preface.titlepage.recto.mode">
1559
+ <!-- if an element isn't found in this mode, -->
1560
+ <!-- try the generic titlepage.mode -->
1561
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1562
+ </xsl:template>
1563
+
1564
+ <xsl:template match="*" mode="preface.titlepage.verso.mode">
1565
+ <!-- if an element isn't found in this mode, -->
1566
+ <!-- try the generic titlepage.mode -->
1567
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1568
+ </xsl:template>
1569
+
1570
+ <xsl:template match="d:title" mode="preface.titlepage.recto.auto.mode">
1571
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1572
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1573
+ </div>
1574
+ </xsl:template>
1575
+
1576
+ <xsl:template match="d:subtitle" mode="preface.titlepage.recto.auto.mode">
1577
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1578
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1579
+ </div>
1580
+ </xsl:template>
1581
+
1582
+ <xsl:template match="d:corpauthor" mode="preface.titlepage.recto.auto.mode">
1583
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1584
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1585
+ </div>
1586
+ </xsl:template>
1587
+
1588
+ <xsl:template match="d:authorgroup" mode="preface.titlepage.recto.auto.mode">
1589
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1590
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1591
+ </div>
1592
+ </xsl:template>
1593
+
1594
+ <xsl:template match="d:author" mode="preface.titlepage.recto.auto.mode">
1595
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1596
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1597
+ </div>
1598
+ </xsl:template>
1599
+
1600
+ <xsl:template match="d:othercredit" mode="preface.titlepage.recto.auto.mode">
1601
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1602
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1603
+ </div>
1604
+ </xsl:template>
1605
+
1606
+ <xsl:template match="d:releaseinfo" mode="preface.titlepage.recto.auto.mode">
1607
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1608
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1609
+ </div>
1610
+ </xsl:template>
1611
+
1612
+ <xsl:template match="d:copyright" mode="preface.titlepage.recto.auto.mode">
1613
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1614
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1615
+ </div>
1616
+ </xsl:template>
1617
+
1618
+ <xsl:template match="d:legalnotice" mode="preface.titlepage.recto.auto.mode">
1619
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1620
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1621
+ </div>
1622
+ </xsl:template>
1623
+
1624
+ <xsl:template match="d:pubdate" mode="preface.titlepage.recto.auto.mode">
1625
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1626
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1627
+ </div>
1628
+ </xsl:template>
1629
+
1630
+ <xsl:template match="d:revision" mode="preface.titlepage.recto.auto.mode">
1631
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1632
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1633
+ </div>
1634
+ </xsl:template>
1635
+
1636
+ <xsl:template match="d:revhistory" mode="preface.titlepage.recto.auto.mode">
1637
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1638
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1639
+ </div>
1640
+ </xsl:template>
1641
+
1642
+ <xsl:template match="d:abstract" mode="preface.titlepage.recto.auto.mode">
1643
+ <div xsl:use-attribute-sets="preface.titlepage.recto.style">
1644
+ <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1645
+ </div>
1646
+ </xsl:template>
1647
+
1648
+ <xsl:template name="chapter.titlepage.recto">
1649
+ <xsl:choose>
1650
+ <xsl:when test="d:chapterinfo/d:title">
1651
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:title"/>
1652
+ </xsl:when>
1653
+ <xsl:when test="d:docinfo/d:title">
1654
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
1655
+ </xsl:when>
1656
+ <xsl:when test="d:info/d:title">
1657
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:title"/>
1658
+ </xsl:when>
1659
+ <xsl:when test="d:title">
1660
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:title"/>
1661
+ </xsl:when>
1662
+ </xsl:choose>
1663
+
1664
+ <xsl:choose>
1665
+ <xsl:when test="d:chapterinfo/d:subtitle">
1666
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:subtitle"/>
1667
+ </xsl:when>
1668
+ <xsl:when test="d:docinfo/d:subtitle">
1669
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
1670
+ </xsl:when>
1671
+ <xsl:when test="d:info/d:subtitle">
1672
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
1673
+ </xsl:when>
1674
+ <xsl:when test="d:subtitle">
1675
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:subtitle"/>
1676
+ </xsl:when>
1677
+ </xsl:choose>
1678
+
1679
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:corpauthor"/>
1680
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
1681
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
1682
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:authorgroup"/>
1683
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
1684
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
1685
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:author"/>
1686
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
1687
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:author"/>
1688
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:othercredit"/>
1689
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
1690
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
1691
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:releaseinfo"/>
1692
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
1693
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
1694
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:copyright"/>
1695
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
1696
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
1697
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:legalnotice"/>
1698
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
1699
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
1700
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:pubdate"/>
1701
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
1702
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
1703
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:revision"/>
1704
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
1705
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:revision"/>
1706
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:revhistory"/>
1707
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
1708
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
1709
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:abstract"/>
1710
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
1711
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
1712
+ </xsl:template>
1713
+
1714
+ <xsl:template name="chapter.titlepage.verso">
1715
+ </xsl:template>
1716
+
1717
+ <xsl:template name="chapter.titlepage.separator">
1718
+ </xsl:template>
1719
+
1720
+ <xsl:template name="chapter.titlepage.before.recto">
1721
+ </xsl:template>
1722
+
1723
+ <xsl:template name="chapter.titlepage.before.verso">
1724
+ </xsl:template>
1725
+
1726
+ <xsl:template name="chapter.titlepage">
1727
+ <div class="titlepage">
1728
+ <xsl:variable name="recto.content">
1729
+ <xsl:call-template name="chapter.titlepage.before.recto"/>
1730
+ <xsl:call-template name="chapter.titlepage.recto"/>
1731
+ </xsl:variable>
1732
+ <xsl:variable name="recto.elements.count">
1733
+ <xsl:choose>
1734
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1735
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1736
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1737
+ <xsl:otherwise>1</xsl:otherwise>
1738
+ </xsl:choose>
1739
+ </xsl:variable>
1740
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1741
+ <div><xsl:copy-of select="$recto.content"/></div>
1742
+ </xsl:if>
1743
+ <xsl:variable name="verso.content">
1744
+ <xsl:call-template name="chapter.titlepage.before.verso"/>
1745
+ <xsl:call-template name="chapter.titlepage.verso"/>
1746
+ </xsl:variable>
1747
+ <xsl:variable name="verso.elements.count">
1748
+ <xsl:choose>
1749
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1750
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1751
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1752
+ <xsl:otherwise>1</xsl:otherwise>
1753
+ </xsl:choose>
1754
+ </xsl:variable>
1755
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1756
+ <div><xsl:copy-of select="$verso.content"/></div>
1757
+ </xsl:if>
1758
+ <xsl:call-template name="chapter.titlepage.separator"/>
1759
+ </div>
1760
+ </xsl:template>
1761
+
1762
+ <xsl:template match="*" mode="chapter.titlepage.recto.mode">
1763
+ <!-- if an element isn't found in this mode, -->
1764
+ <!-- try the generic titlepage.mode -->
1765
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1766
+ </xsl:template>
1767
+
1768
+ <xsl:template match="*" mode="chapter.titlepage.verso.mode">
1769
+ <!-- if an element isn't found in this mode, -->
1770
+ <!-- try the generic titlepage.mode -->
1771
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1772
+ </xsl:template>
1773
+
1774
+ <xsl:template match="d:title" mode="chapter.titlepage.recto.auto.mode">
1775
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1776
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1777
+ </div>
1778
+ </xsl:template>
1779
+
1780
+ <xsl:template match="d:subtitle" mode="chapter.titlepage.recto.auto.mode">
1781
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1782
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1783
+ </div>
1784
+ </xsl:template>
1785
+
1786
+ <xsl:template match="d:corpauthor" mode="chapter.titlepage.recto.auto.mode">
1787
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1788
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1789
+ </div>
1790
+ </xsl:template>
1791
+
1792
+ <xsl:template match="d:authorgroup" mode="chapter.titlepage.recto.auto.mode">
1793
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1794
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1795
+ </div>
1796
+ </xsl:template>
1797
+
1798
+ <xsl:template match="d:author" mode="chapter.titlepage.recto.auto.mode">
1799
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1800
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1801
+ </div>
1802
+ </xsl:template>
1803
+
1804
+ <xsl:template match="d:othercredit" mode="chapter.titlepage.recto.auto.mode">
1805
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1806
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1807
+ </div>
1808
+ </xsl:template>
1809
+
1810
+ <xsl:template match="d:releaseinfo" mode="chapter.titlepage.recto.auto.mode">
1811
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1812
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1813
+ </div>
1814
+ </xsl:template>
1815
+
1816
+ <xsl:template match="d:copyright" mode="chapter.titlepage.recto.auto.mode">
1817
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1818
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1819
+ </div>
1820
+ </xsl:template>
1821
+
1822
+ <xsl:template match="d:legalnotice" mode="chapter.titlepage.recto.auto.mode">
1823
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1824
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1825
+ </div>
1826
+ </xsl:template>
1827
+
1828
+ <xsl:template match="d:pubdate" mode="chapter.titlepage.recto.auto.mode">
1829
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1830
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1831
+ </div>
1832
+ </xsl:template>
1833
+
1834
+ <xsl:template match="d:revision" mode="chapter.titlepage.recto.auto.mode">
1835
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1836
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1837
+ </div>
1838
+ </xsl:template>
1839
+
1840
+ <xsl:template match="d:revhistory" mode="chapter.titlepage.recto.auto.mode">
1841
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1842
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1843
+ </div>
1844
+ </xsl:template>
1845
+
1846
+ <xsl:template match="d:abstract" mode="chapter.titlepage.recto.auto.mode">
1847
+ <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1848
+ <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1849
+ </div>
1850
+ </xsl:template>
1851
+
1852
+ <xsl:template name="appendix.titlepage.recto">
1853
+ <xsl:choose>
1854
+ <xsl:when test="d:appendixinfo/d:title">
1855
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:title"/>
1856
+ </xsl:when>
1857
+ <xsl:when test="d:docinfo/d:title">
1858
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
1859
+ </xsl:when>
1860
+ <xsl:when test="d:info/d:title">
1861
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:title"/>
1862
+ </xsl:when>
1863
+ <xsl:when test="d:title">
1864
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:title"/>
1865
+ </xsl:when>
1866
+ </xsl:choose>
1867
+
1868
+ <xsl:choose>
1869
+ <xsl:when test="d:appendixinfo/d:subtitle">
1870
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:subtitle"/>
1871
+ </xsl:when>
1872
+ <xsl:when test="d:docinfo/d:subtitle">
1873
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
1874
+ </xsl:when>
1875
+ <xsl:when test="d:info/d:subtitle">
1876
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
1877
+ </xsl:when>
1878
+ <xsl:when test="d:subtitle">
1879
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:subtitle"/>
1880
+ </xsl:when>
1881
+ </xsl:choose>
1882
+
1883
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:corpauthor"/>
1884
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
1885
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
1886
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:authorgroup"/>
1887
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
1888
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
1889
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:author"/>
1890
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
1891
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:author"/>
1892
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:othercredit"/>
1893
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
1894
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
1895
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:releaseinfo"/>
1896
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
1897
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
1898
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:copyright"/>
1899
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
1900
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
1901
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:legalnotice"/>
1902
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
1903
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
1904
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:pubdate"/>
1905
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
1906
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
1907
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:revision"/>
1908
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
1909
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:revision"/>
1910
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:revhistory"/>
1911
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
1912
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
1913
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:abstract"/>
1914
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
1915
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
1916
+ </xsl:template>
1917
+
1918
+ <xsl:template name="appendix.titlepage.verso">
1919
+ </xsl:template>
1920
+
1921
+ <xsl:template name="appendix.titlepage.separator">
1922
+ </xsl:template>
1923
+
1924
+ <xsl:template name="appendix.titlepage.before.recto">
1925
+ </xsl:template>
1926
+
1927
+ <xsl:template name="appendix.titlepage.before.verso">
1928
+ </xsl:template>
1929
+
1930
+ <xsl:template name="appendix.titlepage">
1931
+ <div class="titlepage">
1932
+ <xsl:variable name="recto.content">
1933
+ <xsl:call-template name="appendix.titlepage.before.recto"/>
1934
+ <xsl:call-template name="appendix.titlepage.recto"/>
1935
+ </xsl:variable>
1936
+ <xsl:variable name="recto.elements.count">
1937
+ <xsl:choose>
1938
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1939
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1940
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1941
+ <xsl:otherwise>1</xsl:otherwise>
1942
+ </xsl:choose>
1943
+ </xsl:variable>
1944
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1945
+ <div><xsl:copy-of select="$recto.content"/></div>
1946
+ </xsl:if>
1947
+ <xsl:variable name="verso.content">
1948
+ <xsl:call-template name="appendix.titlepage.before.verso"/>
1949
+ <xsl:call-template name="appendix.titlepage.verso"/>
1950
+ </xsl:variable>
1951
+ <xsl:variable name="verso.elements.count">
1952
+ <xsl:choose>
1953
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1954
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1955
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1956
+ <xsl:otherwise>1</xsl:otherwise>
1957
+ </xsl:choose>
1958
+ </xsl:variable>
1959
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1960
+ <div><xsl:copy-of select="$verso.content"/></div>
1961
+ </xsl:if>
1962
+ <xsl:call-template name="appendix.titlepage.separator"/>
1963
+ </div>
1964
+ </xsl:template>
1965
+
1966
+ <xsl:template match="*" mode="appendix.titlepage.recto.mode">
1967
+ <!-- if an element isn't found in this mode, -->
1968
+ <!-- try the generic titlepage.mode -->
1969
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1970
+ </xsl:template>
1971
+
1972
+ <xsl:template match="*" mode="appendix.titlepage.verso.mode">
1973
+ <!-- if an element isn't found in this mode, -->
1974
+ <!-- try the generic titlepage.mode -->
1975
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
1976
+ </xsl:template>
1977
+
1978
+ <xsl:template match="d:title" mode="appendix.titlepage.recto.auto.mode">
1979
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1980
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1981
+ </div>
1982
+ </xsl:template>
1983
+
1984
+ <xsl:template match="d:subtitle" mode="appendix.titlepage.recto.auto.mode">
1985
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1986
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1987
+ </div>
1988
+ </xsl:template>
1989
+
1990
+ <xsl:template match="d:corpauthor" mode="appendix.titlepage.recto.auto.mode">
1991
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1992
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1993
+ </div>
1994
+ </xsl:template>
1995
+
1996
+ <xsl:template match="d:authorgroup" mode="appendix.titlepage.recto.auto.mode">
1997
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1998
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1999
+ </div>
2000
+ </xsl:template>
2001
+
2002
+ <xsl:template match="d:author" mode="appendix.titlepage.recto.auto.mode">
2003
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2004
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2005
+ </div>
2006
+ </xsl:template>
2007
+
2008
+ <xsl:template match="d:othercredit" mode="appendix.titlepage.recto.auto.mode">
2009
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2010
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2011
+ </div>
2012
+ </xsl:template>
2013
+
2014
+ <xsl:template match="d:releaseinfo" mode="appendix.titlepage.recto.auto.mode">
2015
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2016
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2017
+ </div>
2018
+ </xsl:template>
2019
+
2020
+ <xsl:template match="d:copyright" mode="appendix.titlepage.recto.auto.mode">
2021
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2022
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2023
+ </div>
2024
+ </xsl:template>
2025
+
2026
+ <xsl:template match="d:legalnotice" mode="appendix.titlepage.recto.auto.mode">
2027
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2028
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2029
+ </div>
2030
+ </xsl:template>
2031
+
2032
+ <xsl:template match="d:pubdate" mode="appendix.titlepage.recto.auto.mode">
2033
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2034
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2035
+ </div>
2036
+ </xsl:template>
2037
+
2038
+ <xsl:template match="d:revision" mode="appendix.titlepage.recto.auto.mode">
2039
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2040
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2041
+ </div>
2042
+ </xsl:template>
2043
+
2044
+ <xsl:template match="d:revhistory" mode="appendix.titlepage.recto.auto.mode">
2045
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2046
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2047
+ </div>
2048
+ </xsl:template>
2049
+
2050
+ <xsl:template match="d:abstract" mode="appendix.titlepage.recto.auto.mode">
2051
+ <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2052
+ <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2053
+ </div>
2054
+ </xsl:template>
2055
+
2056
+ <xsl:template name="section.titlepage.recto">
2057
+ <xsl:choose>
2058
+ <xsl:when test="d:sectioninfo/d:title">
2059
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:title"/>
2060
+ </xsl:when>
2061
+ <xsl:when test="d:info/d:title">
2062
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:title"/>
2063
+ </xsl:when>
2064
+ <xsl:when test="d:title">
2065
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:title"/>
2066
+ </xsl:when>
2067
+ </xsl:choose>
2068
+
2069
+ <xsl:choose>
2070
+ <xsl:when test="d:sectioninfo/d:subtitle">
2071
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:subtitle"/>
2072
+ </xsl:when>
2073
+ <xsl:when test="d:info/d:subtitle">
2074
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
2075
+ </xsl:when>
2076
+ <xsl:when test="d:subtitle">
2077
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:subtitle"/>
2078
+ </xsl:when>
2079
+ </xsl:choose>
2080
+
2081
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:corpauthor"/>
2082
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
2083
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:authorgroup"/>
2084
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
2085
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:author"/>
2086
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:author"/>
2087
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:othercredit"/>
2088
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
2089
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:releaseinfo"/>
2090
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
2091
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:copyright"/>
2092
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
2093
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:legalnotice"/>
2094
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
2095
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:pubdate"/>
2096
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
2097
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:revision"/>
2098
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:revision"/>
2099
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:revhistory"/>
2100
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
2101
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:abstract"/>
2102
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
2103
+ </xsl:template>
2104
+
2105
+ <xsl:template name="section.titlepage.verso">
2106
+ </xsl:template>
2107
+
2108
+ <xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2109
+ </xsl:template>
2110
+
2111
+ <xsl:template name="section.titlepage.before.recto">
2112
+ </xsl:template>
2113
+
2114
+ <xsl:template name="section.titlepage.before.verso">
2115
+ </xsl:template>
2116
+
2117
+ <xsl:template name="section.titlepage">
2118
+ <div class="titlepage">
2119
+ <xsl:variable name="recto.content">
2120
+ <xsl:call-template name="section.titlepage.before.recto"/>
2121
+ <xsl:call-template name="section.titlepage.recto"/>
2122
+ </xsl:variable>
2123
+ <xsl:variable name="recto.elements.count">
2124
+ <xsl:choose>
2125
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2126
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2127
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2128
+ <xsl:otherwise>1</xsl:otherwise>
2129
+ </xsl:choose>
2130
+ </xsl:variable>
2131
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2132
+ <div><xsl:copy-of select="$recto.content"/></div>
2133
+ </xsl:if>
2134
+ <xsl:variable name="verso.content">
2135
+ <xsl:call-template name="section.titlepage.before.verso"/>
2136
+ <xsl:call-template name="section.titlepage.verso"/>
2137
+ </xsl:variable>
2138
+ <xsl:variable name="verso.elements.count">
2139
+ <xsl:choose>
2140
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.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($verso.content)/*)"/></xsl:when>
2143
+ <xsl:otherwise>1</xsl:otherwise>
2144
+ </xsl:choose>
2145
+ </xsl:variable>
2146
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2147
+ <div><xsl:copy-of select="$verso.content"/></div>
2148
+ </xsl:if>
2149
+ <xsl:call-template name="section.titlepage.separator"/>
2150
+ </div>
2151
+ </xsl:template>
2152
+
2153
+ <xsl:template match="*" mode="section.titlepage.recto.mode">
2154
+ <!-- if an element isn't found in this mode, -->
2155
+ <!-- try the generic titlepage.mode -->
2156
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2157
+ </xsl:template>
2158
+
2159
+ <xsl:template match="*" mode="section.titlepage.verso.mode">
2160
+ <!-- if an element isn't found in this mode, -->
2161
+ <!-- try the generic titlepage.mode -->
2162
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2163
+ </xsl:template>
2164
+
2165
+ <xsl:template match="d:title" mode="section.titlepage.recto.auto.mode">
2166
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2167
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2168
+ </div>
2169
+ </xsl:template>
2170
+
2171
+ <xsl:template match="d:subtitle" mode="section.titlepage.recto.auto.mode">
2172
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2173
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2174
+ </div>
2175
+ </xsl:template>
2176
+
2177
+ <xsl:template match="d:corpauthor" mode="section.titlepage.recto.auto.mode">
2178
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2179
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2180
+ </div>
2181
+ </xsl:template>
2182
+
2183
+ <xsl:template match="d:authorgroup" mode="section.titlepage.recto.auto.mode">
2184
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2185
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2186
+ </div>
2187
+ </xsl:template>
2188
+
2189
+ <xsl:template match="d:author" mode="section.titlepage.recto.auto.mode">
2190
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2191
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2192
+ </div>
2193
+ </xsl:template>
2194
+
2195
+ <xsl:template match="d:othercredit" mode="section.titlepage.recto.auto.mode">
2196
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2197
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2198
+ </div>
2199
+ </xsl:template>
2200
+
2201
+ <xsl:template match="d:releaseinfo" mode="section.titlepage.recto.auto.mode">
2202
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2203
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2204
+ </div>
2205
+ </xsl:template>
2206
+
2207
+ <xsl:template match="d:copyright" mode="section.titlepage.recto.auto.mode">
2208
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2209
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2210
+ </div>
2211
+ </xsl:template>
2212
+
2213
+ <xsl:template match="d:legalnotice" mode="section.titlepage.recto.auto.mode">
2214
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2215
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2216
+ </div>
2217
+ </xsl:template>
2218
+
2219
+ <xsl:template match="d:pubdate" mode="section.titlepage.recto.auto.mode">
2220
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2221
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2222
+ </div>
2223
+ </xsl:template>
2224
+
2225
+ <xsl:template match="d:revision" mode="section.titlepage.recto.auto.mode">
2226
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2227
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2228
+ </div>
2229
+ </xsl:template>
2230
+
2231
+ <xsl:template match="d:revhistory" mode="section.titlepage.recto.auto.mode">
2232
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2233
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2234
+ </div>
2235
+ </xsl:template>
2236
+
2237
+ <xsl:template match="d:abstract" mode="section.titlepage.recto.auto.mode">
2238
+ <div xsl:use-attribute-sets="section.titlepage.recto.style">
2239
+ <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2240
+ </div>
2241
+ </xsl:template>
2242
+
2243
+ <xsl:template name="sect1.titlepage.recto">
2244
+ <xsl:choose>
2245
+ <xsl:when test="d:sect1info/d:title">
2246
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:title"/>
2247
+ </xsl:when>
2248
+ <xsl:when test="d:info/d:title">
2249
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:title"/>
2250
+ </xsl:when>
2251
+ <xsl:when test="d:title">
2252
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:title"/>
2253
+ </xsl:when>
2254
+ </xsl:choose>
2255
+
2256
+ <xsl:choose>
2257
+ <xsl:when test="d:sect1info/d:subtitle">
2258
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:subtitle"/>
2259
+ </xsl:when>
2260
+ <xsl:when test="d:info/d:subtitle">
2261
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
2262
+ </xsl:when>
2263
+ <xsl:when test="d:subtitle">
2264
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:subtitle"/>
2265
+ </xsl:when>
2266
+ </xsl:choose>
2267
+
2268
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:corpauthor"/>
2269
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
2270
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:authorgroup"/>
2271
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
2272
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:author"/>
2273
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:author"/>
2274
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:othercredit"/>
2275
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
2276
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:releaseinfo"/>
2277
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
2278
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:copyright"/>
2279
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
2280
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:legalnotice"/>
2281
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
2282
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:pubdate"/>
2283
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
2284
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:revision"/>
2285
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:revision"/>
2286
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:revhistory"/>
2287
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
2288
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:abstract"/>
2289
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
2290
+ </xsl:template>
2291
+
2292
+ <xsl:template name="sect1.titlepage.verso">
2293
+ </xsl:template>
2294
+
2295
+ <xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2296
+ </xsl:template>
2297
+
2298
+ <xsl:template name="sect1.titlepage.before.recto">
2299
+ </xsl:template>
2300
+
2301
+ <xsl:template name="sect1.titlepage.before.verso">
2302
+ </xsl:template>
2303
+
2304
+ <xsl:template name="sect1.titlepage">
2305
+ <div class="titlepage">
2306
+ <xsl:variable name="recto.content">
2307
+ <xsl:call-template name="sect1.titlepage.before.recto"/>
2308
+ <xsl:call-template name="sect1.titlepage.recto"/>
2309
+ </xsl:variable>
2310
+ <xsl:variable name="recto.elements.count">
2311
+ <xsl:choose>
2312
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2313
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2314
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2315
+ <xsl:otherwise>1</xsl:otherwise>
2316
+ </xsl:choose>
2317
+ </xsl:variable>
2318
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2319
+ <div><xsl:copy-of select="$recto.content"/></div>
2320
+ </xsl:if>
2321
+ <xsl:variable name="verso.content">
2322
+ <xsl:call-template name="sect1.titlepage.before.verso"/>
2323
+ <xsl:call-template name="sect1.titlepage.verso"/>
2324
+ </xsl:variable>
2325
+ <xsl:variable name="verso.elements.count">
2326
+ <xsl:choose>
2327
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2328
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2329
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2330
+ <xsl:otherwise>1</xsl:otherwise>
2331
+ </xsl:choose>
2332
+ </xsl:variable>
2333
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2334
+ <div><xsl:copy-of select="$verso.content"/></div>
2335
+ </xsl:if>
2336
+ <xsl:call-template name="sect1.titlepage.separator"/>
2337
+ </div>
2338
+ </xsl:template>
2339
+
2340
+ <xsl:template match="*" mode="sect1.titlepage.recto.mode">
2341
+ <!-- if an element isn't found in this mode, -->
2342
+ <!-- try the generic titlepage.mode -->
2343
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2344
+ </xsl:template>
2345
+
2346
+ <xsl:template match="*" mode="sect1.titlepage.verso.mode">
2347
+ <!-- if an element isn't found in this mode, -->
2348
+ <!-- try the generic titlepage.mode -->
2349
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2350
+ </xsl:template>
2351
+
2352
+ <xsl:template match="d:title" mode="sect1.titlepage.recto.auto.mode">
2353
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2354
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2355
+ </div>
2356
+ </xsl:template>
2357
+
2358
+ <xsl:template match="d:subtitle" mode="sect1.titlepage.recto.auto.mode">
2359
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2360
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2361
+ </div>
2362
+ </xsl:template>
2363
+
2364
+ <xsl:template match="d:corpauthor" mode="sect1.titlepage.recto.auto.mode">
2365
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2366
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2367
+ </div>
2368
+ </xsl:template>
2369
+
2370
+ <xsl:template match="d:authorgroup" mode="sect1.titlepage.recto.auto.mode">
2371
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2372
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2373
+ </div>
2374
+ </xsl:template>
2375
+
2376
+ <xsl:template match="d:author" mode="sect1.titlepage.recto.auto.mode">
2377
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2378
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2379
+ </div>
2380
+ </xsl:template>
2381
+
2382
+ <xsl:template match="d:othercredit" mode="sect1.titlepage.recto.auto.mode">
2383
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2384
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2385
+ </div>
2386
+ </xsl:template>
2387
+
2388
+ <xsl:template match="d:releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2389
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2390
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2391
+ </div>
2392
+ </xsl:template>
2393
+
2394
+ <xsl:template match="d:copyright" mode="sect1.titlepage.recto.auto.mode">
2395
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2396
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2397
+ </div>
2398
+ </xsl:template>
2399
+
2400
+ <xsl:template match="d:legalnotice" mode="sect1.titlepage.recto.auto.mode">
2401
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2402
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2403
+ </div>
2404
+ </xsl:template>
2405
+
2406
+ <xsl:template match="d:pubdate" mode="sect1.titlepage.recto.auto.mode">
2407
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2408
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2409
+ </div>
2410
+ </xsl:template>
2411
+
2412
+ <xsl:template match="d:revision" mode="sect1.titlepage.recto.auto.mode">
2413
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2414
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2415
+ </div>
2416
+ </xsl:template>
2417
+
2418
+ <xsl:template match="d:revhistory" mode="sect1.titlepage.recto.auto.mode">
2419
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2420
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2421
+ </div>
2422
+ </xsl:template>
2423
+
2424
+ <xsl:template match="d:abstract" mode="sect1.titlepage.recto.auto.mode">
2425
+ <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2426
+ <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2427
+ </div>
2428
+ </xsl:template>
2429
+
2430
+ <xsl:template name="sect2.titlepage.recto">
2431
+ <xsl:choose>
2432
+ <xsl:when test="d:sect2info/d:title">
2433
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:title"/>
2434
+ </xsl:when>
2435
+ <xsl:when test="d:info/d:title">
2436
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:title"/>
2437
+ </xsl:when>
2438
+ <xsl:when test="d:title">
2439
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:title"/>
2440
+ </xsl:when>
2441
+ </xsl:choose>
2442
+
2443
+ <xsl:choose>
2444
+ <xsl:when test="d:sect2info/d:subtitle">
2445
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:subtitle"/>
2446
+ </xsl:when>
2447
+ <xsl:when test="d:info/d:subtitle">
2448
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
2449
+ </xsl:when>
2450
+ <xsl:when test="d:subtitle">
2451
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:subtitle"/>
2452
+ </xsl:when>
2453
+ </xsl:choose>
2454
+
2455
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:corpauthor"/>
2456
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
2457
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:authorgroup"/>
2458
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
2459
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:author"/>
2460
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:author"/>
2461
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:othercredit"/>
2462
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
2463
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:releaseinfo"/>
2464
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
2465
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:copyright"/>
2466
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
2467
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:legalnotice"/>
2468
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
2469
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:pubdate"/>
2470
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
2471
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:revision"/>
2472
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:revision"/>
2473
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:revhistory"/>
2474
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
2475
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:abstract"/>
2476
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
2477
+ </xsl:template>
2478
+
2479
+ <xsl:template name="sect2.titlepage.verso">
2480
+ </xsl:template>
2481
+
2482
+ <xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2483
+ </xsl:template>
2484
+
2485
+ <xsl:template name="sect2.titlepage.before.recto">
2486
+ </xsl:template>
2487
+
2488
+ <xsl:template name="sect2.titlepage.before.verso">
2489
+ </xsl:template>
2490
+
2491
+ <xsl:template name="sect2.titlepage">
2492
+ <div class="titlepage">
2493
+ <xsl:variable name="recto.content">
2494
+ <xsl:call-template name="sect2.titlepage.before.recto"/>
2495
+ <xsl:call-template name="sect2.titlepage.recto"/>
2496
+ </xsl:variable>
2497
+ <xsl:variable name="recto.elements.count">
2498
+ <xsl:choose>
2499
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2500
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2501
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2502
+ <xsl:otherwise>1</xsl:otherwise>
2503
+ </xsl:choose>
2504
+ </xsl:variable>
2505
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2506
+ <div><xsl:copy-of select="$recto.content"/></div>
2507
+ </xsl:if>
2508
+ <xsl:variable name="verso.content">
2509
+ <xsl:call-template name="sect2.titlepage.before.verso"/>
2510
+ <xsl:call-template name="sect2.titlepage.verso"/>
2511
+ </xsl:variable>
2512
+ <xsl:variable name="verso.elements.count">
2513
+ <xsl:choose>
2514
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2515
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2516
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2517
+ <xsl:otherwise>1</xsl:otherwise>
2518
+ </xsl:choose>
2519
+ </xsl:variable>
2520
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2521
+ <div><xsl:copy-of select="$verso.content"/></div>
2522
+ </xsl:if>
2523
+ <xsl:call-template name="sect2.titlepage.separator"/>
2524
+ </div>
2525
+ </xsl:template>
2526
+
2527
+ <xsl:template match="*" mode="sect2.titlepage.recto.mode">
2528
+ <!-- if an element isn't found in this mode, -->
2529
+ <!-- try the generic titlepage.mode -->
2530
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2531
+ </xsl:template>
2532
+
2533
+ <xsl:template match="*" mode="sect2.titlepage.verso.mode">
2534
+ <!-- if an element isn't found in this mode, -->
2535
+ <!-- try the generic titlepage.mode -->
2536
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2537
+ </xsl:template>
2538
+
2539
+ <xsl:template match="d:title" mode="sect2.titlepage.recto.auto.mode">
2540
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2541
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2542
+ </div>
2543
+ </xsl:template>
2544
+
2545
+ <xsl:template match="d:subtitle" mode="sect2.titlepage.recto.auto.mode">
2546
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2547
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2548
+ </div>
2549
+ </xsl:template>
2550
+
2551
+ <xsl:template match="d:corpauthor" mode="sect2.titlepage.recto.auto.mode">
2552
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2553
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2554
+ </div>
2555
+ </xsl:template>
2556
+
2557
+ <xsl:template match="d:authorgroup" mode="sect2.titlepage.recto.auto.mode">
2558
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2559
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2560
+ </div>
2561
+ </xsl:template>
2562
+
2563
+ <xsl:template match="d:author" mode="sect2.titlepage.recto.auto.mode">
2564
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2565
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2566
+ </div>
2567
+ </xsl:template>
2568
+
2569
+ <xsl:template match="d:othercredit" mode="sect2.titlepage.recto.auto.mode">
2570
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2571
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2572
+ </div>
2573
+ </xsl:template>
2574
+
2575
+ <xsl:template match="d:releaseinfo" mode="sect2.titlepage.recto.auto.mode">
2576
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2577
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2578
+ </div>
2579
+ </xsl:template>
2580
+
2581
+ <xsl:template match="d:copyright" mode="sect2.titlepage.recto.auto.mode">
2582
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2583
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2584
+ </div>
2585
+ </xsl:template>
2586
+
2587
+ <xsl:template match="d:legalnotice" mode="sect2.titlepage.recto.auto.mode">
2588
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2589
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2590
+ </div>
2591
+ </xsl:template>
2592
+
2593
+ <xsl:template match="d:pubdate" mode="sect2.titlepage.recto.auto.mode">
2594
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2595
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2596
+ </div>
2597
+ </xsl:template>
2598
+
2599
+ <xsl:template match="d:revision" mode="sect2.titlepage.recto.auto.mode">
2600
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2601
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2602
+ </div>
2603
+ </xsl:template>
2604
+
2605
+ <xsl:template match="d:revhistory" mode="sect2.titlepage.recto.auto.mode">
2606
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2607
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2608
+ </div>
2609
+ </xsl:template>
2610
+
2611
+ <xsl:template match="d:abstract" mode="sect2.titlepage.recto.auto.mode">
2612
+ <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2613
+ <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2614
+ </div>
2615
+ </xsl:template>
2616
+
2617
+ <xsl:template name="sect3.titlepage.recto">
2618
+ <xsl:choose>
2619
+ <xsl:when test="d:sect3info/d:title">
2620
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:title"/>
2621
+ </xsl:when>
2622
+ <xsl:when test="d:info/d:title">
2623
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:title"/>
2624
+ </xsl:when>
2625
+ <xsl:when test="d:title">
2626
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:title"/>
2627
+ </xsl:when>
2628
+ </xsl:choose>
2629
+
2630
+ <xsl:choose>
2631
+ <xsl:when test="d:sect3info/d:subtitle">
2632
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:subtitle"/>
2633
+ </xsl:when>
2634
+ <xsl:when test="d:info/d:subtitle">
2635
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
2636
+ </xsl:when>
2637
+ <xsl:when test="d:subtitle">
2638
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:subtitle"/>
2639
+ </xsl:when>
2640
+ </xsl:choose>
2641
+
2642
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:corpauthor"/>
2643
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
2644
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:authorgroup"/>
2645
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
2646
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:author"/>
2647
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:author"/>
2648
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:othercredit"/>
2649
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
2650
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:releaseinfo"/>
2651
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
2652
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:copyright"/>
2653
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
2654
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:legalnotice"/>
2655
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
2656
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:pubdate"/>
2657
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
2658
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:revision"/>
2659
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:revision"/>
2660
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:revhistory"/>
2661
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
2662
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:abstract"/>
2663
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
2664
+ </xsl:template>
2665
+
2666
+ <xsl:template name="sect3.titlepage.verso">
2667
+ </xsl:template>
2668
+
2669
+ <xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2670
+ </xsl:template>
2671
+
2672
+ <xsl:template name="sect3.titlepage.before.recto">
2673
+ </xsl:template>
2674
+
2675
+ <xsl:template name="sect3.titlepage.before.verso">
2676
+ </xsl:template>
2677
+
2678
+ <xsl:template name="sect3.titlepage">
2679
+ <div class="titlepage">
2680
+ <xsl:variable name="recto.content">
2681
+ <xsl:call-template name="sect3.titlepage.before.recto"/>
2682
+ <xsl:call-template name="sect3.titlepage.recto"/>
2683
+ </xsl:variable>
2684
+ <xsl:variable name="recto.elements.count">
2685
+ <xsl:choose>
2686
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2687
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2688
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2689
+ <xsl:otherwise>1</xsl:otherwise>
2690
+ </xsl:choose>
2691
+ </xsl:variable>
2692
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2693
+ <div><xsl:copy-of select="$recto.content"/></div>
2694
+ </xsl:if>
2695
+ <xsl:variable name="verso.content">
2696
+ <xsl:call-template name="sect3.titlepage.before.verso"/>
2697
+ <xsl:call-template name="sect3.titlepage.verso"/>
2698
+ </xsl:variable>
2699
+ <xsl:variable name="verso.elements.count">
2700
+ <xsl:choose>
2701
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2702
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2703
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2704
+ <xsl:otherwise>1</xsl:otherwise>
2705
+ </xsl:choose>
2706
+ </xsl:variable>
2707
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2708
+ <div><xsl:copy-of select="$verso.content"/></div>
2709
+ </xsl:if>
2710
+ <xsl:call-template name="sect3.titlepage.separator"/>
2711
+ </div>
2712
+ </xsl:template>
2713
+
2714
+ <xsl:template match="*" mode="sect3.titlepage.recto.mode">
2715
+ <!-- if an element isn't found in this mode, -->
2716
+ <!-- try the generic titlepage.mode -->
2717
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2718
+ </xsl:template>
2719
+
2720
+ <xsl:template match="*" mode="sect3.titlepage.verso.mode">
2721
+ <!-- if an element isn't found in this mode, -->
2722
+ <!-- try the generic titlepage.mode -->
2723
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2724
+ </xsl:template>
2725
+
2726
+ <xsl:template match="d:title" mode="sect3.titlepage.recto.auto.mode">
2727
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2728
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2729
+ </div>
2730
+ </xsl:template>
2731
+
2732
+ <xsl:template match="d:subtitle" mode="sect3.titlepage.recto.auto.mode">
2733
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2734
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2735
+ </div>
2736
+ </xsl:template>
2737
+
2738
+ <xsl:template match="d:corpauthor" mode="sect3.titlepage.recto.auto.mode">
2739
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2740
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2741
+ </div>
2742
+ </xsl:template>
2743
+
2744
+ <xsl:template match="d:authorgroup" mode="sect3.titlepage.recto.auto.mode">
2745
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2746
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2747
+ </div>
2748
+ </xsl:template>
2749
+
2750
+ <xsl:template match="d:author" mode="sect3.titlepage.recto.auto.mode">
2751
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2752
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2753
+ </div>
2754
+ </xsl:template>
2755
+
2756
+ <xsl:template match="d:othercredit" mode="sect3.titlepage.recto.auto.mode">
2757
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2758
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2759
+ </div>
2760
+ </xsl:template>
2761
+
2762
+ <xsl:template match="d:releaseinfo" mode="sect3.titlepage.recto.auto.mode">
2763
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2764
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2765
+ </div>
2766
+ </xsl:template>
2767
+
2768
+ <xsl:template match="d:copyright" mode="sect3.titlepage.recto.auto.mode">
2769
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2770
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2771
+ </div>
2772
+ </xsl:template>
2773
+
2774
+ <xsl:template match="d:legalnotice" mode="sect3.titlepage.recto.auto.mode">
2775
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2776
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2777
+ </div>
2778
+ </xsl:template>
2779
+
2780
+ <xsl:template match="d:pubdate" mode="sect3.titlepage.recto.auto.mode">
2781
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2782
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2783
+ </div>
2784
+ </xsl:template>
2785
+
2786
+ <xsl:template match="d:revision" mode="sect3.titlepage.recto.auto.mode">
2787
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2788
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2789
+ </div>
2790
+ </xsl:template>
2791
+
2792
+ <xsl:template match="d:revhistory" mode="sect3.titlepage.recto.auto.mode">
2793
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2794
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2795
+ </div>
2796
+ </xsl:template>
2797
+
2798
+ <xsl:template match="d:abstract" mode="sect3.titlepage.recto.auto.mode">
2799
+ <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2800
+ <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2801
+ </div>
2802
+ </xsl:template>
2803
+
2804
+ <xsl:template name="sect4.titlepage.recto">
2805
+ <xsl:choose>
2806
+ <xsl:when test="d:sect4info/d:title">
2807
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:title"/>
2808
+ </xsl:when>
2809
+ <xsl:when test="d:info/d:title">
2810
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:title"/>
2811
+ </xsl:when>
2812
+ <xsl:when test="d:title">
2813
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:title"/>
2814
+ </xsl:when>
2815
+ </xsl:choose>
2816
+
2817
+ <xsl:choose>
2818
+ <xsl:when test="d:sect4info/d:subtitle">
2819
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:subtitle"/>
2820
+ </xsl:when>
2821
+ <xsl:when test="d:info/d:subtitle">
2822
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
2823
+ </xsl:when>
2824
+ <xsl:when test="d:subtitle">
2825
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:subtitle"/>
2826
+ </xsl:when>
2827
+ </xsl:choose>
2828
+
2829
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:corpauthor"/>
2830
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
2831
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:authorgroup"/>
2832
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
2833
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:author"/>
2834
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:author"/>
2835
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:othercredit"/>
2836
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
2837
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:releaseinfo"/>
2838
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
2839
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:copyright"/>
2840
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
2841
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:legalnotice"/>
2842
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
2843
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:pubdate"/>
2844
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
2845
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:revision"/>
2846
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:revision"/>
2847
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:revhistory"/>
2848
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
2849
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:abstract"/>
2850
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
2851
+ </xsl:template>
2852
+
2853
+ <xsl:template name="sect4.titlepage.verso">
2854
+ </xsl:template>
2855
+
2856
+ <xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2857
+ </xsl:template>
2858
+
2859
+ <xsl:template name="sect4.titlepage.before.recto">
2860
+ </xsl:template>
2861
+
2862
+ <xsl:template name="sect4.titlepage.before.verso">
2863
+ </xsl:template>
2864
+
2865
+ <xsl:template name="sect4.titlepage">
2866
+ <div class="titlepage">
2867
+ <xsl:variable name="recto.content">
2868
+ <xsl:call-template name="sect4.titlepage.before.recto"/>
2869
+ <xsl:call-template name="sect4.titlepage.recto"/>
2870
+ </xsl:variable>
2871
+ <xsl:variable name="recto.elements.count">
2872
+ <xsl:choose>
2873
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2874
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2875
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2876
+ <xsl:otherwise>1</xsl:otherwise>
2877
+ </xsl:choose>
2878
+ </xsl:variable>
2879
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2880
+ <div><xsl:copy-of select="$recto.content"/></div>
2881
+ </xsl:if>
2882
+ <xsl:variable name="verso.content">
2883
+ <xsl:call-template name="sect4.titlepage.before.verso"/>
2884
+ <xsl:call-template name="sect4.titlepage.verso"/>
2885
+ </xsl:variable>
2886
+ <xsl:variable name="verso.elements.count">
2887
+ <xsl:choose>
2888
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2889
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2890
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2891
+ <xsl:otherwise>1</xsl:otherwise>
2892
+ </xsl:choose>
2893
+ </xsl:variable>
2894
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2895
+ <div><xsl:copy-of select="$verso.content"/></div>
2896
+ </xsl:if>
2897
+ <xsl:call-template name="sect4.titlepage.separator"/>
2898
+ </div>
2899
+ </xsl:template>
2900
+
2901
+ <xsl:template match="*" mode="sect4.titlepage.recto.mode">
2902
+ <!-- if an element isn't found in this mode, -->
2903
+ <!-- try the generic titlepage.mode -->
2904
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2905
+ </xsl:template>
2906
+
2907
+ <xsl:template match="*" mode="sect4.titlepage.verso.mode">
2908
+ <!-- if an element isn't found in this mode, -->
2909
+ <!-- try the generic titlepage.mode -->
2910
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
2911
+ </xsl:template>
2912
+
2913
+ <xsl:template match="d:title" mode="sect4.titlepage.recto.auto.mode">
2914
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2915
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2916
+ </div>
2917
+ </xsl:template>
2918
+
2919
+ <xsl:template match="d:subtitle" mode="sect4.titlepage.recto.auto.mode">
2920
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2921
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2922
+ </div>
2923
+ </xsl:template>
2924
+
2925
+ <xsl:template match="d:corpauthor" mode="sect4.titlepage.recto.auto.mode">
2926
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2927
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2928
+ </div>
2929
+ </xsl:template>
2930
+
2931
+ <xsl:template match="d:authorgroup" mode="sect4.titlepage.recto.auto.mode">
2932
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2933
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2934
+ </div>
2935
+ </xsl:template>
2936
+
2937
+ <xsl:template match="d:author" mode="sect4.titlepage.recto.auto.mode">
2938
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2939
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2940
+ </div>
2941
+ </xsl:template>
2942
+
2943
+ <xsl:template match="d:othercredit" mode="sect4.titlepage.recto.auto.mode">
2944
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2945
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2946
+ </div>
2947
+ </xsl:template>
2948
+
2949
+ <xsl:template match="d:releaseinfo" mode="sect4.titlepage.recto.auto.mode">
2950
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2951
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2952
+ </div>
2953
+ </xsl:template>
2954
+
2955
+ <xsl:template match="d:copyright" mode="sect4.titlepage.recto.auto.mode">
2956
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2957
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2958
+ </div>
2959
+ </xsl:template>
2960
+
2961
+ <xsl:template match="d:legalnotice" mode="sect4.titlepage.recto.auto.mode">
2962
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2963
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2964
+ </div>
2965
+ </xsl:template>
2966
+
2967
+ <xsl:template match="d:pubdate" mode="sect4.titlepage.recto.auto.mode">
2968
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2969
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2970
+ </div>
2971
+ </xsl:template>
2972
+
2973
+ <xsl:template match="d:revision" mode="sect4.titlepage.recto.auto.mode">
2974
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2975
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2976
+ </div>
2977
+ </xsl:template>
2978
+
2979
+ <xsl:template match="d:revhistory" mode="sect4.titlepage.recto.auto.mode">
2980
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2981
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2982
+ </div>
2983
+ </xsl:template>
2984
+
2985
+ <xsl:template match="d:abstract" mode="sect4.titlepage.recto.auto.mode">
2986
+ <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2987
+ <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2988
+ </div>
2989
+ </xsl:template>
2990
+
2991
+ <xsl:template name="sect5.titlepage.recto">
2992
+ <xsl:choose>
2993
+ <xsl:when test="d:sect5info/d:title">
2994
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:title"/>
2995
+ </xsl:when>
2996
+ <xsl:when test="d:info/d:title">
2997
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:title"/>
2998
+ </xsl:when>
2999
+ <xsl:when test="d:title">
3000
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:title"/>
3001
+ </xsl:when>
3002
+ </xsl:choose>
3003
+
3004
+ <xsl:choose>
3005
+ <xsl:when test="d:sect5info/d:subtitle">
3006
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:subtitle"/>
3007
+ </xsl:when>
3008
+ <xsl:when test="d:info/d:subtitle">
3009
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3010
+ </xsl:when>
3011
+ <xsl:when test="d:subtitle">
3012
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:subtitle"/>
3013
+ </xsl:when>
3014
+ </xsl:choose>
3015
+
3016
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:corpauthor"/>
3017
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
3018
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:authorgroup"/>
3019
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
3020
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:author"/>
3021
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:author"/>
3022
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:othercredit"/>
3023
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
3024
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:releaseinfo"/>
3025
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
3026
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:copyright"/>
3027
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
3028
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:legalnotice"/>
3029
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
3030
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:pubdate"/>
3031
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
3032
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:revision"/>
3033
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:revision"/>
3034
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:revhistory"/>
3035
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
3036
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:abstract"/>
3037
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
3038
+ </xsl:template>
3039
+
3040
+ <xsl:template name="sect5.titlepage.verso">
3041
+ </xsl:template>
3042
+
3043
+ <xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
3044
+ </xsl:template>
3045
+
3046
+ <xsl:template name="sect5.titlepage.before.recto">
3047
+ </xsl:template>
3048
+
3049
+ <xsl:template name="sect5.titlepage.before.verso">
3050
+ </xsl:template>
3051
+
3052
+ <xsl:template name="sect5.titlepage">
3053
+ <div class="titlepage">
3054
+ <xsl:variable name="recto.content">
3055
+ <xsl:call-template name="sect5.titlepage.before.recto"/>
3056
+ <xsl:call-template name="sect5.titlepage.recto"/>
3057
+ </xsl:variable>
3058
+ <xsl:variable name="recto.elements.count">
3059
+ <xsl:choose>
3060
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3061
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3062
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3063
+ <xsl:otherwise>1</xsl:otherwise>
3064
+ </xsl:choose>
3065
+ </xsl:variable>
3066
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3067
+ <div><xsl:copy-of select="$recto.content"/></div>
3068
+ </xsl:if>
3069
+ <xsl:variable name="verso.content">
3070
+ <xsl:call-template name="sect5.titlepage.before.verso"/>
3071
+ <xsl:call-template name="sect5.titlepage.verso"/>
3072
+ </xsl:variable>
3073
+ <xsl:variable name="verso.elements.count">
3074
+ <xsl:choose>
3075
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3076
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3077
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3078
+ <xsl:otherwise>1</xsl:otherwise>
3079
+ </xsl:choose>
3080
+ </xsl:variable>
3081
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3082
+ <div><xsl:copy-of select="$verso.content"/></div>
3083
+ </xsl:if>
3084
+ <xsl:call-template name="sect5.titlepage.separator"/>
3085
+ </div>
3086
+ </xsl:template>
3087
+
3088
+ <xsl:template match="*" mode="sect5.titlepage.recto.mode">
3089
+ <!-- if an element isn't found in this mode, -->
3090
+ <!-- try the generic titlepage.mode -->
3091
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3092
+ </xsl:template>
3093
+
3094
+ <xsl:template match="*" mode="sect5.titlepage.verso.mode">
3095
+ <!-- if an element isn't found in this mode, -->
3096
+ <!-- try the generic titlepage.mode -->
3097
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3098
+ </xsl:template>
3099
+
3100
+ <xsl:template match="d:title" mode="sect5.titlepage.recto.auto.mode">
3101
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3102
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3103
+ </div>
3104
+ </xsl:template>
3105
+
3106
+ <xsl:template match="d:subtitle" mode="sect5.titlepage.recto.auto.mode">
3107
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3108
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3109
+ </div>
3110
+ </xsl:template>
3111
+
3112
+ <xsl:template match="d:corpauthor" mode="sect5.titlepage.recto.auto.mode">
3113
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3114
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3115
+ </div>
3116
+ </xsl:template>
3117
+
3118
+ <xsl:template match="d:authorgroup" mode="sect5.titlepage.recto.auto.mode">
3119
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3120
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3121
+ </div>
3122
+ </xsl:template>
3123
+
3124
+ <xsl:template match="d:author" mode="sect5.titlepage.recto.auto.mode">
3125
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3126
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3127
+ </div>
3128
+ </xsl:template>
3129
+
3130
+ <xsl:template match="d:othercredit" mode="sect5.titlepage.recto.auto.mode">
3131
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3132
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3133
+ </div>
3134
+ </xsl:template>
3135
+
3136
+ <xsl:template match="d:releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3137
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3138
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3139
+ </div>
3140
+ </xsl:template>
3141
+
3142
+ <xsl:template match="d:copyright" mode="sect5.titlepage.recto.auto.mode">
3143
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3144
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3145
+ </div>
3146
+ </xsl:template>
3147
+
3148
+ <xsl:template match="d:legalnotice" mode="sect5.titlepage.recto.auto.mode">
3149
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3150
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3151
+ </div>
3152
+ </xsl:template>
3153
+
3154
+ <xsl:template match="d:pubdate" mode="sect5.titlepage.recto.auto.mode">
3155
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3156
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3157
+ </div>
3158
+ </xsl:template>
3159
+
3160
+ <xsl:template match="d:revision" mode="sect5.titlepage.recto.auto.mode">
3161
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3162
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3163
+ </div>
3164
+ </xsl:template>
3165
+
3166
+ <xsl:template match="d:revhistory" mode="sect5.titlepage.recto.auto.mode">
3167
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3168
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3169
+ </div>
3170
+ </xsl:template>
3171
+
3172
+ <xsl:template match="d:abstract" mode="sect5.titlepage.recto.auto.mode">
3173
+ <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3174
+ <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3175
+ </div>
3176
+ </xsl:template>
3177
+
3178
+ <xsl:template name="simplesect.titlepage.recto">
3179
+ <xsl:choose>
3180
+ <xsl:when test="d:simplesectinfo/d:title">
3181
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:title"/>
3182
+ </xsl:when>
3183
+ <xsl:when test="d:docinfo/d:title">
3184
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
3185
+ </xsl:when>
3186
+ <xsl:when test="d:info/d:title">
3187
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:title"/>
3188
+ </xsl:when>
3189
+ <xsl:when test="d:title">
3190
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:title"/>
3191
+ </xsl:when>
3192
+ </xsl:choose>
3193
+
3194
+ <xsl:choose>
3195
+ <xsl:when test="d:simplesectinfo/d:subtitle">
3196
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:subtitle"/>
3197
+ </xsl:when>
3198
+ <xsl:when test="d:docinfo/d:subtitle">
3199
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
3200
+ </xsl:when>
3201
+ <xsl:when test="d:info/d:subtitle">
3202
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3203
+ </xsl:when>
3204
+ <xsl:when test="d:subtitle">
3205
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:subtitle"/>
3206
+ </xsl:when>
3207
+ </xsl:choose>
3208
+
3209
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:corpauthor"/>
3210
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
3211
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
3212
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:authorgroup"/>
3213
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
3214
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
3215
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:author"/>
3216
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
3217
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:author"/>
3218
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:othercredit"/>
3219
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
3220
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
3221
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:releaseinfo"/>
3222
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
3223
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
3224
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:copyright"/>
3225
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
3226
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
3227
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:legalnotice"/>
3228
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
3229
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
3230
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:pubdate"/>
3231
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
3232
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
3233
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:revision"/>
3234
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
3235
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:revision"/>
3236
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:revhistory"/>
3237
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
3238
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
3239
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:abstract"/>
3240
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:abstract"/>
3241
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:abstract"/>
3242
+ </xsl:template>
3243
+
3244
+ <xsl:template name="simplesect.titlepage.verso">
3245
+ </xsl:template>
3246
+
3247
+ <xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
3248
+ </xsl:template>
3249
+
3250
+ <xsl:template name="simplesect.titlepage.before.recto">
3251
+ </xsl:template>
3252
+
3253
+ <xsl:template name="simplesect.titlepage.before.verso">
3254
+ </xsl:template>
3255
+
3256
+ <xsl:template name="simplesect.titlepage">
3257
+ <div class="titlepage">
3258
+ <xsl:variable name="recto.content">
3259
+ <xsl:call-template name="simplesect.titlepage.before.recto"/>
3260
+ <xsl:call-template name="simplesect.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
+ <div><xsl:copy-of select="$recto.content"/></div>
3272
+ </xsl:if>
3273
+ <xsl:variable name="verso.content">
3274
+ <xsl:call-template name="simplesect.titlepage.before.verso"/>
3275
+ <xsl:call-template name="simplesect.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
+ <div><xsl:copy-of select="$verso.content"/></div>
3287
+ </xsl:if>
3288
+ <xsl:call-template name="simplesect.titlepage.separator"/>
3289
+ </div>
3290
+ </xsl:template>
3291
+
3292
+ <xsl:template match="*" mode="simplesect.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="simplesect.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="simplesect.titlepage.recto.auto.mode">
3305
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3306
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3307
+ </div>
3308
+ </xsl:template>
3309
+
3310
+ <xsl:template match="d:subtitle" mode="simplesect.titlepage.recto.auto.mode">
3311
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3312
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3313
+ </div>
3314
+ </xsl:template>
3315
+
3316
+ <xsl:template match="d:corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3317
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3318
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3319
+ </div>
3320
+ </xsl:template>
3321
+
3322
+ <xsl:template match="d:authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3323
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3324
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3325
+ </div>
3326
+ </xsl:template>
3327
+
3328
+ <xsl:template match="d:author" mode="simplesect.titlepage.recto.auto.mode">
3329
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3330
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3331
+ </div>
3332
+ </xsl:template>
3333
+
3334
+ <xsl:template match="d:othercredit" mode="simplesect.titlepage.recto.auto.mode">
3335
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3336
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3337
+ </div>
3338
+ </xsl:template>
3339
+
3340
+ <xsl:template match="d:releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3341
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3342
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3343
+ </div>
3344
+ </xsl:template>
3345
+
3346
+ <xsl:template match="d:copyright" mode="simplesect.titlepage.recto.auto.mode">
3347
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3348
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3349
+ </div>
3350
+ </xsl:template>
3351
+
3352
+ <xsl:template match="d:legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3353
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3354
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3355
+ </div>
3356
+ </xsl:template>
3357
+
3358
+ <xsl:template match="d:pubdate" mode="simplesect.titlepage.recto.auto.mode">
3359
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3360
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3361
+ </div>
3362
+ </xsl:template>
3363
+
3364
+ <xsl:template match="d:revision" mode="simplesect.titlepage.recto.auto.mode">
3365
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3366
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3367
+ </div>
3368
+ </xsl:template>
3369
+
3370
+ <xsl:template match="d:revhistory" mode="simplesect.titlepage.recto.auto.mode">
3371
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3372
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3373
+ </div>
3374
+ </xsl:template>
3375
+
3376
+ <xsl:template match="d:abstract" mode="simplesect.titlepage.recto.auto.mode">
3377
+ <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3378
+ <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3379
+ </div>
3380
+ </xsl:template>
3381
+
3382
+ <xsl:template name="bibliography.titlepage.recto">
3383
+ <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
3384
+ <xsl:call-template name="component.title">
3385
+ <xsl:with-param name="node" select="ancestor-or-self::d:bibliography[1]"/>
3386
+ </xsl:call-template></div>
3387
+ <xsl:choose>
3388
+ <xsl:when test="d:bibliographyinfo/d:subtitle">
3389
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:bibliographyinfo/d:subtitle"/>
3390
+ </xsl:when>
3391
+ <xsl:when test="d:docinfo/d:subtitle">
3392
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
3393
+ </xsl:when>
3394
+ <xsl:when test="d:info/d:subtitle">
3395
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3396
+ </xsl:when>
3397
+ <xsl:when test="d:subtitle">
3398
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:subtitle"/>
3399
+ </xsl:when>
3400
+ </xsl:choose>
3401
+
3402
+ </xsl:template>
3403
+
3404
+ <xsl:template name="bibliography.titlepage.verso">
3405
+ </xsl:template>
3406
+
3407
+ <xsl:template name="bibliography.titlepage.separator">
3408
+ </xsl:template>
3409
+
3410
+ <xsl:template name="bibliography.titlepage.before.recto">
3411
+ </xsl:template>
3412
+
3413
+ <xsl:template name="bibliography.titlepage.before.verso">
3414
+ </xsl:template>
3415
+
3416
+ <xsl:template name="bibliography.titlepage">
3417
+ <div class="titlepage">
3418
+ <xsl:variable name="recto.content">
3419
+ <xsl:call-template name="bibliography.titlepage.before.recto"/>
3420
+ <xsl:call-template name="bibliography.titlepage.recto"/>
3421
+ </xsl:variable>
3422
+ <xsl:variable name="recto.elements.count">
3423
+ <xsl:choose>
3424
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3425
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3426
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3427
+ <xsl:otherwise>1</xsl:otherwise>
3428
+ </xsl:choose>
3429
+ </xsl:variable>
3430
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3431
+ <div><xsl:copy-of select="$recto.content"/></div>
3432
+ </xsl:if>
3433
+ <xsl:variable name="verso.content">
3434
+ <xsl:call-template name="bibliography.titlepage.before.verso"/>
3435
+ <xsl:call-template name="bibliography.titlepage.verso"/>
3436
+ </xsl:variable>
3437
+ <xsl:variable name="verso.elements.count">
3438
+ <xsl:choose>
3439
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3440
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3441
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3442
+ <xsl:otherwise>1</xsl:otherwise>
3443
+ </xsl:choose>
3444
+ </xsl:variable>
3445
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3446
+ <div><xsl:copy-of select="$verso.content"/></div>
3447
+ </xsl:if>
3448
+ <xsl:call-template name="bibliography.titlepage.separator"/>
3449
+ </div>
3450
+ </xsl:template>
3451
+
3452
+ <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
3453
+ <!-- if an element isn't found in this mode, -->
3454
+ <!-- try the generic titlepage.mode -->
3455
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3456
+ </xsl:template>
3457
+
3458
+ <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
3459
+ <!-- if an element isn't found in this mode, -->
3460
+ <!-- try the generic titlepage.mode -->
3461
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3462
+ </xsl:template>
3463
+
3464
+ <xsl:template match="d:subtitle" mode="bibliography.titlepage.recto.auto.mode">
3465
+ <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
3466
+ <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
3467
+ </div>
3468
+ </xsl:template>
3469
+
3470
+ <xsl:template name="glossary.titlepage.recto">
3471
+ <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
3472
+ <xsl:call-template name="component.title">
3473
+ <xsl:with-param name="node" select="ancestor-or-self::d:glossary[1]"/>
3474
+ </xsl:call-template></div>
3475
+ <xsl:choose>
3476
+ <xsl:when test="d:glossaryinfo/d:subtitle">
3477
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:glossaryinfo/d:subtitle"/>
3478
+ </xsl:when>
3479
+ <xsl:when test="d:docinfo/d:subtitle">
3480
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
3481
+ </xsl:when>
3482
+ <xsl:when test="d:info/d:subtitle">
3483
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3484
+ </xsl:when>
3485
+ <xsl:when test="d:subtitle">
3486
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:subtitle"/>
3487
+ </xsl:when>
3488
+ </xsl:choose>
3489
+
3490
+ </xsl:template>
3491
+
3492
+ <xsl:template name="glossary.titlepage.verso">
3493
+ </xsl:template>
3494
+
3495
+ <xsl:template name="glossary.titlepage.separator">
3496
+ </xsl:template>
3497
+
3498
+ <xsl:template name="glossary.titlepage.before.recto">
3499
+ </xsl:template>
3500
+
3501
+ <xsl:template name="glossary.titlepage.before.verso">
3502
+ </xsl:template>
3503
+
3504
+ <xsl:template name="glossary.titlepage">
3505
+ <div class="titlepage">
3506
+ <xsl:variable name="recto.content">
3507
+ <xsl:call-template name="glossary.titlepage.before.recto"/>
3508
+ <xsl:call-template name="glossary.titlepage.recto"/>
3509
+ </xsl:variable>
3510
+ <xsl:variable name="recto.elements.count">
3511
+ <xsl:choose>
3512
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3513
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3514
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3515
+ <xsl:otherwise>1</xsl:otherwise>
3516
+ </xsl:choose>
3517
+ </xsl:variable>
3518
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3519
+ <div><xsl:copy-of select="$recto.content"/></div>
3520
+ </xsl:if>
3521
+ <xsl:variable name="verso.content">
3522
+ <xsl:call-template name="glossary.titlepage.before.verso"/>
3523
+ <xsl:call-template name="glossary.titlepage.verso"/>
3524
+ </xsl:variable>
3525
+ <xsl:variable name="verso.elements.count">
3526
+ <xsl:choose>
3527
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3528
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3529
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3530
+ <xsl:otherwise>1</xsl:otherwise>
3531
+ </xsl:choose>
3532
+ </xsl:variable>
3533
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3534
+ <div><xsl:copy-of select="$verso.content"/></div>
3535
+ </xsl:if>
3536
+ <xsl:call-template name="glossary.titlepage.separator"/>
3537
+ </div>
3538
+ </xsl:template>
3539
+
3540
+ <xsl:template match="*" mode="glossary.titlepage.recto.mode">
3541
+ <!-- if an element isn't found in this mode, -->
3542
+ <!-- try the generic titlepage.mode -->
3543
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3544
+ </xsl:template>
3545
+
3546
+ <xsl:template match="*" mode="glossary.titlepage.verso.mode">
3547
+ <!-- if an element isn't found in this mode, -->
3548
+ <!-- try the generic titlepage.mode -->
3549
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3550
+ </xsl:template>
3551
+
3552
+ <xsl:template match="d:subtitle" mode="glossary.titlepage.recto.auto.mode">
3553
+ <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
3554
+ <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
3555
+ </div>
3556
+ </xsl:template>
3557
+
3558
+ <xsl:template name="index.titlepage.recto">
3559
+ <div xsl:use-attribute-sets="index.titlepage.recto.style">
3560
+ <xsl:call-template name="component.title">
3561
+ <xsl:with-param name="node" select="ancestor-or-self::d:index[1]"/>
3562
+ </xsl:call-template></div>
3563
+ <xsl:choose>
3564
+ <xsl:when test="d:indexinfo/d:subtitle">
3565
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:indexinfo/d:subtitle"/>
3566
+ </xsl:when>
3567
+ <xsl:when test="d:docinfo/d:subtitle">
3568
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
3569
+ </xsl:when>
3570
+ <xsl:when test="d:info/d:subtitle">
3571
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3572
+ </xsl:when>
3573
+ <xsl:when test="d:subtitle">
3574
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:subtitle"/>
3575
+ </xsl:when>
3576
+ </xsl:choose>
3577
+
3578
+ </xsl:template>
3579
+
3580
+ <xsl:template name="index.titlepage.verso">
3581
+ </xsl:template>
3582
+
3583
+ <xsl:template name="index.titlepage.separator">
3584
+ </xsl:template>
3585
+
3586
+ <xsl:template name="index.titlepage.before.recto">
3587
+ </xsl:template>
3588
+
3589
+ <xsl:template name="index.titlepage.before.verso">
3590
+ </xsl:template>
3591
+
3592
+ <xsl:template name="index.titlepage">
3593
+ <div class="titlepage">
3594
+ <xsl:variable name="recto.content">
3595
+ <xsl:call-template name="index.titlepage.before.recto"/>
3596
+ <xsl:call-template name="index.titlepage.recto"/>
3597
+ </xsl:variable>
3598
+ <xsl:variable name="recto.elements.count">
3599
+ <xsl:choose>
3600
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3601
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3602
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3603
+ <xsl:otherwise>1</xsl:otherwise>
3604
+ </xsl:choose>
3605
+ </xsl:variable>
3606
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3607
+ <div><xsl:copy-of select="$recto.content"/></div>
3608
+ </xsl:if>
3609
+ <xsl:variable name="verso.content">
3610
+ <xsl:call-template name="index.titlepage.before.verso"/>
3611
+ <xsl:call-template name="index.titlepage.verso"/>
3612
+ </xsl:variable>
3613
+ <xsl:variable name="verso.elements.count">
3614
+ <xsl:choose>
3615
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3616
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3617
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3618
+ <xsl:otherwise>1</xsl:otherwise>
3619
+ </xsl:choose>
3620
+ </xsl:variable>
3621
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3622
+ <div><xsl:copy-of select="$verso.content"/></div>
3623
+ </xsl:if>
3624
+ <xsl:call-template name="index.titlepage.separator"/>
3625
+ </div>
3626
+ </xsl:template>
3627
+
3628
+ <xsl:template match="*" mode="index.titlepage.recto.mode">
3629
+ <!-- if an element isn't found in this mode, -->
3630
+ <!-- try the generic titlepage.mode -->
3631
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3632
+ </xsl:template>
3633
+
3634
+ <xsl:template match="*" mode="index.titlepage.verso.mode">
3635
+ <!-- if an element isn't found in this mode, -->
3636
+ <!-- try the generic titlepage.mode -->
3637
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3638
+ </xsl:template>
3639
+
3640
+ <xsl:template match="d:subtitle" mode="index.titlepage.recto.auto.mode">
3641
+ <div xsl:use-attribute-sets="index.titlepage.recto.style">
3642
+ <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
3643
+ </div>
3644
+ </xsl:template>
3645
+
3646
+ <xsl:template name="setindex.titlepage.recto">
3647
+ <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
3648
+ <xsl:call-template name="component.title">
3649
+ <xsl:with-param name="node" select="ancestor-or-self::d:setindex[1]"/>
3650
+ </xsl:call-template></div>
3651
+ <xsl:choose>
3652
+ <xsl:when test="d:setindexinfo/d:subtitle">
3653
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:setindexinfo/d:subtitle"/>
3654
+ </xsl:when>
3655
+ <xsl:when test="d:docinfo/d:subtitle">
3656
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
3657
+ </xsl:when>
3658
+ <xsl:when test="d:info/d:subtitle">
3659
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3660
+ </xsl:when>
3661
+ <xsl:when test="d:subtitle">
3662
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:subtitle"/>
3663
+ </xsl:when>
3664
+ </xsl:choose>
3665
+
3666
+ </xsl:template>
3667
+
3668
+ <xsl:template name="setindex.titlepage.verso">
3669
+ </xsl:template>
3670
+
3671
+ <xsl:template name="setindex.titlepage.separator">
3672
+ </xsl:template>
3673
+
3674
+ <xsl:template name="setindex.titlepage.before.recto">
3675
+ </xsl:template>
3676
+
3677
+ <xsl:template name="setindex.titlepage.before.verso">
3678
+ </xsl:template>
3679
+
3680
+ <xsl:template name="setindex.titlepage">
3681
+ <div class="titlepage">
3682
+ <xsl:variable name="recto.content">
3683
+ <xsl:call-template name="setindex.titlepage.before.recto"/>
3684
+ <xsl:call-template name="setindex.titlepage.recto"/>
3685
+ </xsl:variable>
3686
+ <xsl:variable name="recto.elements.count">
3687
+ <xsl:choose>
3688
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3689
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3690
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3691
+ <xsl:otherwise>1</xsl:otherwise>
3692
+ </xsl:choose>
3693
+ </xsl:variable>
3694
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3695
+ <div><xsl:copy-of select="$recto.content"/></div>
3696
+ </xsl:if>
3697
+ <xsl:variable name="verso.content">
3698
+ <xsl:call-template name="setindex.titlepage.before.verso"/>
3699
+ <xsl:call-template name="setindex.titlepage.verso"/>
3700
+ </xsl:variable>
3701
+ <xsl:variable name="verso.elements.count">
3702
+ <xsl:choose>
3703
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3704
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3705
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3706
+ <xsl:otherwise>1</xsl:otherwise>
3707
+ </xsl:choose>
3708
+ </xsl:variable>
3709
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3710
+ <div><xsl:copy-of select="$verso.content"/></div>
3711
+ </xsl:if>
3712
+ <xsl:call-template name="setindex.titlepage.separator"/>
3713
+ </div>
3714
+ </xsl:template>
3715
+
3716
+ <xsl:template match="*" mode="setindex.titlepage.recto.mode">
3717
+ <!-- if an element isn't found in this mode, -->
3718
+ <!-- try the generic titlepage.mode -->
3719
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3720
+ </xsl:template>
3721
+
3722
+ <xsl:template match="*" mode="setindex.titlepage.verso.mode">
3723
+ <!-- if an element isn't found in this mode, -->
3724
+ <!-- try the generic titlepage.mode -->
3725
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3726
+ </xsl:template>
3727
+
3728
+ <xsl:template match="d:subtitle" mode="setindex.titlepage.recto.auto.mode">
3729
+ <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
3730
+ <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
3731
+ </div>
3732
+ </xsl:template>
3733
+
3734
+ <xsl:template name="sidebar.titlepage.recto">
3735
+ <xsl:choose>
3736
+ <xsl:when test="d:sidebarinfo/d:title">
3737
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:sidebarinfo/d:title"/>
3738
+ </xsl:when>
3739
+ <xsl:when test="d:docinfo/d:title">
3740
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
3741
+ </xsl:when>
3742
+ <xsl:when test="d:info/d:title">
3743
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:info/d:title"/>
3744
+ </xsl:when>
3745
+ <xsl:when test="d:title">
3746
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:title"/>
3747
+ </xsl:when>
3748
+ </xsl:choose>
3749
+
3750
+ <xsl:choose>
3751
+ <xsl:when test="d:sidebarinfo/d:subtitle">
3752
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:sidebarinfo/d:subtitle"/>
3753
+ </xsl:when>
3754
+ <xsl:when test="d:docinfo/d:subtitle">
3755
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
3756
+ </xsl:when>
3757
+ <xsl:when test="d:info/d:subtitle">
3758
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
3759
+ </xsl:when>
3760
+ <xsl:when test="d:subtitle">
3761
+ <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:subtitle"/>
3762
+ </xsl:when>
3763
+ </xsl:choose>
3764
+
3765
+ </xsl:template>
3766
+
3767
+ <xsl:template name="sidebar.titlepage.verso">
3768
+ </xsl:template>
3769
+
3770
+ <xsl:template name="sidebar.titlepage.separator">
3771
+ </xsl:template>
3772
+
3773
+ <xsl:template name="sidebar.titlepage.before.recto">
3774
+ </xsl:template>
3775
+
3776
+ <xsl:template name="sidebar.titlepage.before.verso">
3777
+ </xsl:template>
3778
+
3779
+ <xsl:template name="sidebar.titlepage">
3780
+ <div class="titlepage">
3781
+ <xsl:variable name="recto.content">
3782
+ <xsl:call-template name="sidebar.titlepage.before.recto"/>
3783
+ <xsl:call-template name="sidebar.titlepage.recto"/>
3784
+ </xsl:variable>
3785
+ <xsl:variable name="recto.elements.count">
3786
+ <xsl:choose>
3787
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3788
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3789
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3790
+ <xsl:otherwise>1</xsl:otherwise>
3791
+ </xsl:choose>
3792
+ </xsl:variable>
3793
+ <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3794
+ <div><xsl:copy-of select="$recto.content"/></div>
3795
+ </xsl:if>
3796
+ <xsl:variable name="verso.content">
3797
+ <xsl:call-template name="sidebar.titlepage.before.verso"/>
3798
+ <xsl:call-template name="sidebar.titlepage.verso"/>
3799
+ </xsl:variable>
3800
+ <xsl:variable name="verso.elements.count">
3801
+ <xsl:choose>
3802
+ <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3803
+ <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3804
+ <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3805
+ <xsl:otherwise>1</xsl:otherwise>
3806
+ </xsl:choose>
3807
+ </xsl:variable>
3808
+ <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3809
+ <div><xsl:copy-of select="$verso.content"/></div>
3810
+ </xsl:if>
3811
+ <xsl:call-template name="sidebar.titlepage.separator"/>
3812
+ </div>
3813
+ </xsl:template>
3814
+
3815
+ <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
3816
+ <!-- if an element isn't found in this mode, -->
3817
+ <!-- try the generic titlepage.mode -->
3818
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3819
+ </xsl:template>
3820
+
3821
+ <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
3822
+ <!-- if an element isn't found in this mode, -->
3823
+ <!-- try the generic titlepage.mode -->
3824
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
3825
+ </xsl:template>
3826
+
3827
+ <xsl:template match="d:title" mode="sidebar.titlepage.recto.auto.mode">
3828
+ <div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
3829
+ <xsl:call-template name="formal.object.heading">
3830
+ <xsl:with-param name="object" select="ancestor-or-self::d:sidebar[1]"/>
3831
+ </xsl:call-template>
3832
+ </div>
3833
+ </xsl:template>
3834
+
3835
+ <xsl:template match="d:subtitle" mode="sidebar.titlepage.recto.auto.mode">
3836
+ <div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
3837
+ <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
3838
+ </div>
3839
+ </xsl:template>
3840
+
3841
+ </xsl:stylesheet>
3842
+