2 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
3 xmlns:
fo=
"http://www.w3.org/1999/XSL/Format"
4 xmlns:
d=
"http://docbook.org/ns/docbook"
8 <xsl:import href="/Users/cejohnsonlouisville/Documents/docbook-xsl-ns-1.76.1/fo/docbook.xsl"/>
10 <xsl:import href=
"http://50.56.245.89/xsl-ns/fo/docbook.xsl"/>
11 <xsl:import href=
"title_page.xsl"/>
12 <xsl:param name=
"generate.toc">
15 article toc,title,figure,table
16 book toc,title,figure,table,example,equation
31 <xsl:param name=
"default.table.frame">none
</xsl:param>
33 <xsl:param name=
"section.autolabel" select=
"1"/>
34 <xsl:param name=
"fop1.extensions" select=
"1"/>
37 <xsl:param name=
"debug"></xsl:param>
38 <xsl:param name=
"long.table"></xsl:param>
40 <xsl:attribute-set name=
"article.appendix.title.properties">
41 <xsl:attribute name=
"margin-{$direction.align.start}">
42 <xsl:text >inherit
</xsl:text>
46 <xsl:attribute-set name=
"table.caption">
47 <xsl:attribute name=
"start-indent">inherit
</xsl:attribute>
48 <xsl:attribute name=
"font-style">italic
</xsl:attribute>
51 <xsl:attribute-set name=
"abstract.title.properties" >
52 <xsl:attribute name=
"font-size">18pt
</xsl:attribute>
53 <xsl:attribute name=
"space-before.conditionality">retain
</xsl:attribute>
55 <xsl:attribute-set name=
"formal.object.properties">
56 <xsl:attribute name=
"keep-together.within-column">always
</xsl:attribute>
58 <xsl:attribute-set name=
"table.table.properties">
59 <xsl:attribute name=
"keep-together.within-column">always
</xsl:attribute>
63 <xsl:template match=
"d:article">
64 <xsl:variable name=
"id">
65 <xsl:call-template name=
"object.id"/>
68 <xsl:call-template name=
"page.sequence">
69 <xsl:with-param name=
"master-reference">titlepage
</xsl:with-param>
70 <xsl:with-param name=
"content">
72 xsl:
use-attribute-sets=
"component.titlepage.properties">
73 <xsl:call-template name=
"article.titlepage"/>
75 <fo:block break-after=
"page"/>
79 <xsl:call-template name=
"make.article.tocs"/>
82 <xsl:call-template name=
"page.sequence">
83 <xsl:with-param name=
"master-reference">body
</xsl:with-param>
84 <xsl:with-param name=
"content">
86 select=
"*[not(self::bibliography)]|processing-instruction()"/>
90 <xsl:if test=
"d:bibliography">
91 <xsl:call-template name=
"page.sequence">
92 <xsl:with-param name=
"master-reference">back
</xsl:with-param>
93 <xsl:with-param name=
"content">
94 <xsl:apply-templates select=
"bibliography"/>
102 <xsl:template name=
"page.number.format">
103 <xsl:param name=
"element" select=
"local-name(.)"/>
104 <xsl:param name=
"master-reference" select=
"''"/>
105 <xsl:if test=
"$debug != ''">
109 <xsl:when test=
"$element = 'toc'">i
</xsl:when>
110 <xsl:when test=
"$element = 'preface'">i
</xsl:when>
111 <xsl:when test=
"$element = 'dedication'">i
</xsl:when>
112 <xsl:otherwise>1</xsl:otherwise>
117 <xsl:attribute-set name=
"toc.line.properties">
118 <xsl:attribute name=
"text-align-last">justify
</xsl:attribute>
119 <xsl:attribute name=
"text-align">inherit
</xsl:attribute>
122 <xsl:template name=
"header.content_">
123 <xsl:param name=
"pageclass" select=
"''"/>
124 <xsl:param name=
"sequence" select=
"''"/>
125 <xsl:param name=
"position" select=
"''"/>
126 <xsl:param name=
"gentext-key" select=
"''"/>
128 <xsl:when test=
"$pageclass = 'body' and $position = 'left'">
129 <fo:block text-align=
"center">
130 <xsl:apply-templates select=
"." mode=
"title.markup"/>
133 <xsl:when test=
"$pageclass = 'long.table' and $position = 'left'">
134 <fo:block text-align=
"center">
135 <xsl:text>Executive Report
</xsl:text>
138 <xsl:when test=
"$pageclass = 'long.table' and $position = 'after-rule' and ($sequence = 'even' or $sequence = 'odd') ">
139 <fo:block space-before=
"10pt">
140 <xsl:apply-templates select=
"self::d:table|descendant::d:table[1]" mode=
"object.title.markup"/>
141 <xsl:text> (cont.)
</xsl:text>
147 <xsl:template name=
"table.row.properties">
148 <xsl:variable name=
"role" select=
"ancestor::d:table/@role"/>
150 <xsl:variable name=
"tabstyle">
151 <xsl:call-template name=
"tabstyle"/>
154 <xsl:variable name=
"bgcolor">
155 <xsl:call-template name=
"dbfo-attribute">
156 <xsl:with-param name=
"pis" select=
"processing-instruction('dbfo')"/>
157 <xsl:with-param name=
"attribute" select=
"'bgcolor'"/>
161 <xsl:variable name=
"rownum">
162 <xsl:number from=
"tgroup" count=
"row"/>
166 <xsl:if test="$role != 'receive-hours' and $role !=
167 'long-metrics' and $role != 'cutover-costs'">
168 <xsl:value-of select="$role"/>
176 <xsl:when test=
"@role = 'continuation-label'">
179 <xsl:when test=
"parent::d:tfoot">
180 <xsl:attribute name=
"border-before-style">solid
</xsl:attribute>
181 <xsl:attribute name=
"border-before-width">1</xsl:attribute>
183 <xsl:when test=
"parent::d:thead">
184 <xsl:attribute name=
"border-after-style">solid
</xsl:attribute>
185 <xsl:attribute name=
"border-after-width">1</xsl:attribute>
187 <xsl:when test=
"position() = last() and ($role='receive-hours' or
188 $role = 'cutover-costs' or $role = 'projected-summary')">
189 <xsl:attribute name=
"border-before-style">solid
</xsl:attribute>
190 <xsl:attribute name=
"border-before-width">1</xsl:attribute>
191 <xsl:attribute name=
"font-weight">bold
</xsl:attribute>
197 <xsl:template name=
"table.layout">
198 <xsl:param name=
"table.content" select=
"NOTANODE"/>
200 <xsl:when test=
"@role='overall-costs'">
201 <fo:table table-layout=
"fixed" width=
"100%">
202 <fo:table-column column-width=
"proportional-column-width(1)"/>
205 <fo:table-cell display-align=
"center">
206 <xsl:copy-of select=
"$table.content"/>
212 <xsl:when test=
"@role = 'overall-costs_'">
213 <fo:table table-layout=
"fixed" width=
"100%">
214 <fo:table-column column-width=
"proportional-column-width(1)"/>
215 <fo:table-column column-width=
"100mm"/>
216 <fo:table-column column-width=
"proportional-column-width(1)"/>
219 <fo:table-cell column-number=
"2">
220 <xsl:copy-of select=
"$table.content"/>
227 <xsl:copy-of select=
"$table.content"/>
233 <!--STANDARD STUFF-->
235 <xsl:template match=
"processing-instruction('hard-pagebreak')">
236 <fo:block break-after='page'
/>
239 <xsl:template name=
"make.article.tocs">
240 <xsl:variable name=
"lot-master-reference">
241 <xsl:call-template name=
"select.pagemaster">
242 <xsl:with-param name=
"pageclass" select=
"'lot'"/>
246 <xsl:variable name=
"toc.params">
247 <xsl:call-template name=
"find.path.params">
248 <xsl:with-param name=
"table" select=
"normalize-space($generate.toc)"/>
252 <xsl:if test=
"contains($toc.params, 'toc')">
253 <xsl:call-template name=
"page.sequence">
254 <xsl:with-param name=
"master-reference"
255 select=
"$lot-master-reference"/>
256 <xsl:with-param name=
"element" select=
"'toc'"/>
257 <xsl:with-param name=
"gentext-key" select=
"'TableofContents'"/>
258 <xsl:with-param name=
"initial-page-number" select=
"1"/>
259 <xsl:with-param name=
"content">
260 <xsl:call-template name=
"component.toc">
261 <xsl:with-param name=
"toc.title.p"
262 select=
"contains($toc.params, 'title')"/>
269 <xsl:if test=
"contains($toc.params,'figure') and .//d:figure">
270 <xsl:call-template name=
"page.sequence">
271 <xsl:with-param name=
"master-reference"
272 select=
"$lot-master-reference"/>
273 <xsl:with-param name=
"element" select=
"'toc'"/>
274 <xsl:with-param name=
"gentext-key" select=
"'ListofFigures'"/>
275 <xsl:with-param name=
"initial.page.number" select=
"''"/>
276 <xsl:with-param name=
"content">
277 <xsl:call-template name=
"list.of.titles">
278 <xsl:with-param name=
"titles" select=
"'figure'"/>
279 <xsl:with-param name=
"nodes" select=
".//d:figure"/>
285 <xsl:if test=
"contains($toc.params,'table') and .//d:table">
286 <xsl:call-template name=
"page.sequence">
287 <xsl:with-param name=
"master-reference"
288 select=
"$lot-master-reference"/>
289 <xsl:with-param name=
"element" select=
"'toc'"/>
290 <xsl:with-param name=
"gentext-key" select=
"'ListofTables'"/>
291 <xsl:with-param name=
"content">
292 <xsl:call-template name=
"list.of.titles">
293 <xsl:with-param name=
"titles" select=
"'table'"/>
294 <xsl:with-param name=
"nodes" select=
".//d:table"/>
300 <xsl:if test=
"contains($toc.params,'example') and .//d:example">
301 <xsl:call-template name=
"page.sequence">
302 <xsl:with-param name=
"master-reference"
303 select=
"$lot-master-reference"/>
304 <xsl:with-param name=
"element" select=
"'toc'"/>
305 <xsl:with-param name=
"gentext-key" select=
"'ListofExample'"/>
306 <xsl:with-param name=
"content">
307 <xsl:call-template name=
"list.of.titles">
308 <xsl:with-param name=
"titles" select=
"'example'"/>
309 <xsl:with-param name=
"nodes" select=
".//d:example"/>
315 <xsl:if test=
"contains($toc.params,'equation') and
316 .//d:equation[d:title or d:info/d:title]">
317 <xsl:call-template name=
"page.sequence">
318 <xsl:with-param name=
"master-reference"
319 select=
"$lot-master-reference"/>
320 <xsl:with-param name=
"element" select=
"'toc'"/>
321 <xsl:with-param name=
"gentext-key" select=
"'ListofEquations'"/>
322 <xsl:with-param name=
"content">
323 <xsl:call-template name=
"list.of.titles">
324 <xsl:with-param name=
"titles" select=
"'equation'"/>
325 <xsl:with-param name=
"nodes"
326 select=
".//d:equation[d:title or d:info/d:title]"/>
332 <xsl:if test=
"contains($toc.params,'procedure') and
333 .//d:procedure[d:title or d:info/d:title]">
334 <xsl:call-template name=
"page.sequence">
335 <xsl:with-param name=
"master-reference"
336 select=
"$lot-master-reference"/>
337 <xsl:with-param name=
"element" select=
"'toc'"/>
338 <xsl:with-param name=
"gentext-key" select=
"'ListofProcedures'"/>
339 <xsl:with-param name=
"content">
340 <xsl:call-template name=
"list.of.titles">
341 <xsl:with-param name=
"titles" select=
"'procedure'"/>
342 <xsl:with-param name=
"nodes"
343 select=
".//d:procedure[d:title or d:info/d:title]"/>
352 <xsl:template name=
"calsTable">
354 <xsl:variable name=
"keep.together">
355 <xsl:call-template name=
"pi.dbfo_keep-together"/>
358 <xsl:for-each select=
"d:tgroup">
360 <fo:table xsl:
use-attribute-sets=
"table.table.properties">
361 <xsl:if test=
"$keep.together != ''">
362 <xsl:attribute name=
"keep-together.within-column">
363 <xsl:value-of select=
"$keep.together"/>
366 <xsl:call-template name=
"table.frame"/>
367 <xsl:if test=
"following-sibling::d:tgroup">
368 <xsl:attribute name=
"border-bottom-width">0pt
</xsl:attribute>
369 <xsl:attribute name=
"border-bottom-style">none
</xsl:attribute>
370 <xsl:attribute name=
"padding-bottom">0pt
</xsl:attribute>
371 <xsl:attribute name=
"margin-bottom">0pt
</xsl:attribute>
372 <xsl:attribute name=
"space-after">0pt
</xsl:attribute>
373 <xsl:attribute name=
"space-after.minimum">0pt
</xsl:attribute>
374 <xsl:attribute name=
"space-after.optimum">0pt
</xsl:attribute>
375 <xsl:attribute name=
"space-after.maximum">0pt
</xsl:attribute>
377 <xsl:if test=
"preceding-sibling::d:tgroup">
378 <xsl:attribute name=
"border-top-width">0pt
</xsl:attribute>
379 <xsl:attribute name=
"border-top-style">none
</xsl:attribute>
380 <xsl:attribute name=
"padding-top">0pt
</xsl:attribute>
381 <xsl:attribute name=
"margin-top">0pt
</xsl:attribute>
382 <xsl:attribute name=
"space-before">0pt
</xsl:attribute>
383 <xsl:attribute name=
"space-before.minimum">0pt
</xsl:attribute>
384 <xsl:attribute name=
"space-before.optimum">0pt
</xsl:attribute>
385 <xsl:attribute name=
"space-before.maximum">0pt
</xsl:attribute>
388 <xsl:apply-templates select=
"."/>
391 <xsl:for-each select=
"d:mediaobject|d:graphic">
392 <xsl:apply-templates select=
"."/>
396 <xsl:apply-templates select=
"d:caption"/>
399 <xsl:template match=
"d:caption">
400 <fo:block xsl:
use-attribute-sets=
"table.caption">
401 <xsl:attribute name=
"keep-together.within-column">always
</xsl:attribute>
402 <xsl:apply-templates/>
407 match=
"d:para[../../@role='continuation-label']" priority=
"2">
408 <xsl:for-each select=
"preceding::d:table[1]">
410 <xsl:apply-templates select=
"self::d:table" mode=
"object.title.markup"/>
411 <xsl:text > (cont.)
</xsl:text>