Debian Codegraph @

doc/SystemTap_Beginners_Guide/en-US/xsl/pdf.xsl

raw
1 <?xml version='1.0'?>
2
3 <!DOCTYPE xsl:stylesheet [
4 <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
5 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
6 <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
7 <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
8 <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
9 <!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
10 parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
11 parent::glossary|parent::glossdiv|parent::important|parent::index|
12 parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
13 parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
14 parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
15 parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
16 parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
17 parent::sect5|parent::section|parent::setindex|parent::sidebar|
18 parent::simplesect|parent::taskprerequisites|parent::taskrelated|
19 parent::tasksummary|parent::warning">
20 ]>
21
22 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23 version='1.0'
24 xmlns="http://www.w3.org/TR/xhtml1/transitional"
25 xmlns:fo="http://www.w3.org/1999/XSL/Format"
26 xmlns:rx="http://www.renderx.com/XSL/Extensions"
27 xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
28 xmlns:xtbl="com.nwalsh.xalan.Table"
29 xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
30 xmlns:perl="urn:perl"
31 xmlns:exsl="http://exslt.org/common"
32 exclude-result-prefixes="exsl perl ptbl xtbl stbl">
33 <!-- exclude-result-prefixes="#default"> -->
34
35 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
36 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/graphics.xsl"/>
37 <!-- This is required to get footnotes to format correctly due to overriding para BZ #565903 -->
38 <!-- This has to use include to get the override working, do not change to import -->
39 <xsl:include href="http://docbook.sourceforge.net/release/xsl/current/fo/footnote.xsl"/>
40 <xsl:include href="defaults.xsl"/>
41 <xsl:param name="alignment">
42 <xsl:choose>
43 <xsl:when test="$l10n.gentext.language = 'zh-CN' or $l10n.gentext.language = 'zh-TW' or $l10n.gentext.language = 'ja-JP' or $l10n.gentext.language = 'ko-KR'">
44 <xsl:text>left</xsl:text>
45 </xsl:when>
46 <xsl:otherwise>
47 <xsl:text>left</xsl:text>
48 </xsl:otherwise>
49 </xsl:choose>
50 </xsl:param>
51 <xsl:param name="use.extensions" select="1"/>
52 <xsl:param name="tablecolumns.extension" select="1"/>
53 <xsl:param name="fop.extensions" select="0"/>
54 <xsl:param name="fop1.extensions" select="1"/>
55 <xsl:param name="img.src.path"/>
56 <xsl:param name="qandadiv.autolabel" select="1"/>
57 <xsl:param name="keep.relative.image.uris" select="1"/>
58 <xsl:param name="email.delimiters.enabled">0</xsl:param>
59
60 <xsl:param name="hyphenation-character">
61 <xsl:choose>
62 <xsl:when test="$l10n.gentext.language = 'zh-CN' or $l10n.gentext.language = 'zh-TW' or $l10n.gentext.language = 'ja-JP' or $l10n.gentext.language = 'ko-KR'">
63 <xsl:text>-</xsl:text>
64 </xsl:when>
65 <xsl:otherwise>
66 <xsl:text>-</xsl:text>
67 </xsl:otherwise>
68 </xsl:choose>
69 </xsl:param>
70 <!--xsl:param name="default.image.width" select="'440'"/-->
71 <xsl:param name="hyphenate.verbatim" select="0"/>
72 <xsl:param name="hyphenate">true</xsl:param>
73 <!--xsl:param name="ulink.hyphenate" select="''"/-->
74 <xsl:param name="ulink.footnotes" select="1"/>
75 <xsl:param name="ulink.show" select="1"/>
76 <xsl:param name="table.footnote.number.format" select="'1'"/>
77 <xsl:param name="table.footnote.number.symbols" select="''"/>
78 <xsl:param name="highlight.source" select="1"/>
79
80 <xsl:param name="line-height" select="1.3"/>
81 <xsl:param name="segmentedlist.as.table" select="1"/>
82
83 <xsl:attribute-set name="xref.properties">
84 <xsl:attribute name="font-style">italic</xsl:attribute>
85 <xsl:attribute name="color">#0066cc</xsl:attribute>
86 </xsl:attribute-set>
87
88 <xsl:attribute-set name="monospace.properties">
89 <!--xsl:attribute name="font-size">9pt</xsl:attribute-->
90 <xsl:attribute name="font-family">
91 <xsl:value-of select="$monospace.font.family"/>
92 </xsl:attribute>
93 </xsl:attribute-set>
94
95 <xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties">
96 <xsl:attribute name="text-align">start</xsl:attribute>
97 <xsl:attribute name="wrap-option">wrap</xsl:attribute>
98 <xsl:attribute name="hyphenation-character">\</xsl:attribute>
99 </xsl:attribute-set>
100
101 <xsl:param name="shade.verbatim" select="1"/>
102 <xsl:attribute-set name="shade.verbatim.style">
103 <xsl:attribute name="wrap-option">wrap</xsl:attribute>
104 <xsl:attribute name="hyphenation-character">\</xsl:attribute>
105 <xsl:attribute name="background-color">#f5f5f5</xsl:attribute>
106 <xsl:attribute name="color">black</xsl:attribute>
107 <xsl:attribute name="padding-left">6pt</xsl:attribute>
108 <!--xsl:attribute name="padding-right">12pt</xsl:attribute-->
109 <xsl:attribute name="padding-top">6pt</xsl:attribute>
110 <xsl:attribute name="padding-bottom">6pt</xsl:attribute>
111 <xsl:attribute name="margin-left">
112 <xsl:value-of select="$title.margin.left"/>
113 </xsl:attribute>
114 <xsl:attribute name="font-size">
115 <xsl:value-of select="$body.font.master * 0.8"/>
116 <xsl:text>pt</xsl:text>
117 </xsl:attribute>
118 <xsl:attribute name="border-width">1pt</xsl:attribute>
119 <xsl:attribute name="border-style">solid</xsl:attribute>
120 <xsl:attribute name="border-color">#aaaaaa</xsl:attribute>
121 </xsl:attribute-set>
122
123 <xsl:attribute-set name="hidden.properties">
124 <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
125 <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
126 <xsl:attribute name="space-before.maximum">0em</xsl:attribute>
127 <xsl:attribute name="space-after.minimum">0em</xsl:attribute>
128 <xsl:attribute name="space-after.optimum">0em</xsl:attribute>
129 <xsl:attribute name="space-after.maximum">0em</xsl:attribute>
130 <xsl:attribute name="font-size">0pt</xsl:attribute>
131 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
132 </xsl:attribute-set>
133
134 <xsl:attribute-set name="verbatim.properties">
135 <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
136 <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
137 <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
138 <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
139 <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
140 <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
141 <xsl:attribute name="hyphenate">true</xsl:attribute>
142 <xsl:attribute name="wrap-option">wrap</xsl:attribute>
143 <xsl:attribute name="white-space-collapse">false</xsl:attribute>
144 <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
145 <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
146 <xsl:attribute name="text-align">start</xsl:attribute>
147 </xsl:attribute-set>
148
149 <xsl:attribute-set name="toc.line.properties">
150 <xsl:attribute name="text-align-last">justify</xsl:attribute>
151 <xsl:attribute name="text-align">start</xsl:attribute>
152 </xsl:attribute-set>
153
154 <!-- Admonitions -->
155 <xsl:param name="admon.graphics" select="1"/>
156 <xsl:param name="admon.graphics.path">
157 <xsl:if test="$img.src.path != ''"><xsl:value-of select="$img.src.path"/></xsl:if><xsl:text>Common_Content/images/</xsl:text>
158 </xsl:param>
159 <xsl:param name="admon.graphics.extension" select="'.svg'"/>
160 <xsl:attribute-set name="admonition.title.properties">
161 <xsl:attribute name="padding-left">0em</xsl:attribute>
162 <xsl:attribute name="padding-bottom">0em</xsl:attribute>
163 <xsl:attribute name="margin-left">0em</xsl:attribute>
164 <xsl:attribute name="margin-bottom">0em</xsl:attribute>
165 <xsl:attribute name="text-indent">3em</xsl:attribute>
166 <xsl:attribute name="font-size">13pt</xsl:attribute>
167 <xsl:attribute name="color">#eeeeec</xsl:attribute>
168 <xsl:attribute name="font-weight">bold</xsl:attribute>
169 <xsl:attribute name="hyphenate">true</xsl:attribute>
170 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
171 <xsl:attribute name="background-color">
172 <xsl:choose>
173 <xsl:when test="local-name(.)='note'">
174 <xsl:text>#8e9f00</xsl:text>
175 </xsl:when>
176 <xsl:when test="local-name(.)='important'">
177 <xsl:text>#d08e13</xsl:text>
178 </xsl:when>
179 <xsl:when test="local-name(.)='warning'">
180 <xsl:text>#9e0000</xsl:text>
181 </xsl:when>
182 <xsl:otherwise>
183 <xsl:text>#dddddd</xsl:text>
184 </xsl:otherwise>
185 </xsl:choose>
186 </xsl:attribute>
187 </xsl:attribute-set>
188
189 <xsl:param name="draft.watermark.image" select="'Common_Content/images/watermark-draft.png'"/>
190
191 <xsl:attribute-set name="admonition.properties">
192 <xsl:attribute name="margin-right">0em</xsl:attribute>
193 <xsl:attribute name="margin-left">0em</xsl:attribute>
194 <xsl:attribute name="background-color">#eeeeec</xsl:attribute>
195 <xsl:attribute name="border-left-width">1pt</xsl:attribute>
196 <xsl:attribute name="border-left-style">solid</xsl:attribute>
197 <xsl:attribute name="border-left-color">#aaaaaa</xsl:attribute>
198 <xsl:attribute name="border-right-width">1pt</xsl:attribute>
199 <xsl:attribute name="border-right-style">solid</xsl:attribute>
200 <xsl:attribute name="border-right-color">#aaaaaa</xsl:attribute>
201 <xsl:attribute name="border-bottom-width">1pt</xsl:attribute>
202 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
203 <xsl:attribute name="border-bottom-color">#aaaaaa</xsl:attribute>
204 <xsl:attribute name="padding-top">1.5em</xsl:attribute>
205 <xsl:attribute name="padding-left">1em</xsl:attribute>
206 <xsl:attribute name="padding-right">1em</xsl:attribute>
207 <xsl:attribute name="margin-top">0em</xsl:attribute>
208 <xsl:attribute name="margin-bottom">0em</xsl:attribute>
209 </xsl:attribute-set>
210
211 <xsl:attribute-set name="graphical.admonition.properties">
212 <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
213 <xsl:attribute name="color">black</xsl:attribute>
214 <xsl:attribute name="background-color">white</xsl:attribute>
215 <xsl:attribute name="padding-bottom">0pt</xsl:attribute>
216 <xsl:attribute name="padding-top">0pt</xsl:attribute>
217 <!--xsl:attribute name="padding-right">12pt</xsl:attribute-->
218 <xsl:attribute name="padding-left">0em</xsl:attribute>
219 <xsl:attribute name="margin-left">
220 <xsl:value-of select="$title.margin.left"/>
221 </xsl:attribute>
222 </xsl:attribute-set>
223
224 <xsl:param name="generate.toc">
225 set toc
226 book toc,qandadiv
227 article toc
228 chapter nop
229 qandadiv nop
230 qandaset nop
231 sect1 nop
232 sect2 nop
233 sect3 nop
234 sect4 nop
235 sect5 nop
236 section nop
237 part nop
238 </xsl:param>
239
240 <xsl:param name="toc.section.depth">3</xsl:param>
241 <xsl:param name="section.autolabel" select="1"/>
242 <xsl:param name="section.label.includes.component.label" select="1"/>
243
244 <xsl:param name="callout.graphics.path">
245 <xsl:if test="$img.src.path != ''"><xsl:value-of select="$img.src.path"/></xsl:if><xsl:text>Common_Content/images/</xsl:text>
246 </xsl:param>
247 <xsl:param name="callout.icon.size">10pt</xsl:param>
248
249 <!-- Format Variable Lists as Blocks (prevents horizontal overflow). -->
250 <xsl:param name="variablelist.as.blocks">1</xsl:param>
251
252 <!-- The horrible list spacing problems, this is much better. -->
253 <xsl:attribute-set name="list.block.spacing">
254 <xsl:attribute name="space-before.optimum">0.1pt</xsl:attribute>
255 <xsl:attribute name="space-before.minimum">0.1pt</xsl:attribute>
256 <xsl:attribute name="space-before.maximum">0.1pt</xsl:attribute>
257 <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
258 <xsl:attribute name="space-after.minimum">1em</xsl:attribute>
259 <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
260 </xsl:attribute-set>
261 <xsl:attribute-set name="list.item.spacing">
262 <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
263 <xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
264 <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
265 <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
266 <xsl:attribute name="space-after.minimum">1em</xsl:attribute>
267 <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
268 </xsl:attribute-set>
269
270 <xsl:attribute-set name="fat.list.item.spacing" use-attribute-sets="list.item.spacing">
271 <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
272 <xsl:attribute name="space-after.minimum">1em</xsl:attribute>
273 <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
274 </xsl:attribute-set>
275
276 <xsl:attribute-set name="dash.list.item.spacing" use-attribute-sets="list.item.spacing">
277 <xsl:attribute name="padding-top">5pt</xsl:attribute>
278 <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
279 <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
280 <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
281 <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
282 <xsl:attribute name="border-top-style">dashed</xsl:attribute>
283 <xsl:attribute name="border-top-color">black</xsl:attribute>
284 </xsl:attribute-set>
285
286 <xsl:template match="listitem/*[1][local-name()='para' or
287 local-name()='simpara' or
288 local-name()='formalpara']
289 |glossdef/*[1][local-name()='para' or
290 local-name()='simpara' or
291 local-name()='formalpara']
292 |step/*[1][local-name()='para' or
293 local-name()='simpara' or
294 local-name()='formalpara']
295 |callout/*[1][local-name()='para' or
296 local-name()='simpara' or
297 local-name()='formalpara']"
298 priority="2">
299 <fo:block xsl:use-attribute-sets="list.item.spacing">
300 <xsl:if test="ancestor::step and following-sibling::figure">
301 <xsl:attribute name="keep-with-next.within-column">
302 <xsl:text>always</xsl:text>
303 </xsl:attribute>
304 </xsl:if>
305 <xsl:call-template name="anchor"/>
306 <xsl:apply-templates/>
307 </fo:block>
308 </xsl:template>
309
310 <!-- Some padding inside tables -->
311 <xsl:attribute-set name="table.cell.padding">
312 <xsl:attribute name="padding-left">4pt</xsl:attribute>
313 <xsl:attribute name="padding-right">4pt</xsl:attribute>
314 <xsl:attribute name="padding-top">2pt</xsl:attribute>
315 <xsl:attribute name="padding-bottom">2pt</xsl:attribute>
316 </xsl:attribute-set>
317
318 <xsl:attribute-set name="revhistory.table.cell.properties" use-attribute-sets="table.cell.padding">
319 <xsl:attribute name="font-weight">bold</xsl:attribute>
320 </xsl:attribute-set>
321
322 <xsl:attribute-set name="revremark.table.cell.properties">
323 <xsl:attribute name="padding-bottom">25pt</xsl:attribute>
324 <xsl:attribute name="font-weight">normal</xsl:attribute>
325 <xsl:attribute name="padding-left">16pt</xsl:attribute>
326 </xsl:attribute-set>
327
328 <!-- Only hairlines as frame and cell borders in tables -->
329 <xsl:param name="table.frame.border.thickness">0.6pt</xsl:param>
330 <xsl:param name="table.cell.border.thickness">0.6pt</xsl:param>
331 <xsl:param name="table.cell.border.color">black</xsl:param>
332 <xsl:param name="table.frame.border.color">black</xsl:param>
333 <xsl:param name="table.cell.border.right.color">white</xsl:param>
334 <xsl:param name="table.cell.border.left.color">white</xsl:param>
335 <xsl:param name="table.frame.border.right.color">white</xsl:param>
336 <xsl:param name="table.frame.border.left.color">white</xsl:param>
337 <!-- Paper type, no headers on blank pages, no double sided printing -->
338 <xsl:param name="paper.type" select="'A4'"/>
339 <xsl:param name="double.sided">1</xsl:param>
340 <xsl:param name="headers.on.blank.pages">1</xsl:param>
341 <xsl:param name="footers.on.blank.pages">1</xsl:param>
342 <!--xsl:param name="header.column.widths" select="'1 4 1'"/-->
343 <xsl:param name="header.column.widths" select="'1 0 1'"/>
344 <xsl:param name="footer.column.widths" select="'1 1 1'"/>
345 <xsl:param name="header.rule" select="1"/>
346
347 <!-- Space between paper border and content (chaotic stuff, don't touch) -->
348 <xsl:param name="page.margin.top">15mm</xsl:param>
349 <xsl:param name="region.before.extent">9mm</xsl:param>
350 <xsl:param name="body.margin.top">11mm</xsl:param>
351
352 <xsl:param name="body.margin.bottom">8mm</xsl:param>
353 <xsl:param name="region.after.extent">5mm</xsl:param>
354 <xsl:param name="page.margin.bottom">15mm</xsl:param>
355
356 <xsl:param name="page.margin.outer">19mm</xsl:param>
357 <xsl:param name="page.margin.inner">31mm</xsl:param>
358
359 <xsl:param name="body.start.indent">
360 <xsl:choose>
361 <xsl:when test="$fop.extensions != 0">0pt</xsl:when>
362 <xsl:when test="$fop1.extensions != 0">0pt</xsl:when>
363 <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
364 <xsl:otherwise>4pc</xsl:otherwise>
365 </xsl:choose>
366 </xsl:param>
367
368 <!-- No intendation of Titles -->
369 <xsl:param name="title.margin.left">0pc</xsl:param>
370
371 <xsl:param name="title.color">#336699</xsl:param>
372
373 <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
374 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
375 <xsl:attribute name="background-color">white</xsl:attribute>
376 <xsl:attribute name="font-weight">bold</xsl:attribute>
377 <xsl:attribute name="font-size">
378 <xsl:value-of select="$body.font.master * 1.2"/>
379 <xsl:text>pt</xsl:text>
380 </xsl:attribute>
381 <xsl:attribute name="hyphenate">false</xsl:attribute>
382 <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
383 <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
384 <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
385 </xsl:attribute-set>
386
387
388 <xsl:attribute-set name="qanda.title.properties">
389 <xsl:attribute name="font-family">
390 <xsl:value-of select="$title.font.family"/>
391 </xsl:attribute>
392 <xsl:attribute name="font-weight">bold</xsl:attribute>
393 <!-- font size is calculated dynamically by qanda.heading template -->
394 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
395 <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
396 <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
397 <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
398 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
399 </xsl:attribute-set>
400
401 <xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties">
402 <xsl:attribute name="border-left-width">3pt</xsl:attribute>
403 <xsl:attribute name="border-left-style">solid</xsl:attribute>
404 <xsl:attribute name="border-left-color">#aaaaaa</xsl:attribute>
405 <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
406 <xsl:attribute name="margin-left">0em</xsl:attribute>
407 <xsl:attribute name="padding-left">0.8em</xsl:attribute>
408 <xsl:attribute name="padding-top">0em</xsl:attribute>
409 <xsl:attribute name="margin-top">1.5em</xsl:attribute>
410 <xsl:attribute name="space-after.minimum">2em</xsl:attribute>
411 <xsl:attribute name="space-after.optimum">2em</xsl:attribute>
412 <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
413 </xsl:attribute-set>
414
415 <xsl:attribute-set name="table.properties">
416 <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
417 <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
418 <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
419 <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
420 <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
421 <xsl:attribute name="space-after.maximum">2em</xsl:attribute>
422 <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
423 </xsl:attribute-set>
424
425
426 <xsl:attribute-set name="below.title.properties" use-attribute-sets="formal.title.properties">
427 <xsl:attribute name="font-weight">normal</xsl:attribute>
428 <xsl:attribute name="font-size">
429 <xsl:value-of select="$body.font.master"/>
430 <xsl:text>pt</xsl:text>
431 </xsl:attribute>
432 <xsl:attribute name="space-before.optimum"><xsl:text>0.1pt</xsl:text></xsl:attribute>
433 <xsl:attribute name="space-before.minimum"><xsl:text>0.1pt</xsl:text></xsl:attribute>
434 <xsl:attribute name="space-before.maximum"><xsl:text>0.1pt</xsl:text></xsl:attribute>
435 </xsl:attribute-set>
436
437 <xsl:attribute-set name="above.title.properties" use-attribute-sets="formal.title.properties">
438 <xsl:attribute name="font-weight">normal</xsl:attribute>
439 <xsl:attribute name="font-size">
440 <xsl:value-of select="$body.font.master"/>
441 <xsl:text>pt</xsl:text>
442 </xsl:attribute>
443 <xsl:attribute name="space-before.optimum"><xsl:text>1em</xsl:text></xsl:attribute>
444 <xsl:attribute name="space-before.minimum"><xsl:text>0.5em</xsl:text></xsl:attribute>
445 <xsl:attribute name="space-before.maximum"><xsl:text>2em</xsl:text></xsl:attribute>
446 <xsl:attribute name="space-after.optimum"><xsl:text>0.1pt</xsl:text></xsl:attribute>
447 <xsl:attribute name="space-after.minimum"><xsl:text>0.1pt</xsl:text></xsl:attribute>
448 <xsl:attribute name="space-after.maximum"><xsl:text>0.1pt</xsl:text></xsl:attribute>
449 </xsl:attribute-set>
450
451 <xsl:attribute-set name="section.title.level1.properties">
452 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
453 <xsl:attribute name="font-size">
454 <xsl:value-of select="$body.font.master * 1.6"/>
455 <xsl:text>pt</xsl:text>
456 </xsl:attribute>
457 </xsl:attribute-set>
458 <xsl:attribute-set name="section.title.level2.properties">
459 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
460 <xsl:attribute name="font-size">
461 <xsl:value-of select="$body.font.master * 1.4"/>
462 <xsl:text>pt</xsl:text>
463 </xsl:attribute>
464 </xsl:attribute-set>
465 <xsl:attribute-set name="section.title.level3.properties">
466 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
467 <xsl:attribute name="font-size">
468 <xsl:value-of select="$body.font.master * 1.3"/>
469 <xsl:text>pt</xsl:text>
470 </xsl:attribute>
471 </xsl:attribute-set>
472 <xsl:attribute-set name="section.title.level4.properties">
473 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
474 <xsl:attribute name="font-size">
475 <xsl:value-of select="$body.font.master * 1.2"/>
476 <xsl:text>pt</xsl:text>
477 </xsl:attribute>
478 </xsl:attribute-set>
479 <xsl:attribute-set name="section.title.level5.properties">
480 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
481 <xsl:attribute name="font-size">
482 <xsl:value-of select="$body.font.master * 1.1"/>
483 <xsl:text>pt</xsl:text>
484 </xsl:attribute>
485 </xsl:attribute-set>
486 <xsl:attribute-set name="section.title.level6.properties">
487 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
488 <xsl:attribute name="font-size">
489 <xsl:value-of select="$body.font.master"/>
490 <xsl:text>pt</xsl:text>
491 </xsl:attribute>
492 </xsl:attribute-set>
493
494 <xsl:attribute-set name="section.title.properties">
495 <xsl:attribute name="font-family">
496 <xsl:value-of select="$title.font.family"/>
497 </xsl:attribute>
498 <xsl:attribute name="font-weight">bold</xsl:attribute>
499 <!-- font size is calculated dynamically by section.heading template -->
500 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
501 <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute>
502 <xsl:attribute name="space-before.optimum">2.0em</xsl:attribute>
503 <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute>
504 <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
505 <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
506 <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
507 <xsl:attribute name="text-align">left</xsl:attribute>
508 <xsl:attribute name="start-indent">
509 <xsl:choose>
510 <xsl:when test="ancestor::itemizedlist"><xsl:text>body-start()</xsl:text></xsl:when>
511 <xsl:otherwise><xsl:value-of select="$title.margin.left"/></xsl:otherwise>
512 </xsl:choose>
513 </xsl:attribute>
514 </xsl:attribute-set>
515
516 <xsl:attribute-set name="normal.para.spacing">
517 <xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
518 <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
519 <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
520 <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
521 <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
522 <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
523 </xsl:attribute-set>
524
525 <xsl:attribute-set name="book.titlepage.recto.style">
526 <xsl:attribute name="font-family">
527 <xsl:value-of select="$title.fontset"/>
528 </xsl:attribute>
529 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
530 <xsl:attribute name="font-weight">bold</xsl:attribute>
531 <xsl:attribute name="font-size">12pt</xsl:attribute>
532 <xsl:attribute name="text-align">center</xsl:attribute>
533 </xsl:attribute-set>
534
535 <xsl:attribute-set name="component.title.properties">
536 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
537 <xsl:attribute name="space-before.optimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
538 <xsl:attribute name="space-before.minimum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
539 <xsl:attribute name="space-before.maximum"><xsl:value-of select="concat($body.font.master, 'pt')"/></xsl:attribute>
540 <xsl:attribute name="hyphenate">false</xsl:attribute>
541 <xsl:attribute name="color">
542 <xsl:choose>
543 <xsl:when test="not(parent::chapter | parent::article | parent::appendix)"><xsl:value-of select="$title.color"/></xsl:when>
544 <xsl:otherwise>black</xsl:otherwise>
545 </xsl:choose>
546 </xsl:attribute>
547 <xsl:attribute name="text-align">
548 <xsl:choose>
549 <xsl:when test="((parent::article | parent::articleinfo) and not(ancestor::book) and not(self::bibliography)) or (parent::slides | parent::slidesinfo)">center</xsl:when>
550 <xsl:otherwise>left</xsl:otherwise>
551 </xsl:choose>
552 </xsl:attribute>
553 <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"/></xsl:attribute>
554 </xsl:attribute-set>
555
556 <xsl:attribute-set name="chapter.titlepage.recto.style">
557 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
558 <xsl:attribute name="background-color">white</xsl:attribute>
559 <xsl:attribute name="font-size">
560 <xsl:choose>
561 <xsl:when test="$l10n.gentext.language = 'ja-JP'">
562 <xsl:value-of select="$body.font.master * 1.7"/>
563 <xsl:text>pt</xsl:text>
564 </xsl:when>
565 <xsl:otherwise>
566 <xsl:text>24pt</xsl:text>
567 </xsl:otherwise>
568 </xsl:choose>
569 </xsl:attribute>
570 <xsl:attribute name="font-weight">bold</xsl:attribute>
571 <xsl:attribute name="text-align">left</xsl:attribute>
572 <!--xsl:attribute name="wrap-option">no-wrap</xsl:attribute-->
573 <xsl:attribute name="padding-left">1em</xsl:attribute>
574 <xsl:attribute name="padding-right">1em</xsl:attribute>
575 </xsl:attribute-set>
576
577 <xsl:attribute-set name="preface.titlepage.recto.style">
578 <xsl:attribute name="font-family">
579 <xsl:value-of select="$title.fontset"/>
580 </xsl:attribute>
581 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
582 <xsl:attribute name="font-size">24pt</xsl:attribute>
583 <xsl:attribute name="font-weight">bold</xsl:attribute>
584 </xsl:attribute-set>
585
586 <xsl:attribute-set name="part.titlepage.recto.style">
587 <xsl:attribute name="color"><xsl:value-of select="$title.color"/></xsl:attribute>
588 <xsl:attribute name="text-align">center</xsl:attribute>
589 </xsl:attribute-set>
590
591
592 <!--
593 From: fo/table.xsl
594 Reason: Table Header format
595 Version:1.72
596 -->
597 <xsl:template name="table.cell.block.properties">
598 <!-- highlight this entry? -->
599 <xsl:if test="ancestor::thead or ancestor::tfoot">
600 <xsl:attribute name="font-weight">bold</xsl:attribute>
601 <xsl:attribute name="background-color"><xsl:value-of select="$title.color"/></xsl:attribute>
602 <xsl:attribute name="color">white</xsl:attribute>
603 </xsl:if>
604 </xsl:template>
605
606 <!--
607 From: fo/table.xsl
608 Reason: Table Header format
609 Version:1.72
610 -->
611 <!-- customize this template to add row properties -->
612 <xsl:template name="table.row.properties">
613 <xsl:variable name="bgcolor">
614 <xsl:call-template name="dbfo-attribute">
615 <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
616 <xsl:with-param name="attribute" select="'bgcolor'"/>
617 </xsl:call-template>
618 </xsl:variable>
619 <xsl:if test="$bgcolor != ''">
620 <xsl:attribute name="background-color">
621 <xsl:value-of select="$bgcolor"/>
622 </xsl:attribute>
623 </xsl:if>
624 <xsl:if test="ancestor::thead or ancestor::tfoot">
625 <xsl:attribute name="background-color"><xsl:value-of select="$title.color"/></xsl:attribute>
626 </xsl:if>
627 </xsl:template>
628
629 <!--
630 From: fo/titlepage.templates.xsl
631 Reason: Switch to using chapter.titlepage.recto.style
632 Version:1.72
633 -->
634 <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
635 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
636 <xsl:call-template name="component.title.nomarkup">
637 <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
638 </xsl:call-template>
639 </fo:block>
640 </xsl:template>
641
642 <!--
643 From: fo/titlepage.templates.xsl
644 Reason: Remove font size and weight overrides
645 Version:1.72
646 -->
647 <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
648 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
649 <xsl:apply-templates>
650 <xsl:with-param name="allow-anchors" select="1"/>
651 </xsl:apply-templates>
652 </fo:block>
653 </xsl:template>
654
655 <!--
656 From: fo/titlepage.templates.xsl
657 Reason: Remove font family, size and weight overrides
658 Version:1.72
659 -->
660 <xsl:template name="preface.titlepage.recto">
661 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}">
662 <xsl:call-template name="component.title.nomarkup">
663 <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
664 </xsl:call-template></fo:block>
665 <xsl:choose>
666 <xsl:when test="prefaceinfo/subtitle">
667 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
668 </xsl:when>
669 <xsl:when test="docinfo/subtitle">
670 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
671 </xsl:when>
672 <xsl:when test="info/subtitle">
673 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
674 </xsl:when>
675 <xsl:when test="subtitle">
676 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
677 </xsl:when>
678 </xsl:choose>
679
680 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
681 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
682 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
683 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
684 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
685 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
686 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
687 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
688 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
689 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
690 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
691 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
692 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
693 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
694 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
695 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
696 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
697 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
698 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
699 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
700 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
701 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
702 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
703 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
704 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
705 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
706 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
707 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
708 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
709 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
710 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
711 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
712 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
713 </xsl:template>
714
715
716 <!--
717 Pick a non-latin font
718 seperate fonts with a comma for fall-back
719 Remember to add a comma to the end!
720 -->
721
722 <xsl:template name="pickfont-sans">
723 <xsl:variable name="font">
724 <!--xsl:call-template name="pickfont"/-->
725 <xsl:choose>
726 <xsl:when test="$l10n.gentext.language = 'ar-SA' or l10n.gentext.language = 'ar'">
727 <xsl:text>KacstBook,</xsl:text>
728 </xsl:when>
729 <xsl:when test="$l10n.gentext.language = 'ja-JP' or l10n.gentext.language = 'ja'">
730 <xsl:text>IPAPGothic,Sazanami Gothic,</xsl:text>
731 </xsl:when>
732 <xsl:when test="$l10n.gentext.language = 'ko-KR' or $l10n.gentext.language = 'ko'">
733 <xsl:text>Baekmuk Batang,</xsl:text>
734 </xsl:when>
735 <xsl:when test="$l10n.gentext.language = 'zh-CN'">
736 <xsl:text>ZYSong18030,AR PL UMing CN,</xsl:text>
737 </xsl:when>
738 <xsl:when test="$l10n.gentext.language = 'as-IN' or $l10n.gentext.language = 'as'">
739 <xsl:text>Lohit Assamese,Lohit Bengali,</xsl:text>
740 </xsl:when>
741 <xsl:when test="$l10n.gentext.language = 'bn-IN' or $l10n.gentext.language = 'bn'">
742 <xsl:text>Lohit Bengali,</xsl:text>
743 </xsl:when>
744 <xsl:when test="$l10n.gentext.language = 'ta-IN' or $l10n.gentext.language = 'ta'">
745 <xsl:text>Lohit Tamil,</xsl:text>
746 </xsl:when>
747 <xsl:when test="$l10n.gentext.language = 'pa-IN' or l10n.gentext.language = 'pa'">
748 <xsl:text>Lohit Punjabi,</xsl:text>
749 </xsl:when>
750 <xsl:when test="$l10n.gentext.language = 'hi-IN' or $l10n.gentext.language = 'hi'">
751 <xsl:text>Lohit Hindi,</xsl:text>
752 </xsl:when>
753 <xsl:when test="$l10n.gentext.language = 'mr-IN' or $l10n.gentext.language = 'mr'">
754 <xsl:text>Lohit Devanagari,Lohit Marathi,Lohit Hindi,</xsl:text>
755 </xsl:when>
756 <xsl:when test="$l10n.gentext.language = 'gu-IN' or $l10n.gentext.language = 'gu'">
757 <xsl:text>Lohit Gujarati,</xsl:text>
758 </xsl:when>
759 <xsl:when test="$l10n.gentext.language = 'zh-TW'">
760 <xsl:text>AR PL ShanHeiSun Uni,AR PL UMing TW,</xsl:text>
761 </xsl:when>
762 <xsl:when test="$l10n.gentext.language = 'kn-IN' or $l10n.gentext.language = 'kn'">
763 <xsl:text>Lohit Kannada,</xsl:text>
764 </xsl:when>
765 <xsl:when test="$l10n.gentext.language = 'ml-IN' or $l10n.gentext.language = 'ml'">
766 <xsl:text>Meera,Lohit Malayalam,</xsl:text>
767 </xsl:when>
768 <xsl:when test="$l10n.gentext.language = 'or-IN' or $l10n.gentext.language = 'or'">
769 <xsl:text>Lohit Oriya,</xsl:text>
770 </xsl:when>
771 <xsl:when test="$l10n.gentext.language = 'te-IN' or $l10n.gentext.language = 'te'">
772 <xsl:text>Lohit Telugu,</xsl:text>
773 </xsl:when>
774 <xsl:when test="$l10n.gentext.language = 'si-LK' or $l10n.gentext.language = 'si'">
775 <xsl:text>LKLUG,</xsl:text>
776 </xsl:when>
777 <xsl:when test="$l10n.gentext.language = 'fa-IR' or l10n.gentext.language = 'fa'">
778 <xsl:text>KacstFarsi,</xsl:text>
779 </xsl:when>
780 <xsl:when test="$l10n.gentext.language = 'he-IL' or l10n.gentext.language = 'he'">
781 <xsl:text>David CLM,</xsl:text>
782 </xsl:when>
783 <xsl:when test="$l10n.gentext.language = 'th-TH' or l10n.gentext.language = 'th'">
784 <xsl:text>Garuda,</xsl:text>
785 </xsl:when>
786 </xsl:choose>
787 </xsl:variable>
788
789 <xsl:copy-of select="$font"/><xsl:text>Liberation Sans,sans-serif</xsl:text>
790
791 </xsl:template>
792
793 <xsl:template name="pickfont-mono">
794 <xsl:variable name="font">
795 <!--xsl:call-template name="pickfont"/-->
796 <xsl:choose>
797 <xsl:when test="$l10n.gentext.language = 'ar-SA' or l10n.gentext.language = 'ar'">
798 <xsl:text>KacstScreen,</xsl:text>
799 </xsl:when>
800 <xsl:when test="$l10n.gentext.language = 'ja-JP' or l10n.gentext.language = 'ja'">
801 <xsl:text>IPAGothic,Sazanami Gothic,</xsl:text>
802 </xsl:when>
803 <xsl:when test="$l10n.gentext.language = 'ko-KR' or $l10n.gentext.language = 'ko'">
804 <xsl:text>Baekmuk Batang,</xsl:text>
805 </xsl:when>
806 <xsl:when test="$l10n.gentext.language = 'zh-CN'">
807 <xsl:text>ZYSong18030,AR PL UMing CN,</xsl:text>
808 </xsl:when>
809 <xsl:when test="$l10n.gentext.language = 'as-IN' or $l10n.gentext.language = 'as'">
810 <xsl:text>Lohit Assamese,Lohit Bengali,</xsl:text>
811 </xsl:when>
812 <xsl:when test="$l10n.gentext.language = 'bn-IN' or $l10n.gentext.language = 'bn'">
813 <xsl:text>Lohit Bengali,</xsl:text>
814 </xsl:when>
815 <xsl:when test="$l10n.gentext.language = 'ta-IN' or $l10n.gentext.language = 'ta'">
816 <xsl:text>Lohit Tamil,</xsl:text>
817 </xsl:when>
818 <xsl:when test="$l10n.gentext.language = 'pa-IN' or l10n.gentext.language = 'pa'">
819 <xsl:text>Lohit Punjabi,</xsl:text>
820 </xsl:when>
821 <xsl:when test="$l10n.gentext.language = 'hi-IN' or $l10n.gentext.language = 'hi'">
822 <xsl:text>Lohit Hindi,</xsl:text>
823 </xsl:when>
824 <xsl:when test="$l10n.gentext.language = 'mr-IN' or $l10n.gentext.language = 'mr'">
825 <xsl:text>Lohit Devanagari,Lohit Marathi,Lohit Hindi,</xsl:text>
826 </xsl:when>
827 <xsl:when test="$l10n.gentext.language = 'gu-IN' or $l10n.gentext.language = 'gu'">
828 <xsl:text>Lohit Gujarati,</xsl:text>
829 </xsl:when>
830 <xsl:when test="$l10n.gentext.language = 'zh-TW'">
831 <xsl:text>AR PL ShanHeiSun Uni,AR PL UMing TW,</xsl:text>
832 </xsl:when>
833 <xsl:when test="$l10n.gentext.language = 'kn-IN' or $l10n.gentext.language = 'kn'">
834 <xsl:text>Lohit Kannada,</xsl:text>
835 </xsl:when>
836 <xsl:when test="$l10n.gentext.language = 'ml-IN' or $l10n.gentext.language = 'ml'">
837 <xsl:text>Meera,Lohit Malayalam,</xsl:text>
838 </xsl:when>
839 <xsl:when test="$l10n.gentext.language = 'or-IN' or $l10n.gentext.language = 'or'">
840 <xsl:text>Lohit Oriya,</xsl:text>
841 </xsl:when>
842 <xsl:when test="$l10n.gentext.language = 'te-IN' or $l10n.gentext.language = 'te'">
843 <xsl:text>Lohit Telugu,</xsl:text>
844 </xsl:when>
845 <xsl:when test="$l10n.gentext.language = 'si-LK' or $l10n.gentext.language = 'si'">
846 <xsl:text>LKLUG,</xsl:text>
847 </xsl:when>
848 <xsl:when test="$l10n.gentext.language = 'fa-IR' or l10n.gentext.language = 'fa'">
849 <xsl:text>KacstFarsi,</xsl:text>
850 </xsl:when>
851 <xsl:when test="$l10n.gentext.language = 'he-IL' or l10n.gentext.language = 'he'">
852 <xsl:text>Miriam Mono CLM,</xsl:text>
853 </xsl:when>
854 <xsl:when test="$l10n.gentext.language = 'th-TH' or l10n.gentext.language = 'th'">
855 <xsl:text>Garuda,</xsl:text>
856 </xsl:when>
857 </xsl:choose>
858 </xsl:variable>
859
860 <xsl:copy-of select="$font"/><xsl:text>Liberation Mono,monospace</xsl:text>
861
862 </xsl:template>
863
864 <!--xsl:param name="symbol.font.family">
865 <xsl:choose>
866 <xsl:when test="$l10n.gentext.language = 'ja-JP'">
867 <xsl:text>Symbol,ZapfDingbats</xsl:text>
868 </xsl:when>
869 <xsl:otherwise>
870 <xsl:text>Symbol,ZapfDingbats</xsl:text>
871 </xsl:otherwise>
872 </xsl:choose>
873 </xsl:param-->
874
875 <xsl:param name="title.font.family">
876 <xsl:call-template name="pickfont-sans"/>
877 </xsl:param>
878
879 <xsl:param name="body.font.family">
880 <xsl:call-template name="pickfont-sans"/>
881 </xsl:param>
882
883 <xsl:param name="monospace.font.family">
884 <xsl:call-template name="pickfont-mono"/>
885 </xsl:param>
886
887 <xsl:param name="sans.font.family">
888 <xsl:call-template name="pickfont-sans"/>
889 </xsl:param>
890
891 <!--xsl:param name="callout.unicode.font">
892 <xsl:call-template name="pickfont-sans"/>
893 </xsl:param-->
894
895 <!--
896 From: fo/verbatim.xsl
897 Reason: Left align address
898 Version: 1.72
899 -->
900
901 <xsl:template match="address">
902 <xsl:param name="suppress-numbers" select="'0'"/>
903
904 <xsl:variable name="content">
905 <xsl:choose>
906 <xsl:when test="$suppress-numbers = '0'
907 and @linenumbering = 'numbered'
908 and $use.extensions != '0'
909 and $linenumbering.extension != '0'">
910 <xsl:call-template name="number.rtf.lines">
911 <xsl:with-param name="rtf">
912 <xsl:apply-templates/>
913 </xsl:with-param>
914 </xsl:call-template>
915 </xsl:when>
916 <xsl:otherwise>
917 <xsl:apply-templates/>
918 </xsl:otherwise>
919 </xsl:choose>
920 </xsl:variable>
921
922 <fo:block wrap-option='no-wrap'
923 white-space-collapse='false'
924 white-space-treatment='preserve'
925 linefeed-treatment="preserve"
926 text-align="start"
927 xsl:use-attribute-sets="verbatim.properties">
928 <xsl:copy-of select="$content"/>
929 </fo:block>
930 </xsl:template>
931
932 <xsl:template name="component.title.nomarkup">
933 <xsl:param name="node" select="."/>
934
935 <xsl:variable name="id">
936 <xsl:call-template name="object.id">
937 <xsl:with-param name="object" select="$node"/>
938 </xsl:call-template>
939 </xsl:variable>
940
941 <xsl:variable name="title">
942 <xsl:apply-templates select="$node" mode="object.title.markup">
943 <xsl:with-param name="allow-anchors" select="1"/>
944 </xsl:apply-templates>
945 </xsl:variable>
946 <xsl:copy-of select="$title"/>
947 </xsl:template>
948
949 <xsl:attribute-set name="header.content.properties">
950 <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
951 <xsl:attribute name="font-family">
952 <xsl:value-of select="$body.fontset"/>
953 </xsl:attribute>
954 <xsl:attribute name="margin-left">
955 <xsl:value-of select="$title.margin.left"/>
956 </xsl:attribute>
957 </xsl:attribute-set>
958
959 <!--
960 From: fo/pagesetup.xsl
961 Reason: Custom Header
962 Version: 1.72
963 -->
964 <xsl:template name="header.content">
965 <xsl:param name="pageclass" select="''"/>
966 <xsl:param name="sequence" select="''"/>
967 <xsl:param name="position" select="''"/>
968 <xsl:param name="gentext-key" select="''"/>
969 <xsl:param name="title-limit" select="'30'"/>
970 <!--
971 <fo:block>
972 <xsl:value-of select="$pageclass"/>
973 <xsl:text>, </xsl:text>
974 <xsl:value-of select="$sequence"/>
975 <xsl:text>, </xsl:text>
976 <xsl:value-of select="$position"/>
977 <xsl:text>, </xsl:text>
978 <xsl:value-of select="$gentext-key"/>
979 </fo:block>
980 body, blank, left, chapter
981 -->
982 <!-- sequence can be odd, even, first, blank -->
983 <!-- position can be left, center, right -->
984 <xsl:choose>
985 <!--xsl:when test="($sequence='blank' and $position='left' and $gentext-key='chapter')">
986 <xsl:variable name="text">
987 <xsl:call-template name="component.title.nomarkup"/>
988 </xsl:variable>
989 <fo:inline keep-together.within-line="always" font-weight="bold">
990 <xsl:choose>
991 <xsl:when test="string-length($text) &gt; '33'">
992 <xsl:value-of select="concat(substring($text, 0, $title-limit), '...')"/>
993 </xsl:when>
994 <xsl:otherwise>
995 <xsl:value-of select="$text"/>
996 </xsl:otherwise>
997 </xsl:choose>
998 </fo:inline>
999 </xsl:when-->
1000 <xsl:when test="$confidential = 1 and (($sequence='odd' and $position='left') or
1001 ($sequence='even' and $position='right') or
1002 ($sequence='blank' and $position='right') or
1003 ($sequence='first' and $position='left') )">
1004 <fo:inline keep-together.within-line="always" font-weight="bold">
1005 <xsl:value-of select="$confidential.text"/>
1006 </fo:inline>
1007 </xsl:when>
1008 <xsl:when test="$sequence = 'blank'">
1009 <!-- nothing -->
1010 </xsl:when>
1011 <!-- Extracting 'Chapter' + Chapter Number from the full Chapter title, with a dirty, dirty hack -->
1012 <xsl:when test="($sequence='first' and $position='center' and $gentext-key='chapter')">
1013 <xsl:variable name="text">
1014 <xsl:call-template name="component.title.nomarkup"/>
1015 </xsl:variable>
1016 <xsl:variable name="chapt">
1017 <xsl:value-of select="substring-before($text, '&#xA0;')"/>
1018 </xsl:variable>
1019 <xsl:variable name="remainder">
1020 <xsl:value-of select="substring-after($text, '&#xA0;')"/>
1021 </xsl:variable>
1022 <xsl:variable name="chapt-num">
1023 <xsl:value-of select="substring-before($remainder, '&#xA0;')"/>
1024 </xsl:variable>
1025 <xsl:variable name="text1">
1026 <xsl:value-of select="concat($chapt, '&#xA0;', $chapt-num)"/>
1027 </xsl:variable>
1028 <fo:inline keep-together.within-line="always" font-weight="bold">
1029 <xsl:value-of select="$text1"/>
1030 </fo:inline>
1031 </xsl:when>
1032 <!--xsl:when test="($sequence='odd' or $sequence='even') and $position='center'"-->
1033 <xsl:when test="($sequence='even' and $position='left')">
1034 <!--xsl:if test="$pageclass != 'titlepage'"-->
1035 <fo:inline keep-together.within-line="always" font-weight="bold">
1036 <xsl:call-template name="component.title.nomarkup"/>
1037 </fo:inline>
1038 <!--xsl:if-->
1039 </xsl:when>
1040 <xsl:when test="($sequence='odd' and $position='right')">
1041 <!--xsl:if test="$pageclass != 'titlepage'"-->
1042 <fo:inline keep-together.within-line="always"><fo:retrieve-marker retrieve-class-name="section.head.marker" retrieve-position="first-including-carryover" retrieve-boundary="page-sequence"/></fo:inline>
1043 <!--/xsl:if-->
1044 </xsl:when>
1045 <xsl:when test="$position='left'">
1046 <!-- Same for odd, even, empty, and blank sequences -->
1047 <xsl:call-template name="draft.text"/>
1048 </xsl:when>
1049 <xsl:when test="$position='center'">
1050 <!-- nothing for empty and blank sequences -->
1051 </xsl:when>
1052 <xsl:when test="$position='right'">
1053 <!-- Same for odd, even, empty, and blank sequences -->
1054 <xsl:call-template name="draft.text"/>
1055 </xsl:when>
1056 <xsl:when test="$sequence = 'first'">
1057 <!-- nothing for first pages -->
1058 </xsl:when>
1059 <xsl:when test="$sequence = 'blank'">
1060 <!-- nothing for blank pages -->
1061 </xsl:when>
1062 </xsl:choose>
1063 </xsl:template>
1064
1065 <!--
1066 From: fo/pagesetup.xsl
1067 Reason: Override colour
1068 Version: 1.72
1069 -->
1070 <xsl:template name="head.sep.rule">
1071 <xsl:param name="pageclass"/>
1072 <xsl:param name="sequence"/>
1073 <xsl:param name="gentext-key"/>
1074
1075 <xsl:if test="$header.rule != 0">
1076 <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
1077 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
1078 <xsl:attribute name="border-bottom-color">black</xsl:attribute>
1079 </xsl:if>
1080 </xsl:template>
1081
1082 <!--
1083 From: fo/pagesetup.xsl
1084 Reason: Override colour
1085 Version: 1.72
1086 -->
1087 <xsl:template name="foot.sep.rule">
1088 <xsl:param name="pageclass"/>
1089 <xsl:param name="sequence"/>
1090 <xsl:param name="gentext-key"/>
1091
1092 <xsl:if test="$footer.rule != 0">
1093 <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
1094 <xsl:attribute name="border-top-style">solid</xsl:attribute>
1095 <xsl:attribute name="border-top-color">black</xsl:attribute>
1096 </xsl:if>
1097 </xsl:template>
1098
1099 <xsl:param name="footnote.font.size">
1100 <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text>
1101 </xsl:param>
1102 <xsl:param name="footnote.number.format" select="'1'"/>
1103 <xsl:param name="footnote.number.symbols" select="''"/>
1104 <xsl:attribute-set name="footnote.mark.properties">
1105 <xsl:attribute name="font-size">66.66%</xsl:attribute>
1106 <xsl:attribute name="font-weight">normal</xsl:attribute>
1107 <xsl:attribute name="font-style">normal</xsl:attribute>
1108 <xsl:attribute name="margin-left">0.25em</xsl:attribute>
1109 </xsl:attribute-set>
1110 <xsl:attribute-set name="footnote.properties">
1111 <xsl:attribute name="padding-top">48pt</xsl:attribute>
1112 <xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"/></xsl:attribute>
1113 <xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"/></xsl:attribute>
1114 <xsl:attribute name="color">black</xsl:attribute>
1115 <xsl:attribute name="font-weight">normal</xsl:attribute>
1116 <xsl:attribute name="font-style">normal</xsl:attribute>
1117 <xsl:attribute name="text-align"><xsl:value-of select="$alignment"/></xsl:attribute>
1118 <xsl:attribute name="start-indent">0pt</xsl:attribute>
1119 </xsl:attribute-set>
1120 <xsl:attribute-set name="footnote.sep.leader.properties">
1121 <xsl:attribute name="color">black</xsl:attribute>
1122 <xsl:attribute name="leader-pattern">rule</xsl:attribute>
1123 <xsl:attribute name="leader-length">1in</xsl:attribute>
1124 </xsl:attribute-set>
1125
1126 <xsl:template match="author" mode="tablerow.titlepage.mode">
1127 <fo:table-row>
1128 <fo:table-cell>
1129 <fo:block>
1130 <xsl:call-template name="gentext">
1131 <xsl:with-param name="key" select="'Author'"/>
1132 </xsl:call-template>
1133 </fo:block>
1134 </fo:table-cell>
1135 <fo:table-cell>
1136 <fo:block>
1137 <xsl:call-template name="person.name">
1138 <xsl:with-param name="node" select="."/>
1139 </xsl:call-template>
1140 </fo:block>
1141 </fo:table-cell>
1142 <fo:table-cell>
1143 <fo:block>
1144 <xsl:apply-templates select="email"/>
1145 </fo:block>
1146 </fo:table-cell>
1147 </fo:table-row>
1148 </xsl:template>
1149
1150 <xsl:template match="author" mode="titlepage.mode">
1151 <fo:block>
1152 <xsl:call-template name="person.name">
1153 <xsl:with-param name="node" select="."/>
1154 </xsl:call-template>
1155 </fo:block>
1156 </xsl:template>
1157
1158 <xsl:param name="editedby.enabled">0</xsl:param>
1159
1160 <xsl:template match="editor" mode="tablerow.titlepage.mode">
1161 <fo:table-row>
1162 <fo:table-cell>
1163 <fo:block>
1164 <xsl:call-template name="gentext">
1165 <xsl:with-param name="key" select="'Editor'"/>
1166 </xsl:call-template>
1167 </fo:block>
1168 </fo:table-cell>
1169 <fo:table-cell>
1170 <fo:block>
1171 <xsl:call-template name="person.name">
1172 <xsl:with-param name="node" select="."/>
1173 </xsl:call-template>
1174 </fo:block>
1175 </fo:table-cell>
1176 <fo:table-cell>
1177 <fo:block>
1178 <xsl:apply-templates select="email"/>
1179 </fo:block>
1180 </fo:table-cell>
1181 </fo:table-row>
1182 </xsl:template>
1183
1184 <xsl:template match="corpauthor" mode="tablerow.titlepage.mode">
1185 <fo:table-row>
1186 <fo:table-cell>
1187 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
1188 <xsl:apply-templates select="."/>
1189 </fo:block>
1190 </fo:table-cell>
1191 </fo:table-row>
1192 </xsl:template>
1193
1194 <xsl:template match="othercredit" mode="tablerow.titlepage.mode">
1195 <fo:table-row>
1196 <fo:table-cell>
1197 <fo:block>
1198 <xsl:if test="@class">
1199 <xsl:call-template name="gentext">
1200 <xsl:with-param name="key" select="@class"/>
1201 </xsl:call-template>
1202 </xsl:if>
1203 </fo:block>
1204 </fo:table-cell>
1205 <fo:table-cell>
1206 <fo:block>
1207 <xsl:call-template name="person.name">
1208 <xsl:with-param name="node" select="."/>
1209 </xsl:call-template>
1210 </fo:block>
1211 </fo:table-cell>
1212 <fo:table-cell>
1213 <fo:block>
1214 <xsl:apply-templates select="email"/>
1215 </fo:block>
1216 </fo:table-cell>
1217 </fo:table-row>
1218 </xsl:template>
1219
1220 <!--
1221 From: fo/titlepage.xsl
1222 Reason:
1223 Version:1.72
1224 -->
1225 <xsl:template name="verso.authorgroup">
1226 <fo:table table-layout="fixed" width="100%">
1227 <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
1228 <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
1229 <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
1230 <fo:table-body>
1231 <xsl:apply-templates select="author" mode="tablerow.titlepage.mode"/>
1232 <xsl:apply-templates select="editor" mode="tablerow.titlepage.mode"/>
1233 <xsl:apply-templates select="othercredit" mode="tablerow.titlepage.mode"/>
1234 <xsl:apply-templates select="corpauthor" mode="tablerow.titlepage.mode"/>
1235 </fo:table-body>
1236 </fo:table>
1237 </xsl:template>
1238
1239 <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
1240 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="34pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
1241 <xsl:call-template name="division.title">
1242 <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
1243 </xsl:call-template>
1244 </fo:block>
1245 </xsl:template>
1246
1247 <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
1248 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="14pt" space-before="30pt" font-family="{$title.fontset}">
1249 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
1250 </fo:block>
1251 </xsl:template>
1252
1253 <xsl:template match="issuenum" mode="book.titlepage.recto.auto.mode">
1254 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="34pt" space-before="30pt" font-family="{$title.fontset}">
1255 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
1256 </fo:block>
1257 </xsl:template>
1258
1259 <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
1260 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" font-size="14pt" space-before="15.552pt">
1261 <xsl:call-template name="person.name">
1262 <xsl:with-param name="node" select="."/>
1263 </xsl:call-template>
1264 </fo:block>
1265 </xsl:template>
1266
1267 <xsl:template name="book.titlepage.recto">
1268 <xsl:if test="$confidential = 1">
1269 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" margin-left="{$title.margin.left}">
1270 <fo:inline keep-together.within-line="always">
1271 <xsl:value-of select="$confidential.text"/>
1272 </fo:inline>
1273 </fo:block>
1274 </xsl:if>
1275 <xsl:choose>
1276 <xsl:when test="bookinfo/productname">
1277 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="34pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
1278 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/productname"/>
1279 <xsl:text> </xsl:text>
1280 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/productnumber"/>
1281 </fo:block>
1282 </xsl:when>
1283 </xsl:choose>
1284 <xsl:choose>
1285 <xsl:when test="bookinfo/title">
1286 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
1287 </xsl:when>
1288 <xsl:when test="info/title">
1289 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
1290 </xsl:when>
1291 <xsl:when test="title">
1292 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
1293 </xsl:when>
1294 </xsl:choose>
1295
1296 <xsl:choose>
1297 <xsl:when test="bookinfo/subtitle">
1298 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
1299 </xsl:when>
1300 <xsl:when test="info/subtitle">
1301 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
1302 </xsl:when>
1303 <xsl:when test="subtitle">
1304 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
1305 </xsl:when>
1306 </xsl:choose>
1307
1308 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
1309 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
1310
1311 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup/author"/>
1312 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup/author"/>
1313 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
1314 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
1315
1316 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" color="black">
1317 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/invpartnumber"/>
1318 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/invpartnumber"/>
1319 </fo:block>
1320 <xsl:choose>
1321 <xsl:when test="bookinfo/pubdate|info/pubdate">
1322 <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" color="black">
1323 <xsl:call-template name="gentext">
1324 <xsl:with-param name="key" select="'pubdate'"/>
1325 </xsl:call-template>
1326 <xsl:text>: </xsl:text>
1327 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
1328 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
1329 </fo:block>
1330 </xsl:when>
1331 </xsl:choose>
1332 </xsl:template>
1333
1334 <xsl:template name="book.titlepage.verso">
1335 <xsl:choose>
1336 <xsl:when test="bookinfo/abstract">
1337 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
1338 </xsl:when>
1339 <xsl:when test="info/abstract">
1340 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
1341 </xsl:when>
1342 </xsl:choose>
1343
1344 </xsl:template>
1345
1346 <xsl:template mode="book.titlepage.recto.auto.mode" match="abstract">
1347 <fo:block xsl:use-attribute-sets="abstract.properties">
1348 <xsl:call-template name="anchor"/>
1349 <xsl:apply-templates/>
1350 </fo:block>
1351 </xsl:template>
1352
1353 <xsl:template mode="book.titlepage.recto.auto.mode" match="abstract/title|abstract/info/title">
1354 <fo:block xsl:use-attribute-sets="abstract.title.properties">
1355 <xsl:apply-templates/>
1356 </fo:block>
1357 </xsl:template>
1358
1359 <xsl:template name="book.titlepage3.recto">
1360 <xsl:choose>
1361 <xsl:when test="bookinfo/title">
1362 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
1363 </xsl:when>
1364 <xsl:when test="info/title">
1365 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
1366 </xsl:when>
1367 <xsl:when test="title">
1368 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
1369 </xsl:when>
1370 </xsl:choose>
1371
1372
1373 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
1374 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
1375 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
1376 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
1377 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
1378 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
1379 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
1380 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
1381 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
1382 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
1383 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/publisher"/>
1384 <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/publisher"/>
1385 </xsl:template>
1386
1387 <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
1388 </xsl:template>
1389
1390 <xsl:template name="book.titlepage.before.recto">
1391 </xsl:template>
1392
1393 <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
1394 </xsl:template>
1395
1396 <xsl:template name="book.titlepage">
1397 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
1398 <xsl:call-template name="book.titlepage.before.recto"/>
1399 <fo:block><xsl:call-template name="book.titlepage.recto"/></fo:block>
1400 <xsl:call-template name="book.titlepage.separator"/>
1401 <!--fo:block><xsl:call-template name="book.titlepage.verso"/></fo:block>
1402 <xsl:call-template name="book.titlepage.separator"/>
1403 <fo:block><xsl:call-template name="book.titlepage3.recto"/></fo:block-->
1404 <fo:block><xsl:call-template name="book.titlepage3.recto"/></fo:block>
1405 <fo:block><xsl:call-template name="book.titlepage.verso"/></fo:block>
1406 <xsl:call-template name="book.titlepage.separator"/>
1407 </fo:block>
1408 </xsl:template>
1409
1410 <!--
1411 From: fo/qandaset.xsl
1412 Reason: Id in list-item-label causes fop crash
1413 Version:1.72
1414 -->
1415
1416 <xsl:template match="question">
1417 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
1418
1419 <xsl:variable name="entry.id">
1420 <xsl:call-template name="object.id">
1421 <xsl:with-param name="object" select="parent::*"/>
1422 </xsl:call-template>
1423 </xsl:variable>
1424
1425 <xsl:variable name="deflabel">
1426 <xsl:choose>
1427 <xsl:when test="ancestor-or-self::*[@defaultlabel]">
1428 <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
1429 /@defaultlabel"/>
1430 </xsl:when>
1431 <xsl:otherwise>
1432 <xsl:value-of select="$qanda.defaultlabel"/>
1433 </xsl:otherwise>
1434 </xsl:choose>
1435 </xsl:variable>
1436
1437 <fo:list-item id="{$entry.id}" xsl:use-attribute-sets="dash.list.item.spacing">
1438 <fo:list-item-label end-indent="label-end()">
1439 <xsl:choose>
1440 <xsl:when test="$deflabel = 'none'">
1441 <fo:block/>
1442 </xsl:when>
1443 <xsl:otherwise>
1444 <fo:block font-weight="bold">
1445 <xsl:apply-templates select="." mode="label.markup"/>
1446 <xsl:if test="$deflabel = 'number' and not(label)">
1447 <xsl:apply-templates select="." mode="intralabel.punctuation"/>
1448 </xsl:if>
1449 </fo:block>
1450 </xsl:otherwise>
1451 </xsl:choose>
1452 </fo:list-item-label>
1453 <fo:list-item-body start-indent="body-start()">
1454 <xsl:choose>
1455 <xsl:when test="$deflabel = 'none'">
1456 <fo:block font-weight="bold">
1457 <xsl:apply-templates select="*[local-name(.)!='label']"/>
1458 </fo:block>
1459 </xsl:when>
1460 <xsl:otherwise>
1461 <xsl:apply-templates select="*[local-name(.)!='label']"/>
1462 </xsl:otherwise>
1463 </xsl:choose>
1464 <!-- Uncomment this line to get revhistory output in the question -->
1465 <!-- <xsl:apply-templates select="preceding-sibling::revhistory"/> -->
1466 </fo:list-item-body>
1467 </fo:list-item>
1468 </xsl:template>
1469
1470 <!--
1471 From: fo/qandaset.xsl
1472 Reason: Id in list-item-label causes fop crash
1473 Version:1.72
1474 -->
1475 <xsl:template match="answer">
1476 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
1477 <xsl:variable name="entry.id">
1478 <xsl:call-template name="object.id">
1479 <xsl:with-param name="object" select="parent::*"/>
1480 </xsl:call-template>
1481 </xsl:variable>
1482
1483 <xsl:variable name="deflabel">
1484 <xsl:choose>
1485 <xsl:when test="ancestor-or-self::*[@defaultlabel]">
1486 <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
1487 /@defaultlabel"/>
1488 </xsl:when>
1489 <xsl:otherwise>
1490 <xsl:value-of select="$qanda.defaultlabel"/>
1491 </xsl:otherwise>
1492 </xsl:choose>
1493 </xsl:variable>
1494
1495 <fo:list-item xsl:use-attribute-sets="fat.list.item.spacing">
1496 <fo:list-item-label end-indent="label-end()">
1497 <xsl:choose>
1498 <xsl:when test="$deflabel = 'none'">
1499 <fo:block/>
1500 </xsl:when>
1501 <xsl:otherwise>
1502 <fo:block font-weight="bold">
1503 <xsl:variable name="answer.label">
1504 <xsl:apply-templates select="." mode="label.markup"/>
1505 </xsl:variable>
1506 <xsl:copy-of select="$answer.label"/>
1507 </fo:block>
1508 </xsl:otherwise>
1509 </xsl:choose>
1510 </fo:list-item-label>
1511 <fo:list-item-body start-indent="body-start()">
1512 <xsl:apply-templates select="*[local-name(.)!='label']"/>
1513 </fo:list-item-body>
1514 </fo:list-item>
1515 </xsl:template>
1516 <!--
1517 From: fo/block.xsl
1518 Reason: formal para needs to be block to appear as a title
1519 remove runinhead.default.title.end.punct
1520 Version:1.72
1521 -->
1522 <xsl:template match="formalpara/title|formalpara/info/title">
1523 <xsl:variable name="titleStr">
1524 <xsl:apply-templates/>
1525 </xsl:variable>
1526 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.title.properties section.title.level5.properties">
1527 <xsl:copy-of select="$titleStr"/>
1528 </fo:block>
1529 </xsl:template>
1530
1531 <!--
1532 From: fo/nline.xsl
1533 Reason: Italicise package name
1534 Version:1.72
1535 -->
1536 <xsl:template match="package|citetitle">
1537 <xsl:call-template name="inline.italicseq"/>
1538 </xsl:template>
1539
1540 <xsl:template match="command|filename|keycap|classname|literal|computeroutput|option|code">
1541 <xsl:call-template name="inline.boldmonoseq"/>
1542 </xsl:template>
1543
1544 <xsl:template match="replaceable">
1545 <xsl:call-template name="inline.italicseq"/>
1546 </xsl:template>
1547
1548 <!--
1549 From: fo/auttoc.xsl
1550 Reason: Bold chaps
1551 Version:1.72
1552 -->
1553
1554 <xsl:template name="toc.line">
1555 <xsl:param name="toc-context" select="NOTANODE"/>
1556
1557 <xsl:variable name="id">
1558 <xsl:call-template name="object.id"/>
1559 </xsl:variable>
1560
1561 <xsl:variable name="label">
1562 <xsl:apply-templates select="." mode="label.markup"/>
1563 </xsl:variable>
1564
1565 <fo:block xsl:use-attribute-sets="toc.line.properties"
1566 end-indent="{$toc.indent.width}pt"
1567 last-line-end-indent="-{$toc.indent.width}pt">
1568 <xsl:if test="local-name(.) = 'glossary' or local-name(.) = 'bibliography' or local-name(.) = 'preface' or local-name(.) = 'reference' or local-name(.) = 'chapter' or local-name(.) = 'article' or local-name(.) = 'appendix' or local-name(.) = 'index' ">
1569 <xsl:attribute name="space-before.minimum">6pt</xsl:attribute>
1570 <xsl:attribute name="space-before.optimum">6pt</xsl:attribute>
1571 <xsl:attribute name="space-before.maximum">8pt</xsl:attribute>
1572 <xsl:attribute name="font-weight">bold</xsl:attribute>
1573 <xsl:attribute name="text-align">left</xsl:attribute>
1574 </xsl:if>
1575 <xsl:if test="local-name(.) = 'part' ">
1576 <xsl:attribute name="space-before.minimum">18pt</xsl:attribute>
1577 <xsl:attribute name="space-before.optimum">18pt</xsl:attribute>
1578 <xsl:attribute name="space-before.maximum">24pt</xsl:attribute>
1579 <xsl:attribute name="font-weight">bold</xsl:attribute>
1580 <xsl:attribute name="text-align">left</xsl:attribute>
1581 </xsl:if>
1582 <fo:inline keep-with-next.within-line="always">
1583 <fo:basic-link internal-destination="{$id}">
1584 <!--xsl:message>
1585 <xsl:text>Local Name: </xsl:text>
1586 <xsl:value-of select="local-name(.)"/>
1587 </xsl:message-->
1588 <xsl:if test="$label != ''">
1589 <xsl:copy-of select="$label"/>
1590 <xsl:value-of select="$autotoc.label.separator"/>
1591 </xsl:if>
1592 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
1593 </fo:basic-link>
1594 </fo:inline>
1595 <fo:inline keep-together.within-line="always">
1596 <xsl:text> </xsl:text>
1597 <xsl:choose>
1598 <xsl:when test="local-name(.) = 'glossary' or local-name(.) = 'bibliography' or local-name(.) = 'preface' or local-name(.) = 'chapter' or local-name(.) = 'reference' or local-name(.) = 'part' or local-name(.) = 'article' or local-name(.) = 'appendix' or local-name(.) = 'index'">
1599 <fo:leader leader-pattern="use-content"
1600 leader-pattern-width="3pt"
1601 leader-alignment="reference-area"
1602 keep-with-next.within-line="always" white-space-collapse='false'>&#xa0;</fo:leader>
1603 </xsl:when>
1604 <xsl:otherwise>
1605 <fo:leader leader-pattern="dots"
1606 leader-pattern-width="3pt"
1607 leader-alignment="reference-area"
1608 keep-with-next.within-line="always"/>
1609 </xsl:otherwise>
1610 </xsl:choose>
1611 <xsl:text> </xsl:text>
1612 <fo:basic-link internal-destination="{$id}">
1613 <xsl:attribute name="text-align">right</xsl:attribute>
1614 <fo:page-number-citation ref-id="{$id}"/>
1615 </fo:basic-link>
1616 </fo:inline>
1617 </fo:block>
1618 </xsl:template>
1619
1620 <!--
1621 From: fo/index.xsl
1622 Reason: remove white space for indexterm anchors
1623 Version:1.72
1624 -->
1625 <xsl:template match="indexterm" name="indexterm">
1626 <!-- Temporal workaround for bug in AXF -->
1627 <xsl:variable name="wrapper.name">
1628 <xsl:choose>
1629 <xsl:when test="$axf.extensions != 0">
1630 <xsl:call-template name="inline.or.block"/>
1631 </xsl:when>
1632 <xsl:otherwise>fo:wrapper</xsl:otherwise>
1633 </xsl:choose>
1634 </xsl:variable>
1635
1636 <xsl:element name="{$wrapper.name}" xsl:use-attribute-sets="hidden.properties">
1637 <xsl:attribute name="id">
1638 <xsl:call-template name="object.id"/>
1639 </xsl:attribute>
1640 <xsl:choose>
1641 <xsl:when test="$xep.extensions != 0">
1642 <xsl:attribute name="rx:key">
1643 <xsl:value-of select="&primary;"/>
1644 <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
1645 <xsl:if test="secondary">
1646 <xsl:text>, </xsl:text>
1647 <xsl:value-of select="&secondary;"/>
1648 </xsl:if>
1649 <xsl:if test="tertiary">
1650 <xsl:text>, </xsl:text>
1651 <xsl:value-of select="&tertiary;"/>
1652 </xsl:if>
1653 </xsl:attribute>
1654 </xsl:when>
1655 <xsl:otherwise>
1656 <xsl:comment>
1657 <xsl:call-template name="comment-escape-string">
1658 <xsl:with-param name="string">
1659 <xsl:value-of select="primary"/>
1660 <xsl:if test="secondary">
1661 <xsl:text>, </xsl:text>
1662 <xsl:value-of select="secondary"/>
1663 </xsl:if>
1664 <xsl:if test="tertiary">
1665 <xsl:text>, </xsl:text>
1666 <xsl:value-of select="tertiary"/>
1667 </xsl:if>
1668 </xsl:with-param>
1669 </xsl:call-template>
1670 </xsl:comment>
1671 </xsl:otherwise>
1672 </xsl:choose>
1673 </xsl:element>
1674 </xsl:template>
1675
1676 <xsl:template name="formal.object.heading">
1677 <xsl:param name="object" select="."/>
1678 <xsl:param name="placement" select="'before'"/>
1679
1680 <xsl:choose>
1681 <xsl:when test="$placement = 'before'">
1682 <fo:block xsl:use-attribute-sets="above.title.properties">
1683 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
1684 <xsl:apply-templates select="$object" mode="object.title.markup">
1685 <xsl:with-param name="allow-anchors" select="1"/>
1686 </xsl:apply-templates>
1687 </fo:block>
1688 </xsl:when>
1689 <xsl:otherwise>
1690 <fo:block xsl:use-attribute-sets="below.title.properties">
1691 <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
1692 <xsl:apply-templates select="$object" mode="object.title.markup">
1693 <xsl:with-param name="allow-anchors" select="1"/>
1694 </xsl:apply-templates>
1695 </fo:block>
1696 </xsl:otherwise>
1697 </xsl:choose>
1698 </xsl:template>
1699
1700 <xsl:template match="segtitle" mode="seglist-table">
1701 <fo:table-cell>
1702 <fo:block xsl:use-attribute-sets="above.title.properties" font-weight="bold">
1703 <xsl:apply-templates/>
1704 </fo:block>
1705 </fo:table-cell>
1706 </xsl:template>
1707
1708 <xsl:template match="seglistitem" mode="seglist-table">
1709 <xsl:variable name="id">
1710 <xsl:call-template name="object.id"/>
1711 </xsl:variable>
1712 <fo:table-row id="{$id}">
1713 <xsl:apply-templates mode="seglist-table"/>
1714 </fo:table-row>
1715 </xsl:template>
1716
1717 <xsl:template match="seg" mode="seglist-table">
1718 <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
1719 <fo:block>
1720 <xsl:apply-templates/>
1721 </fo:block>
1722 </fo:table-cell>
1723 </xsl:template>
1724
1725 <xsl:template name="process.image">
1726 <!-- When this template is called, the current node should be -->
1727 <!-- a graphic, inlinegraphic, imagedata, or videodata. All -->
1728 <!-- those elements have the same set of attributes, so we can -->
1729 <!-- handle them all in one place. -->
1730
1731 <xsl:variable name="scalefit">
1732 <xsl:choose>
1733 <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
1734 <xsl:when test="@contentwidth">0</xsl:when>
1735 <xsl:when test="@contentdepth and
1736 @contentdepth != '100%'">0</xsl:when>
1737 <xsl:when test="@scale">0</xsl:when>
1738 <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when>
1739 <xsl:when test="@width or @depth">1</xsl:when>
1740 <xsl:otherwise>0</xsl:otherwise>
1741 </xsl:choose>
1742 </xsl:variable>
1743
1744 <xsl:variable name="scale">
1745 <xsl:choose>
1746 <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
1747 <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when>
1748 <xsl:when test="@scale">
1749 <xsl:value-of select="@scale div 100.0"/>
1750 </xsl:when>
1751 <xsl:otherwise>1.0</xsl:otherwise>
1752 </xsl:choose>
1753 </xsl:variable>
1754
1755 <xsl:variable name="filename">
1756 <xsl:choose>
1757 <xsl:when test="local-name(.) = 'graphic'
1758 or local-name(.) = 'inlinegraphic'">
1759 <!-- handle legacy graphic and inlinegraphic by new template -->
1760 <xsl:call-template name="mediaobject.filename">
1761 <xsl:with-param name="object" select="."/>
1762 </xsl:call-template>
1763 </xsl:when>
1764 <xsl:otherwise>
1765 <!-- imagedata, videodata, audiodata -->
1766 <xsl:call-template name="mediaobject.filename">
1767 <xsl:with-param name="object" select=".."/>
1768 </xsl:call-template>
1769 </xsl:otherwise>
1770 </xsl:choose>
1771 </xsl:variable>
1772
1773 <xsl:variable name="content-type">
1774 <xsl:if test="@format">
1775 <xsl:call-template name="graphic.format.content-type">
1776 <xsl:with-param name="format" select="@format"/>
1777 </xsl:call-template>
1778 </xsl:if>
1779 </xsl:variable>
1780
1781 <xsl:variable name="bgcolor">
1782 <xsl:call-template name="dbfo-attribute">
1783 <xsl:with-param name="pis"
1784 select="../processing-instruction('dbfo')"/>
1785 <xsl:with-param name="attribute" select="'background-color'"/>
1786 </xsl:call-template>
1787 </xsl:variable>
1788
1789 <fo:external-graphic>
1790 <xsl:attribute name="src">
1791 <xsl:call-template name="fo-external-image">
1792 <xsl:with-param name="filename">
1793 <xsl:if test="$img.src.path != '' and
1794 not(starts-with($filename, '/')) and
1795 not(contains($filename, '://'))">
1796 <xsl:value-of select="$img.src.path"/>
1797 </xsl:if>
1798 <xsl:value-of select="$filename"/>
1799 </xsl:with-param>
1800 </xsl:call-template>
1801 </xsl:attribute>
1802
1803 <xsl:attribute name="width">
1804 <xsl:choose>
1805 <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
1806 <xsl:when test="contains(@width,'%')">
1807 <xsl:value-of select="@width"/>
1808 </xsl:when>
1809 <xsl:when test="@width and not(@width = '')">
1810 <xsl:call-template name="length-spec">
1811 <xsl:with-param name="length" select="@width"/>
1812 <xsl:with-param name="default.units" select="'px'"/>
1813 </xsl:call-template>
1814 </xsl:when>
1815 <xsl:when test="not(@depth) and $default.image.width != ''">
1816 <xsl:call-template name="length-spec">
1817 <xsl:with-param name="length" select="$default.image.width"/>
1818 <xsl:with-param name="default.units" select="'px'"/>
1819 </xsl:call-template>
1820 </xsl:when>
1821 <xsl:otherwise>auto</xsl:otherwise>
1822 </xsl:choose>
1823 </xsl:attribute>
1824
1825 <xsl:attribute name="height">
1826 <xsl:choose>
1827 <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
1828 <xsl:when test="contains(@depth,'%')">
1829 <xsl:value-of select="@depth"/>
1830 </xsl:when>
1831 <xsl:when test="@depth">
1832 <xsl:call-template name="length-spec">
1833 <xsl:with-param name="length" select="@depth"/>
1834 <xsl:with-param name="default.units" select="'px'"/>
1835 </xsl:call-template>
1836 </xsl:when>
1837 <xsl:otherwise>auto</xsl:otherwise>
1838 </xsl:choose>
1839 </xsl:attribute>
1840
1841 <xsl:attribute name="content-width">
1842 <xsl:choose>
1843 <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
1844 <xsl:when test="contains(@contentwidth,'%')">
1845 <xsl:value-of select="@contentwidth"/>
1846 </xsl:when>
1847 <xsl:when test="@contentwidth">
1848 <xsl:call-template name="length-spec">
1849 <xsl:with-param name="length" select="@contentwidth"/>
1850 <xsl:with-param name="default.units" select="'px'"/>
1851 </xsl:call-template>
1852 </xsl:when>
1853 <xsl:when test="number($scale) != 1.0">
1854 <xsl:value-of select="$scale * 100"/>
1855 <xsl:text>%</xsl:text>
1856 </xsl:when>
1857 <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when>
1858 <xsl:otherwise>auto</xsl:otherwise>
1859 </xsl:choose>
1860 </xsl:attribute>
1861
1862 <xsl:attribute name="content-height">
1863 <xsl:choose>
1864 <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when>
1865 <xsl:when test="contains(@contentdepth,'%')">
1866 <xsl:value-of select="@contentdepth"/>
1867 </xsl:when>
1868 <xsl:when test="@contentdepth">
1869 <xsl:call-template name="length-spec">
1870 <xsl:with-param name="length" select="@contentdepth"/>
1871 <xsl:with-param name="default.units" select="'px'"/>
1872 </xsl:call-template>
1873 </xsl:when>
1874 <xsl:when test="number($scale) != 1.0">
1875 <xsl:value-of select="$scale * 100"/>
1876 <xsl:text>%</xsl:text>
1877 </xsl:when>
1878 <xsl:when test="$scalefit = 1">scale-to-fit</xsl:when>
1879 <xsl:otherwise>auto</xsl:otherwise>
1880 </xsl:choose>
1881 </xsl:attribute>
1882
1883 <xsl:if test="$content-type != ''">
1884 <xsl:attribute name="content-type">
1885 <xsl:value-of select="concat('content-type:',$content-type)"/>
1886 </xsl:attribute>
1887 </xsl:if>
1888
1889 <xsl:if test="$bgcolor != ''">
1890 <xsl:attribute name="background-color">
1891 <xsl:value-of select="$bgcolor"/>
1892 </xsl:attribute>
1893 </xsl:if>
1894
1895 <xsl:if test="@align">
1896 <xsl:attribute name="text-align">
1897 <xsl:value-of select="@align"/>
1898 </xsl:attribute>
1899 </xsl:if>
1900
1901 <xsl:if test="@valign">
1902 <xsl:attribute name="display-align">
1903 <xsl:choose>
1904 <xsl:when test="@valign = 'top'">before</xsl:when>
1905 <xsl:when test="@valign = 'middle'">center</xsl:when>
1906 <xsl:when test="@valign = 'bottom'">after</xsl:when>
1907 <xsl:otherwise>auto</xsl:otherwise>
1908 </xsl:choose>
1909 </xsl:attribute>
1910 </xsl:if>
1911 </fo:external-graphic>
1912 </xsl:template>
1913
1914 <xsl:template name="highlight_color">
1915 <xsl:param name="key" select="default"/>
1916
1917 <xsl:choose>
1918 <xsl:when test="$key = 'perl_Alert'">#0000ff</xsl:when>
1919 <xsl:when test="$key = 'perl_BaseN'">#007f00</xsl:when>
1920 <xsl:when test="$key = 'perl_BString'">#5C3566</xsl:when>
1921 <xsl:when test="$key = 'perl_Char'">#ff00ff</xsl:when>
1922 <xsl:when test="$key = 'perl_Comment'">#FF00FF</xsl:when>
1923 <xsl:when test="$key = 'perl_DataType'">#0000ff</xsl:when>
1924 <xsl:when test="$key = 'perl_DecVal'">#00007f</xsl:when>
1925 <xsl:when test="$key = 'perl_Error'">#ff0000</xsl:when>
1926 <xsl:when test="$key = 'perl_Float'">#00007f</xsl:when>
1927 <xsl:when test="$key = 'perl_Function'">#007f00</xsl:when>
1928 <xsl:when test="$key = 'perl_IString'">#5C3566</xsl:when>
1929 <xsl:when test="$key = 'perl_Keyword'">#002F5D</xsl:when>
1930 <xsl:when test="$key = 'perl_Operator'">#ffa500</xsl:when>
1931 <xsl:when test="$key = 'perl_Others'">#b03060</xsl:when>
1932 <xsl:when test="$key = 'perl_RegionMarker'">#96b9ff</xsl:when>
1933 <xsl:when test="$key = 'perl_Reserved'">#9b30ff</xsl:when>
1934 <xsl:when test="$key = 'perl_String'">#5C3566</xsl:when>
1935 <xsl:when test="$key = 'perl_Variable'">#0000ff</xsl:when>
1936 <xsl:when test="$key = 'perl_Warning'">#0000ff</xsl:when>
1937 <xsl:otherwise>#000000</xsl:otherwise>
1938 </xsl:choose>
1939 </xsl:template>
1940
1941 <!--
1942
1943 BUGBUG callout code blows up if the fo:inline contains a newline
1944 because it has to parse lines one by one to place the gfx
1945
1946 -->
1947 <xsl:template match="perl_Alert | perl_BaseN | perl_BString | perl_Char | perl_Comment | perl_DataType | perl_DecVal | perl_Error | perl_Float | perl_Function | perl_IString | perl_Keyword | perl_Operator | perl_Others | perl_RegionMarker | perl_Reserved | perl_String | perl_Variable | perl_Warning ">
1948 <xsl:variable name="name">
1949 <xsl:value-of select="local-name(.)"/>
1950 </xsl:variable>
1951 <xsl:variable name="content">
1952 <xsl:apply-templates/>
1953 </xsl:variable>
1954 <xsl:choose>
1955 <xsl:when test="contains($content,'&#xA;')">
1956 <fo:inline><xsl:attribute name="color"><xsl:call-template name="highlight_color"><xsl:with-param name="key" select="$name"/></xsl:call-template></xsl:attribute><xsl:value-of select="substring-before($content,'&#xA;')"/></fo:inline>
1957 <xsl:text>
1958 </xsl:text>
1959 <fo:inline><xsl:attribute name="color"><xsl:call-template name="highlight_color"><xsl:with-param name="key" select="$name"/></xsl:call-template></xsl:attribute><xsl:value-of select="substring-after($content,'&#xA;')"/></fo:inline>
1960 </xsl:when>
1961 <xsl:otherwise>
1962 <fo:inline><xsl:attribute name="color"><xsl:call-template name="highlight_color"><xsl:with-param name="key" select="$name"/></xsl:call-template></xsl:attribute><xsl:apply-templates/></fo:inline>
1963 </xsl:otherwise>
1964 </xsl:choose>
1965 </xsl:template>
1966
1967 <xsl:template match="varlistentry" mode="vl.as.blocks">
1968 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
1969
1970 <fo:block id="{$id}"
1971 keep-together.within-column="always"
1972 keep-with-next.within-column="always">
1973 <xsl:apply-templates select="term"/>
1974 </fo:block>
1975
1976 <fo:block xsl:use-attribute-sets="list.item.spacing" margin-left="0.25in">
1977 <xsl:apply-templates select="listitem"/>
1978 </fo:block>
1979 </xsl:template>
1980
1981 <xsl:template match="segmentedlist" mode="seglist-table">
1982 <xsl:apply-templates select="title" mode="list.title.mode" />
1983 <fo:table>
1984 <fo:table-column column-number="1" column-width="34%"/>
1985 <fo:table-column column-number="2" column-width="66%"/>
1986 <fo:table-header start-indent="0pt" end-indent="0pt">
1987 <fo:table-row>
1988 <xsl:apply-templates select="segtitle" mode="seglist-table"/>
1989 </fo:table-row>
1990 </fo:table-header>
1991 <fo:table-body start-indent="0pt" end-indent="0pt">
1992 <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
1993 </fo:table-body>
1994 </fo:table>
1995 </xsl:template>
1996
1997
1998 <xsl:template name="book.verso.title">
1999 <xsl:if test="following-sibling::bookinfo/productname | following-sibling::productname">
2000 <xsl:apply-templates select="(following-sibling::bookinfo/productname | following-sibling::productname)[1]" mode="book.verso.subtitle.mode"/>
2001 <xsl:text> </xsl:text>
2002 <xsl:apply-templates select="(following-sibling::bookinfo/productnumber | following-sibling::productnumber)[1]" mode="book.verso.subtitle.mode"/>
2003 <xsl:text> </xsl:text>
2004 </xsl:if>
2005
2006 <xsl:apply-templates mode="titlepage.mode"/>
2007
2008 <xsl:if test="following-sibling::subtitle
2009 |following-sibling::info/subtitle
2010 |following-sibling::bookinfo/subtitle">
2011 <!--xsl:text>: </xsl:text-->
2012 <fo:block padding-bottom="24pt">
2013 <xsl:apply-templates select="(following-sibling::subtitle
2014 |following-sibling::info/subtitle
2015 |following-sibling::bookinfo/subtitle)[1]"
2016 mode="book.verso.subtitle.mode"/>
2017 <xsl:apply-templates mode="titlepage.mode" select="(following-sibling::bookinfo/edition|following-sibling::edition)[1]"/>
2018 </fo:block>
2019 </xsl:if>
2020 </xsl:template>
2021
2022 <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
2023 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" padding-top="12pt" padding-bottom="24pt">
2024 <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
2025 </fo:block>
2026 </xsl:template>
2027
2028 <xsl:template match="email">
2029 <xsl:variable name="addr">
2030 <xsl:apply-templates/>
2031 </xsl:variable>
2032
2033 <xsl:call-template name="inline.monoseq">
2034 <xsl:with-param name="content">
2035 <fo:inline keep-together.within-line="always" hyphenate="false">
2036 <fo:basic-link xsl:use-attribute-sets="xref.properties" external-destination="mailto:{$addr}">
2037 <xsl:if test="not($email.delimiters.enabled = 0)">
2038 <xsl:text>&lt;</xsl:text>
2039 </xsl:if>
2040 <xsl:value-of select="$addr"/>
2041 <xsl:if test="not($email.delimiters.enabled = 0)">
2042 <xsl:text>&gt;</xsl:text>
2043 </xsl:if>
2044 </fo:basic-link>
2045 </fo:inline>
2046 </xsl:with-param>
2047 </xsl:call-template>
2048 </xsl:template>
2049
2050 <xsl:template match="edition" mode="titlepage.mode">
2051 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
2052 <xsl:call-template name="gentext">
2053 <xsl:with-param name="key" select="'Edition'"/>
2054 </xsl:call-template>
2055 <xsl:call-template name="gentext.space"/>
2056 <xsl:apply-templates mode="titlepage.mode"/>
2057 </fo:block>
2058 </xsl:template>
2059
2060 <xsl:template name="article.titlepage.recto">
2061 <xsl:choose>
2062 <xsl:when test="articleinfo/productname">
2063 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="34pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
2064 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="articleinfo/productname"/>
2065 <xsl:text> </xsl:text>
2066 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="articleinfo/productnumber"/>
2067 </fo:block>
2068 </xsl:when>
2069 </xsl:choose>
2070 <xsl:choose>
2071 <xsl:when test="articleinfo/title">
2072 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
2073 </xsl:when>
2074 <xsl:when test="artheader/title">
2075 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
2076 </xsl:when>
2077 <xsl:when test="info/title">
2078 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
2079 </xsl:when>
2080 <xsl:when test="title">
2081 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
2082 </xsl:when>
2083 </xsl:choose>
2084
2085 <xsl:choose>
2086 <xsl:when test="articleinfo/subtitle">
2087 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
2088 </xsl:when>
2089 <xsl:when test="artheader/subtitle">
2090 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
2091 </xsl:when>
2092 <xsl:when test="info/subtitle">
2093 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
2094 </xsl:when>
2095 <xsl:when test="subtitle">
2096 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
2097 </xsl:when>
2098 </xsl:choose>
2099
2100 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
2101 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
2102 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
2103 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
2104 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
2105 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
2106 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
2107 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
2108 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
2109 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
2110 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
2111 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
2112 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
2113 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
2114 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2115 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
2116 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
2117 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
2118 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
2119 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
2120 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
2121 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
2122 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
2123 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
2124 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
2125 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
2126 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
2127 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
2128 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
2129 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
2130 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
2131 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
2132 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
2133 </xsl:template>
2134
2135
2136 <xsl:attribute-set name="remark.properties">
2137 <xsl:attribute name="font-style">italic</xsl:attribute>
2138 <xsl:attribute name="background-color">#ff00ff</xsl:attribute>
2139 </xsl:attribute-set>
2140
2141 <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
2142 <xsl:if test="$show.comments != 0">
2143 <fo:block xsl:use-attribute-sets="remark.properties">
2144 <xsl:call-template name="inline.charseq"/>
2145 </fo:block>
2146 </xsl:if>
2147 </xsl:template>
2148
2149 <xsl:template match="comment|remark">
2150 <xsl:if test="$show.comments != 0">
2151 <fo:inline xsl:use-attribute-sets="remark.properties">
2152 <xsl:call-template name="inline.charseq"/>
2153 </fo:inline>
2154 </xsl:if>
2155 </xsl:template>
2156
2157 <xsl:template match="orderedlist/listitem">
2158 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
2159
2160 <xsl:variable name="item.contents">
2161 <fo:list-item-label end-indent="label-end()" xsl:use-attribute-sets="orderedlist.label.properties">
2162 <fo:block>
2163 <xsl:apply-templates select="." mode="item-number"/>
2164 </fo:block>
2165 </fo:list-item-label>
2166 <fo:list-item-body start-indent="body-start()">
2167 <fo:block margin-left="6pt">
2168 <xsl:apply-templates/>
2169 </fo:block>
2170 </fo:list-item-body>
2171 </xsl:variable>
2172
2173 <xsl:choose>
2174 <xsl:when test="parent::*/@spacing = 'compact'">
2175 <fo:list-item id="{$id}" xsl:use-attribute-sets="compact.list.item.spacing">
2176 <xsl:copy-of select="$item.contents"/>
2177 </fo:list-item>
2178 </xsl:when>
2179 <xsl:otherwise>
2180 <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
2181 <xsl:copy-of select="$item.contents"/>
2182 </fo:list-item>
2183 </xsl:otherwise>
2184 </xsl:choose>
2185 </xsl:template>
2186
2187 <xsl:template match="foreignphrase">
2188 <xsl:call-template name="inline.charseq"/>
2189 </xsl:template>
2190
2191 <xsl:template match="revision/author">
2192 <!--xsl:apply-templates/-->
2193 <xsl:call-template name="person.name">
2194 <xsl:with-param name="node" select="."/>
2195 </xsl:call-template>
2196 <xsl:if test="email">
2197 <xsl:text> </xsl:text>
2198 <xsl:apply-templates select="email"/>
2199 </xsl:if>
2200 </xsl:template>
2201
2202
2203 <xsl:template match="revhistory">
2204 <fo:table table-layout="fixed" xsl:use-attribute-sets="revhistory.table.properties">
2205 <xsl:call-template name="anchor"/>
2206 <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
2207 <fo:table-column column-number="2" column-width="proportional-column-width(2)"/>
2208 <fo:table-column column-number="3" column-width="proportional-column-width(3)"/>
2209 <fo:table-body start-indent="0pt" end-indent="0pt">
2210 <xsl:apply-templates/>
2211 </fo:table-body>
2212 </fo:table>
2213 </xsl:template>
2214
2215 <xsl:template match="revhistory/revision">
2216 <xsl:variable name="revnumber" select="revnumber"/>
2217 <xsl:variable name="revdate" select="date"/>
2218 <xsl:variable name="revauthor" select="authorinitials|author"/>
2219 <xsl:variable name="revremark" select="revremark|revdescription"/>
2220 <fo:table-row>
2221 <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
2222 <fo:block>
2223 <xsl:call-template name="anchor"/>
2224 <xsl:if test="$revnumber">
2225 <xsl:call-template name="gentext">
2226 <xsl:with-param name="key" select="'Revision'"/>
2227 </xsl:call-template>
2228 <xsl:call-template name="gentext.space"/>
2229 <xsl:apply-templates select="$revnumber[1]"/>
2230 </xsl:if>
2231 </fo:block>
2232 </fo:table-cell>
2233 <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
2234 <fo:block>
2235 <xsl:apply-templates select="$revdate[1]"/>
2236 </fo:block>
2237 </fo:table-cell>
2238 <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
2239 <fo:block>
2240 <xsl:for-each select="$revauthor">
2241 <xsl:apply-templates select="."/>
2242 <xsl:if test="position() != last()">
2243 <xsl:text>, </xsl:text>
2244 </xsl:if>
2245 </xsl:for-each>
2246 </fo:block>
2247 </fo:table-cell>
2248 </fo:table-row>
2249 <xsl:if test="$revremark">
2250 <fo:table-row>
2251 <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revremark.table.cell.properties">
2252 <fo:block>
2253 <xsl:apply-templates select="$revremark[1]"/>
2254 </fo:block>
2255 </fo:table-cell>
2256 </fo:table-row>
2257 </xsl:if>
2258 </xsl:template>
2259
2260 <xsl:template name="select.pagemaster">
2261 <xsl:param name="element" select="local-name(.)"/>
2262 <xsl:param name="pageclass" select="''"/>
2263
2264 <xsl:variable name="pagemaster">
2265 <xsl:choose>
2266 <xsl:when test="$pageclass != ''">
2267 <xsl:value-of select="$pageclass"/>
2268 </xsl:when>
2269 <xsl:when test="$pageclass = 'lot'">lot</xsl:when>
2270 <xsl:when test="$element = 'dedication'">front</xsl:when>
2271 <xsl:when test="$element = 'preface'">front</xsl:when>
2272 <xsl:when test="$element = 'appendix'">back</xsl:when>
2273 <xsl:when test="$element = 'glossary'">back</xsl:when>
2274 <xsl:when test="$element = 'bibliography'">back</xsl:when>
2275 <xsl:when test="$element = 'index'">index</xsl:when>
2276 <xsl:when test="$element = 'colophon'">back</xsl:when>
2277 <xsl:otherwise>body</xsl:otherwise>
2278 </xsl:choose>
2279
2280 <xsl:choose>
2281 <xsl:when test="$draft.mode = 'yes'">
2282 <xsl:text>-draft</xsl:text>
2283 </xsl:when>
2284 <xsl:when test="$draft.mode = 'no'">
2285 <!-- nop -->
2286 </xsl:when>
2287 <!--xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"-->
2288 <xsl:when test="($draft.mode = 'maybe' and (ancestor-or-self::set | ancestor-or-self::book | ancestor-or-self::article)[1]/@status = 'draft')">
2289 <xsl:text>-draft</xsl:text>
2290 </xsl:when>
2291 <xsl:otherwise>
2292 <!-- nop -->
2293 </xsl:otherwise>
2294 </xsl:choose>
2295 </xsl:variable>
2296
2297 <xsl:call-template name="select.user.pagemaster">
2298 <xsl:with-param name="element" select="$element"/>
2299 <xsl:with-param name="pageclass" select="$pageclass"/>
2300 <xsl:with-param name="default-pagemaster" select="$pagemaster"/>
2301 </xsl:call-template>
2302 </xsl:template>
2303
2304 <xsl:template name="draft.text">
2305 <xsl:choose>
2306 <xsl:when test="$draft.mode = 'yes'">
2307 <xsl:call-template name="gentext">
2308 <xsl:with-param name="key" select="'Draft'"/>
2309 </xsl:call-template>
2310 </xsl:when>
2311 <xsl:when test="$draft.mode = 'no'">
2312 <!-- nop -->
2313 </xsl:when>
2314 <!--xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"-->
2315 <xsl:when test="(ancestor-or-self::set | ancestor-or-self::book | ancestor-or-self::article)[1]/@status = 'draft'">
2316 <xsl:call-template name="gentext">
2317 <xsl:with-param name="key" select="'Draft'"/>
2318 </xsl:call-template>
2319 </xsl:when>
2320 <xsl:otherwise>
2321 <!-- nop -->
2322 </xsl:otherwise>
2323 </xsl:choose>
2324 </xsl:template>
2325
2326 <xsl:template match="preface|chapter|appendix|article"
2327 mode="toc">
2328 <xsl:param name="toc-context" select="."/>
2329
2330 <xsl:variable name="id">
2331 <xsl:call-template name="object.id"/>
2332 </xsl:variable>
2333
2334 <xsl:variable name="cid">
2335 <xsl:call-template name="object.id">
2336 <xsl:with-param name="object" select="$toc-context"/>
2337 </xsl:call-template>
2338 </xsl:variable>
2339
2340 <xsl:call-template name="toc.line">
2341 <xsl:with-param name="toc-context" select="$toc-context"/>
2342 </xsl:call-template>
2343
2344 <xsl:variable name="nodes" select="section|sect1
2345 |simplesect[$simplesect.in.toc != 0]
2346 |refentry|appendix|qandaset"/>
2347
2348 <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
2349
2350 <xsl:if test="$toc.section.depth > 0
2351 and $toc.max.depth > $depth.from.context
2352 and $nodes">
2353 <fo:block id="toc.{$cid}.{$id}">
2354 <xsl:attribute name="margin-left">
2355 <xsl:call-template name="set.toc.indent"/>
2356 </xsl:attribute>
2357
2358 <xsl:apply-templates select="$nodes" mode="toc">
2359 <xsl:with-param name="toc-context" select="$toc-context"/>
2360 </xsl:apply-templates>
2361 </fo:block>
2362 </xsl:if>
2363 </xsl:template>
2364
2365 <xsl:template match="qandaentry" mode="toc">
2366 <!--xsl:apply-templates select="question" mode="toc"/-->
2367 </xsl:template>
2368
2369 <xsl:template match="substeps">
2370 <fo:list-block xsl:use-attribute-sets="list.block.spacing"
2371 provisional-distance-between-starts="2em"
2372 provisional-label-separation="0.2em">
2373 <xsl:apply-templates/>
2374 </fo:list-block>
2375 </xsl:template>
2376
2377 <xsl:template match="procedure/step|substeps/step">
2378 <xsl:variable name="id">
2379 <xsl:call-template name="object.id"/>
2380 </xsl:variable>
2381
2382 <fo:list-item xsl:use-attribute-sets="list.item.spacing">
2383 <fo:list-item-label end-indent="label-end()">
2384 <fo:block id="{$id}">
2385 <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 -->
2386 <xsl:choose>
2387 <xsl:when test="count(../step) = 1">
2388 <xsl:text>&#x2022;</xsl:text>
2389 </xsl:when>
2390 <xsl:otherwise>
2391 <xsl:apply-templates select="." mode="number">
2392 <xsl:with-param name="recursive" select="0"/>
2393 </xsl:apply-templates>.
2394 </xsl:otherwise>
2395 </xsl:choose>
2396 </fo:block>
2397 </fo:list-item-label>
2398 <fo:list-item-body start-indent="body-start()">
2399 <fo:block>
2400 <xsl:apply-templates/>
2401 </fo:block>
2402 </fo:list-item-body>
2403 </fo:list-item>
2404 </xsl:template>
2405
2406 <xsl:template match="tgroup" name="tgroup">
2407 <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'">
2408 <xsl:message terminate="yes">
2409 <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
2410 </xsl:message>
2411 </xsl:if>
2412
2413 <xsl:variable name="table.width">
2414 <xsl:call-template name="table.width"/>
2415 </xsl:variable>
2416
2417 <xsl:variable name="colspecs">
2418 <xsl:choose>
2419 <xsl:when test="$use.extensions != 0
2420 and $tablecolumns.extension != 0">
2421 <xsl:call-template name="generate.colgroup.raw">
2422 <xsl:with-param name="cols" select="@cols"/>
2423 </xsl:call-template>
2424 </xsl:when>
2425 <xsl:otherwise>
2426 <xsl:call-template name="generate.colgroup">
2427 <xsl:with-param name="cols" select="@cols"/>
2428 </xsl:call-template>
2429 </xsl:otherwise>
2430 </xsl:choose>
2431 </xsl:variable>
2432
2433 <xsl:variable name="prop-columns"
2434 select=".//colspec[contains(@colwidth, '*')]"/>
2435 <xsl:if test="count($prop-columns) != 0 or
2436 $fop.extensions != 0 or
2437 $fop1.extensions != 0 or
2438 $passivetex.extensions != 0">
2439 <xsl:attribute name="table-layout">fixed</xsl:attribute>
2440 </xsl:if>
2441
2442 <xsl:attribute name="width">
2443 <xsl:value-of select="$table.width"/>
2444 </xsl:attribute>
2445
2446 <xsl:choose>
2447 <xsl:when test="$use.extensions != 0
2448 and $tablecolumns.extension != 0">
2449 <xsl:choose>
2450 <xsl:when test="function-available('stbl:adjustColumnWidths')">
2451 <xsl:copy-of select="stbl:adjustColumnWidths($colspecs)"/>
2452 </xsl:when>
2453 <xsl:when test="function-available('xtbl:adjustColumnWidths')">
2454 <xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/>
2455 </xsl:when>
2456 <xsl:when test="function-available('ptbl:adjustColumnWidths')">
2457 <xsl:copy-of select="ptbl:adjustColumnWidths($colspecs)"/>
2458 </xsl:when>
2459 <xsl:when test="function-available('perl:adjustColumnWidths')">
2460 <xsl:copy-of select="perl:adjustColumnWidths($table.width, $colspecs)"/>
2461 </xsl:when>
2462 <xsl:otherwise>
2463 <xsl:message terminate="yes">
2464 <xsl:text>No adjustColumnWidths function available.</xsl:text>
2465 </xsl:message>
2466 </xsl:otherwise>
2467 </xsl:choose>
2468 </xsl:when>
2469 <xsl:otherwise>
2470 <xsl:copy-of select="$colspecs"/>
2471 </xsl:otherwise>
2472 </xsl:choose>
2473
2474 <xsl:apply-templates select="thead"/>
2475 <xsl:apply-templates select="tfoot"/>
2476 <xsl:apply-templates select="tbody"/>
2477 </xsl:template>
2478
2479 <xsl:template match="para">
2480 <fo:block xsl:use-attribute-sets="normal.para.spacing">
2481 <xsl:if test="descendant-or-self::figure">
2482 <xsl:attribute name="keep-together.within-column">
2483 <xsl:text>always</xsl:text>
2484 </xsl:attribute>
2485 </xsl:if>
2486 <xsl:call-template name="anchor"/>
2487 <xsl:apply-templates/>
2488 </fo:block>
2489 </xsl:template>
2490
2491 <xsl:template match="programlistingco|screenco">
2492 <xsl:variable name="verbatim" select="programlisting|screen"/>
2493 <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
2494
2495 <xsl:choose>
2496 <xsl:when test="$use.extensions != '0'
2497 and $callouts.extension != '0'">
2498 <xsl:variable name="rtf">
2499 <xsl:apply-templates select="$verbatim">
2500 <xsl:with-param name="suppress-numbers" select="'1'"/>
2501 </xsl:apply-templates>
2502 </xsl:variable>
2503
2504 <xsl:variable name="rtf-with-callouts">
2505 <xsl:choose>
2506 <xsl:when test="contains($vendor, 'SAXON ')">
2507 <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
2508 </xsl:when>
2509 <xsl:when test="contains($vendor, 'Apache Software Foundation')">
2510 <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
2511 </xsl:when>
2512 <xsl:when test="function-available('perl:insertCallouts')">
2513 <xsl:copy-of select="perl:insertCallouts(areaspec,exsl:node-set($rtf))"/>
2514 </xsl:when>
2515 <xsl:otherwise>
2516 <xsl:message terminate="yes">
2517 <xsl:text>Don't know how to do callouts with </xsl:text>
2518 <xsl:value-of select="$vendor"/>
2519 </xsl:message>
2520 </xsl:otherwise>
2521 </xsl:choose>
2522 </xsl:variable>
2523
2524 <xsl:choose>
2525 <xsl:when test="$verbatim/@linenumbering = 'numbered'
2526 and $linenumbering.extension != '0'">
2527 <xsl:call-template name="number.rtf.lines">
2528 <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
2529 <xsl:with-param name="pi.context"
2530 select="programlisting|screen"/>
2531 </xsl:call-template>
2532 <xsl:apply-templates select="calloutlist"/>
2533 </xsl:when>
2534 <xsl:otherwise>
2535 <xsl:copy-of select="$rtf-with-callouts"/>
2536 <xsl:apply-templates select="calloutlist"/>
2537 </xsl:otherwise>
2538 </xsl:choose>
2539 </xsl:when>
2540 <xsl:otherwise>
2541 <xsl:apply-templates/>
2542 </xsl:otherwise>
2543 </xsl:choose>
2544 </xsl:template>
2545
2546 <xsl:template match="stepalternatives/step">
2547 <xsl:variable name="id">
2548 <xsl:call-template name="object.id"/>
2549 </xsl:variable>
2550
2551 <xsl:variable name="keep.together">
2552 <xsl:call-template name="pi.dbfo_keep-together"/>
2553 </xsl:variable>
2554
2555 <fo:list-item xsl:use-attribute-sets="list.item.spacing">
2556 <xsl:if test="$keep.together != ''">
2557 <xsl:attribute name="keep-together.within-column"><xsl:value-of
2558 select="$keep.together"/></xsl:attribute>
2559 </xsl:if>
2560 <fo:list-item-label end-indent="label-end()">
2561 <fo:block id="{$id}">
2562 <!--xsl:text>&#x2022;</xsl:text-->
2563 </fo:block>
2564 </fo:list-item-label>
2565 <fo:list-item-body start-indent="body-start()">
2566 <xsl:choose>
2567 <!-- * work around broken passivetex list-item-body rendering -->
2568 <xsl:when test="$passivetex.extensions = '1'">
2569 <xsl:apply-templates/>
2570 </xsl:when>
2571 <xsl:otherwise>
2572 <fo:block>
2573 <xsl:apply-templates/>
2574 </fo:block>
2575 </xsl:otherwise>
2576 </xsl:choose>
2577 </fo:list-item-body>
2578 </fo:list-item>
2579 </xsl:template>
2580
2581 <!-- need ID in term -->
2582 <xsl:template match="varlistentry/term">
2583 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
2584 <fo:inline id="{$id}"><xsl:text>&#x200B;</xsl:text>
2585 <xsl:call-template name="simple.xlink">
2586 <xsl:with-param name="content">
2587 <xsl:apply-templates/>
2588 </xsl:with-param>
2589 </xsl:call-template>
2590 </fo:inline>
2591 <xsl:choose>
2592 <xsl:when test="not(following-sibling::term)"/> <!-- do nothing -->
2593 <xsl:otherwise>
2594 <!-- * if we have multiple terms in the same varlistentry, generate -->
2595 <!-- * a separator (", " by default) and/or an additional line -->
2596 <!-- * break after each one except the last -->
2597 <fo:inline><xsl:value-of select="$variablelist.term.separator"/></fo:inline>
2598 <xsl:if test="not($variablelist.term.break.after = '0')">
2599 <fo:block/>
2600 </xsl:if>
2601 </xsl:otherwise>
2602 </xsl:choose>
2603 </xsl:template>
2604
2605 <!-- don't include indexterms in xrefs -->
2606 <xsl:template match="varlistentry/term" mode="xref-to">
2607 <xsl:param name="verbose" select="1"/>
2608 <!-- to avoid the comma that will be generated if there are several terms -->
2609 <!-- added mode -->
2610 <xsl:apply-templates mode="xref-to"/>
2611 </xsl:template>
2612
2613 <!-- do nothing -->
2614 <xsl:template match="indexterm" mode="xref-to">
2615 </xsl:template>
2616
2617 <!-- do nothing -->
2618 <xsl:template match="primary|secondary|tertiary" mode="xref-to">
2619 </xsl:template>
2620
2621 <!--
2622
2623 copied verbatim from footnotes.xsl
2624
2625 Not sure why it doesn't work in there.
2626
2627 -->
2628 <xsl:template match="footnote/para[1]
2629 |footnote/simpara[1]
2630 |footnote/formalpara[1]"
2631 priority="2">
2632 <!-- this only works if the first thing in a footnote is a para, -->
2633 <!-- which is ok, because it usually is. -->
2634 <fo:block>
2635 <xsl:call-template name="format.footnote.mark">
2636 <xsl:with-param name="mark">
2637 <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
2638 </xsl:with-param>
2639 </xsl:call-template>
2640 <xsl:apply-templates/>
2641 </fo:block>
2642 </xsl:template>
2643
2644 <xsl:template name="number.rtf.lines">
2645 <xsl:param name="rtf" select="''"/>
2646 <xsl:param name="pi.context" select="."/>
2647
2648 <!-- Save the global values -->
2649 <xsl:variable name="global.linenumbering.everyNth"
2650 select="$linenumbering.everyNth"/>
2651
2652 <xsl:variable name="global.linenumbering.separator"
2653 select="$linenumbering.separator"/>
2654
2655 <xsl:variable name="global.linenumbering.width"
2656 select="$linenumbering.width"/>
2657
2658 <!-- Extract the <?dbfo linenumbering.*?> PI values -->
2659 <xsl:variable name="pi.linenumbering.everyNth">
2660 <xsl:call-template name="pi.dbfo_linenumbering.everyNth">
2661 <xsl:with-param name="node" select="$pi.context"/>
2662 </xsl:call-template>
2663 </xsl:variable>
2664
2665 <xsl:variable name="pi.linenumbering.separator">
2666 <xsl:call-template name="pi.dbfo_linenumbering.separator">
2667 <xsl:with-param name="node" select="$pi.context"/>
2668 </xsl:call-template>
2669 </xsl:variable>
2670
2671 <xsl:variable name="pi.linenumbering.width">
2672 <xsl:call-template name="pi.dbfo_linenumbering.width">
2673 <xsl:with-param name="node" select="$pi.context"/>
2674 </xsl:call-template>
2675 </xsl:variable>
2676
2677 <!-- Construct the 'in-context' values -->
2678 <xsl:variable name="linenumbering.everyNth">
2679 <xsl:choose>
2680 <xsl:when test="$pi.linenumbering.everyNth != ''">
2681 <xsl:value-of select="$pi.linenumbering.everyNth"/>
2682 </xsl:when>
2683 <xsl:otherwise>
2684 <xsl:value-of select="$global.linenumbering.everyNth"/>
2685 </xsl:otherwise>
2686 </xsl:choose>
2687 </xsl:variable>
2688
2689 <xsl:variable name="linenumbering.separator">
2690 <xsl:choose>
2691 <xsl:when test="$pi.linenumbering.separator != ''">
2692 <xsl:value-of select="$pi.linenumbering.separator"/>
2693 </xsl:when>
2694 <xsl:otherwise>
2695 <xsl:value-of select="$global.linenumbering.separator"/>
2696 </xsl:otherwise>
2697 </xsl:choose>
2698 </xsl:variable>
2699
2700 <xsl:variable name="linenumbering.width">
2701 <xsl:choose>
2702 <xsl:when test="$pi.linenumbering.width != ''">
2703 <xsl:value-of select="$pi.linenumbering.width"/>
2704 </xsl:when>
2705 <xsl:otherwise>
2706 <xsl:value-of select="$global.linenumbering.width"/>
2707 </xsl:otherwise>
2708 </xsl:choose>
2709 </xsl:variable>
2710
2711 <xsl:variable name="linenumbering.startinglinenumber">
2712 <xsl:choose>
2713 <xsl:when test="$pi.context/@startinglinenumber">
2714 <xsl:value-of select="$pi.context/@startinglinenumber"/>
2715 </xsl:when>
2716 <xsl:when test="$pi.context/@continuation='continues'">
2717 <xsl:variable name="lastLine">
2718 <xsl:choose>
2719 <xsl:when test="$pi.context/self::programlisting">
2720 <xsl:call-template name="lastLineNumber">
2721 <xsl:with-param name="listings"
2722 select="preceding::programlisting[@linenumbering='numbered']"/>
2723 </xsl:call-template>
2724 </xsl:when>
2725 <xsl:when test="$pi.context/self::screen">
2726 <xsl:call-template name="lastLineNumber">
2727 <xsl:with-param name="listings"
2728 select="preceding::screen[@linenumbering='numbered']"/>
2729 </xsl:call-template>
2730 </xsl:when>
2731 <xsl:when test="$pi.context/self::literallayout">
2732 <xsl:call-template name="lastLineNumber">
2733 <xsl:with-param name="listings"
2734 select="preceding::literallayout[@linenumbering='numbered']"/>
2735 </xsl:call-template>
2736 </xsl:when>
2737 <xsl:when test="$pi.context/self::address">
2738 <xsl:call-template name="lastLineNumber">
2739 <xsl:with-param name="listings"
2740 select="preceding::address[@linenumbering='numbered']"/>
2741 </xsl:call-template>
2742 </xsl:when>
2743 <xsl:when test="$pi.context/self::synopsis">
2744 <xsl:call-template name="lastLineNumber">
2745 <xsl:with-param name="listings"
2746 select="preceding::synopsis[@linenumbering='numbered']"/>
2747 </xsl:call-template>
2748 </xsl:when>
2749 <xsl:otherwise>
2750 <xsl:message>
2751 <xsl:text>Unexpected verbatim environment: </xsl:text>
2752 <xsl:value-of select="local-name(.)"/>
2753 </xsl:message>
2754 <xsl:value-of select="0"/>
2755 </xsl:otherwise>
2756 </xsl:choose>
2757 </xsl:variable>
2758
2759 <xsl:value-of select="$lastLine + 1"/>
2760 </xsl:when>
2761 <xsl:otherwise>1</xsl:otherwise>
2762 </xsl:choose>
2763 </xsl:variable>
2764
2765 <xsl:choose>
2766 <xsl:when test="function-available('sverb:numberLines')">
2767 <xsl:copy-of select="sverb:numberLines($rtf)"/>
2768 </xsl:when>
2769 <xsl:when test="function-available('xverb:numberLines')">
2770 <xsl:copy-of select="xverb:numberLines($rtf)"/>
2771 </xsl:when>
2772 <xsl:when test="function-available('perl:numberLines')">
2773 <xsl:copy-of select="perl:numberLines($linenumbering.startinglinenumber, $rtf)"/>
2774 </xsl:when>
2775 <xsl:otherwise>
2776 <xsl:message terminate="yes">
2777 <xsl:text>No numberLines function available.</xsl:text>
2778 </xsl:message>
2779 </xsl:otherwise>
2780 </xsl:choose>
2781 </xsl:template>
2782
2783 <!-- change font size from 24.8832pt -->
2784 <xsl:template name="index.titlepage.recto">
2785 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="{$body.font.master * 1.8}" font-family="{$title.fontset}" font-weight="bold">
2786 <xsl:call-template name="component.title">
2787 <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
2788 <xsl:with-param name="pagewide" select="1"/>
2789 </xsl:call-template></fo:block>
2790 <xsl:choose>
2791 <xsl:when test="indexinfo/subtitle">
2792 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
2793 </xsl:when>
2794 <xsl:when test="docinfo/subtitle">
2795 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
2796 </xsl:when>
2797 <xsl:when test="info/subtitle">
2798 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
2799 </xsl:when>
2800 <xsl:when test="subtitle">
2801 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
2802 </xsl:when>
2803 </xsl:choose>
2804
2805 </xsl:template>
2806
2807 <xsl:template name="graphical.admonition">
2808 <xsl:variable name="id">
2809 <xsl:call-template name="object.id"/>
2810 </xsl:variable>
2811 <xsl:variable name="graphic.width">
2812 <xsl:apply-templates select="." mode="admon.graphic.width"/>
2813 </xsl:variable>
2814 <xsl:variable name="src">
2815 <xsl:call-template name="admon.graphic"/>
2816 </xsl:variable>
2817
2818 <fo:block id="{$id}"
2819 xsl:use-attribute-sets="graphical.admonition.properties">
2820 <xsl:attribute name="margin-top">1em</xsl:attribute>
2821 <xsl:attribute name="padding-bottom">-3em</xsl:attribute>
2822 <xsl:attribute name="margin-bottom">4em</xsl:attribute>
2823 <xsl:attribute name="margin-left">0em</xsl:attribute>
2824 <fo:block-container>
2825 <fo:block-container>
2826 <xsl:attribute name="margin-left">0em</xsl:attribute>
2827 <fo:block xsl:use-attribute-sets="admonition.title.properties">
2828 <xsl:apply-templates select="." mode="object.title.markup">
2829 <xsl:with-param name="allow-anchors" select="1"/>
2830 </xsl:apply-templates>
2831 </fo:block>
2832 </fo:block-container>
2833 <fo:block-container>
2834 <xsl:attribute name="margin-left">0em</xsl:attribute>
2835 <fo:block xsl:use-attribute-sets="admonition.properties">
2836 <xsl:apply-templates/>
2837 </fo:block>
2838 </fo:block-container>
2839 <fo:block-container position="absolute" top="-12px" left="1px">
2840 <xsl:attribute name="margin-left">0em</xsl:attribute>
2841 <fo:block>
2842 <fo:external-graphic width="auto" height="auto"
2843 content-width="{$graphic.width}" >
2844 <xsl:attribute name="src">
2845 <xsl:call-template name="admon.graphic"/>
2846 </xsl:attribute>
2847 </fo:external-graphic>
2848 </fo:block>
2849 </fo:block-container>
2850 </fo:block-container>
2851 </fo:block>
2852
2853 </xsl:template>
2854
2855 <!-- add a 2em top margin -->
2856 <xsl:template name="footnote-separator">
2857 <fo:static-content flow-name="xsl-footnote-separator">
2858 <fo:block>
2859 <xsl:attribute name="margin-top">2em</xsl:attribute>
2860 <fo:leader xsl:use-attribute-sets="footnote.sep.leader.properties"/>
2861 </fo:block>
2862 </fo:static-content>
2863 </xsl:template>
2864
2865 </xsl:stylesheet>
2866