| 1 |
<?xml version='1.0'?> |
| 2 |
<xsl:stylesheet exclude-result-prefixes="d" |
| 3 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 4 |
xmlns:d="http://docbook.org/ns/docbook" |
| 5 |
xmlns:fo="http://www.w3.org/1999/XSL/Format" |
| 6 |
xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" |
| 7 |
version='1.0'> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
<xsl:template name="division.title"> |
| 20 |
<xsl:param name="node" select="."/> |
| 21 |
<xsl:variable name="id"> |
| 22 |
<xsl:call-template name="object.id"> |
| 23 |
<xsl:with-param name="object" select="$node"/> |
| 24 |
</xsl:call-template> |
| 25 |
</xsl:variable> |
| 26 |
<xsl:variable name="title"> |
| 27 |
<xsl:apply-templates select="$node" mode="object.title.markup"> |
| 28 |
<xsl:with-param name="allow-anchors" select="1"/> |
| 29 |
</xsl:apply-templates> |
| 30 |
</xsl:variable> |
| 31 |
|
| 32 |
<fo:block keep-with-next.within-column="always" |
| 33 |
hyphenate="false"> |
| 34 |
<xsl:if test="$axf.extensions != 0 and |
| 35 |
$xsl1.1.bookmarks = 0 and |
| 36 |
$show.bookmarks != 0"> |
| 37 |
<xsl:attribute name="axf:outline-level"> |
| 38 |
<xsl:choose> |
| 39 |
<xsl:when test="count($node/ancestor::*) > 0"> |
| 40 |
<xsl:value-of select="count($node/ancestor::*)"/> |
| 41 |
</xsl:when> |
| 42 |
<xsl:otherwise>1</xsl:otherwise> |
| 43 |
</xsl:choose> |
| 44 |
</xsl:attribute> |
| 45 |
<xsl:attribute name="axf:outline-expand">false</xsl:attribute> |
| 46 |
<xsl:attribute name="axf:outline-title"> |
| 47 |
<xsl:value-of select="normalize-space($title)"/> |
| 48 |
</xsl:attribute> |
| 49 |
</xsl:if> |
| 50 |
<xsl:copy-of select="$title"/> |
| 51 |
</fo:block> |
| 52 |
</xsl:template> |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
<xsl:template match="d:set"> |
| 57 |
<xsl:variable name="id"> |
| 58 |
<xsl:call-template name="object.id"/> |
| 59 |
</xsl:variable> |
| 60 |
|
| 61 |
<xsl:variable name="preamble" |
| 62 |
select="*[not(self::d:book or self::d:set or self::d:setindex)]"/> |
| 63 |
|
| 64 |
<xsl:variable name="content" select="d:book|d:set|d:setindex"/> |
| 65 |
|
| 66 |
<xsl:variable name="titlepage-master-reference"> |
| 67 |
<xsl:call-template name="select.pagemaster"> |
| 68 |
<xsl:with-param name="pageclass" select="'titlepage'"/> |
| 69 |
</xsl:call-template> |
| 70 |
</xsl:variable> |
| 71 |
|
| 72 |
<xsl:variable name="lot-master-reference"> |
| 73 |
<xsl:call-template name="select.pagemaster"> |
| 74 |
<xsl:with-param name="pageclass" select="'lot'"/> |
| 75 |
</xsl:call-template> |
| 76 |
</xsl:variable> |
| 77 |
|
| 78 |
<xsl:if test="$preamble"> |
| 79 |
<fo:page-sequence hyphenate="{$hyphenate}" |
| 80 |
master-reference="{$titlepage-master-reference}"> |
| 81 |
<xsl:attribute name="language"> |
| 82 |
<xsl:call-template name="l10n.language"/> |
| 83 |
</xsl:attribute> |
| 84 |
<xsl:attribute name="format"> |
| 85 |
<xsl:call-template name="page.number.format"> |
| 86 |
<xsl:with-param name="master-reference" |
| 87 |
select="$titlepage-master-reference"/> |
| 88 |
</xsl:call-template> |
| 89 |
</xsl:attribute> |
| 90 |
|
| 91 |
<xsl:attribute name="initial-page-number"> |
| 92 |
<xsl:call-template name="initial.page.number"> |
| 93 |
<xsl:with-param name="master-reference" |
| 94 |
select="$titlepage-master-reference"/> |
| 95 |
</xsl:call-template> |
| 96 |
</xsl:attribute> |
| 97 |
|
| 98 |
<xsl:attribute name="force-page-count"> |
| 99 |
<xsl:call-template name="force.page.count"> |
| 100 |
<xsl:with-param name="master-reference" |
| 101 |
select="$titlepage-master-reference"/> |
| 102 |
</xsl:call-template> |
| 103 |
</xsl:attribute> |
| 104 |
|
| 105 |
<xsl:attribute name="hyphenation-character"> |
| 106 |
<xsl:call-template name="gentext"> |
| 107 |
<xsl:with-param name="key" select="'hyphenation-character'"/> |
| 108 |
</xsl:call-template> |
| 109 |
</xsl:attribute> |
| 110 |
<xsl:attribute name="hyphenation-push-character-count"> |
| 111 |
<xsl:call-template name="gentext"> |
| 112 |
<xsl:with-param name="key" select="'hyphenation-push-character-count'"/> |
| 113 |
</xsl:call-template> |
| 114 |
</xsl:attribute> |
| 115 |
<xsl:attribute name="hyphenation-remain-character-count"> |
| 116 |
<xsl:call-template name="gentext"> |
| 117 |
<xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> |
| 118 |
</xsl:call-template> |
| 119 |
</xsl:attribute> |
| 120 |
|
| 121 |
<xsl:apply-templates select="." mode="running.head.mode"> |
| 122 |
<xsl:with-param name="master-reference" select="$titlepage-master-reference"/> |
| 123 |
</xsl:apply-templates> |
| 124 |
|
| 125 |
<xsl:apply-templates select="." mode="running.foot.mode"> |
| 126 |
<xsl:with-param name="master-reference" select="$titlepage-master-reference"/> |
| 127 |
</xsl:apply-templates> |
| 128 |
|
| 129 |
<fo:flow flow-name="xsl-region-body"> |
| 130 |
<xsl:call-template name="set.flow.properties"> |
| 131 |
<xsl:with-param name="element" select="local-name(.)"/> |
| 132 |
<xsl:with-param name="master-reference" |
| 133 |
select="$titlepage-master-reference"/> |
| 134 |
</xsl:call-template> |
| 135 |
|
| 136 |
<fo:block id="{$id}"> |
| 137 |
<xsl:call-template name="set.titlepage"/> |
| 138 |
</fo:block> |
| 139 |
</fo:flow> |
| 140 |
</fo:page-sequence> |
| 141 |
</xsl:if> |
| 142 |
|
| 143 |
<xsl:variable name="toc.params"> |
| 144 |
<xsl:call-template name="find.path.params"> |
| 145 |
<xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 146 |
</xsl:call-template> |
| 147 |
</xsl:variable> |
| 148 |
|
| 149 |
<xsl:if test="contains($toc.params, 'toc')"> |
| 150 |
<fo:page-sequence hyphenate="{$hyphenate}" |
| 151 |
master-reference="{$lot-master-reference}"> |
| 152 |
<xsl:attribute name="language"> |
| 153 |
<xsl:call-template name="l10n.language"/> |
| 154 |
</xsl:attribute> |
| 155 |
<xsl:attribute name="format"> |
| 156 |
<xsl:call-template name="page.number.format"> |
| 157 |
<xsl:with-param name="element" select="'toc'"/> |
| 158 |
<xsl:with-param name="master-reference" |
| 159 |
select="$lot-master-reference"/> |
| 160 |
</xsl:call-template> |
| 161 |
</xsl:attribute> |
| 162 |
<xsl:attribute name="initial-page-number"> |
| 163 |
<xsl:call-template name="initial.page.number"> |
| 164 |
<xsl:with-param name="master-reference" |
| 165 |
select="$lot-master-reference"/> |
| 166 |
</xsl:call-template> |
| 167 |
</xsl:attribute> |
| 168 |
<xsl:attribute name="force-page-count"> |
| 169 |
<xsl:call-template name="force.page.count"> |
| 170 |
<xsl:with-param name="master-reference" |
| 171 |
select="$lot-master-reference"/> |
| 172 |
</xsl:call-template> |
| 173 |
</xsl:attribute> |
| 174 |
|
| 175 |
<xsl:attribute name="hyphenation-character"> |
| 176 |
<xsl:call-template name="gentext"> |
| 177 |
<xsl:with-param name="key" select="'hyphenation-character'"/> |
| 178 |
</xsl:call-template> |
| 179 |
</xsl:attribute> |
| 180 |
<xsl:attribute name="hyphenation-push-character-count"> |
| 181 |
<xsl:call-template name="gentext"> |
| 182 |
<xsl:with-param name="key" select="'hyphenation-push-character-count'"/> |
| 183 |
</xsl:call-template> |
| 184 |
</xsl:attribute> |
| 185 |
<xsl:attribute name="hyphenation-remain-character-count"> |
| 186 |
<xsl:call-template name="gentext"> |
| 187 |
<xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> |
| 188 |
</xsl:call-template> |
| 189 |
</xsl:attribute> |
| 190 |
|
| 191 |
<xsl:apply-templates select="." mode="running.head.mode"> |
| 192 |
<xsl:with-param name="master-reference" select="$lot-master-reference"/> |
| 193 |
</xsl:apply-templates> |
| 194 |
|
| 195 |
<xsl:apply-templates select="." mode="running.foot.mode"> |
| 196 |
<xsl:with-param name="master-reference" select="$lot-master-reference"/> |
| 197 |
</xsl:apply-templates> |
| 198 |
|
| 199 |
<fo:flow flow-name="xsl-region-body"> |
| 200 |
<xsl:call-template name="set.flow.properties"> |
| 201 |
<xsl:with-param name="element" select="local-name(.)"/> |
| 202 |
<xsl:with-param name="master-reference" |
| 203 |
select="$lot-master-reference"/> |
| 204 |
</xsl:call-template> |
| 205 |
|
| 206 |
<xsl:call-template name="set.toc"/> |
| 207 |
</fo:flow> |
| 208 |
</fo:page-sequence> |
| 209 |
</xsl:if> |
| 210 |
|
| 211 |
<xsl:apply-templates select="$content"/> |
| 212 |
</xsl:template> |
| 213 |
|
| 214 |
<xsl:template match="d:set/d:setinfo"></xsl:template> |
| 215 |
<xsl:template match="d:set/d:title"></xsl:template> |
| 216 |
<xsl:template match="d:set/d:subtitle"></xsl:template> |
| 217 |
<xsl:template match="d:set/d:titleabbrev"></xsl:template> |
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
<xsl:template match="d:book"> |
| 222 |
<xsl:variable name="id"> |
| 223 |
<xsl:call-template name="object.id"/> |
| 224 |
</xsl:variable> |
| 225 |
|
| 226 |
<xsl:variable name="preamble" |
| 227 |
select="d:title|d:subtitle|d:titleabbrev|d:bookinfo|d:info"/> |
| 228 |
|
| 229 |
<xsl:variable name="content" |
| 230 |
select="node()[not(self::d:title or self::d:subtitle |
| 231 |
or self::d:titleabbrev |
| 232 |
or self::d:info |
| 233 |
or self::d:bookinfo)]"/> |
| 234 |
|
| 235 |
<xsl:variable name="titlepage-master-reference"> |
| 236 |
<xsl:call-template name="select.pagemaster"> |
| 237 |
<xsl:with-param name="pageclass" select="'titlepage'"/> |
| 238 |
</xsl:call-template> |
| 239 |
</xsl:variable> |
| 240 |
|
| 241 |
<xsl:call-template name="front.cover"/> |
| 242 |
|
| 243 |
<xsl:if test="$preamble"> |
| 244 |
<xsl:call-template name="page.sequence"> |
| 245 |
<xsl:with-param name="master-reference" |
| 246 |
select="$titlepage-master-reference"/> |
| 247 |
<xsl:with-param name="content"> |
| 248 |
<fo:block id="{$id}"> |
| 249 |
<xsl:call-template name="book.titlepage"/> |
| 250 |
</fo:block> |
| 251 |
</xsl:with-param> |
| 252 |
</xsl:call-template> |
| 253 |
</xsl:if> |
| 254 |
|
| 255 |
<xsl:apply-templates select="d:dedication" mode="dedication"/> |
| 256 |
<xsl:apply-templates select="d:acknowledgements" mode="acknowledgements"/> |
| 257 |
|
| 258 |
<xsl:call-template name="make.book.tocs"/> |
| 259 |
|
| 260 |
<xsl:apply-templates select="$content"/> |
| 261 |
|
| 262 |
<xsl:call-template name="back.cover"/> |
| 263 |
|
| 264 |
</xsl:template> |
| 265 |
|
| 266 |
<xsl:template match="d:book/d:bookinfo"></xsl:template> |
| 267 |
<xsl:template match="d:book/d:info"></xsl:template> |
| 268 |
<xsl:template match="d:book/d:title"></xsl:template> |
| 269 |
<xsl:template match="d:book/d:subtitle"></xsl:template> |
| 270 |
<xsl:template match="d:book/d:titleabbrev"></xsl:template> |
| 271 |
|
| 272 |
|
| 273 |
<xsl:template name="front.cover"/> |
| 274 |
<xsl:template name="back.cover"/> |
| 275 |
|
| 276 |
|
| 277 |
<xsl:template name="make.book.tocs"> |
| 278 |
|
| 279 |
<xsl:variable name="lot-master-reference"> |
| 280 |
<xsl:call-template name="select.pagemaster"> |
| 281 |
<xsl:with-param name="pageclass" select="'lot'"/> |
| 282 |
</xsl:call-template> |
| 283 |
</xsl:variable> |
| 284 |
|
| 285 |
<xsl:variable name="toc.params"> |
| 286 |
<xsl:call-template name="find.path.params"> |
| 287 |
<xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 288 |
</xsl:call-template> |
| 289 |
</xsl:variable> |
| 290 |
|
| 291 |
<xsl:if test="contains($toc.params, 'toc')"> |
| 292 |
<xsl:call-template name="page.sequence"> |
| 293 |
<xsl:with-param name="master-reference" |
| 294 |
select="$lot-master-reference"/> |
| 295 |
<xsl:with-param name="element" select="'toc'"/> |
| 296 |
<xsl:with-param name="gentext-key" select="'TableofContents'"/> |
| 297 |
<xsl:with-param name="content"> |
| 298 |
<xsl:call-template name="division.toc"> |
| 299 |
<xsl:with-param name="toc.title.p" |
| 300 |
select="contains($toc.params, 'title')"/> |
| 301 |
</xsl:call-template> |
| 302 |
</xsl:with-param> |
| 303 |
</xsl:call-template> |
| 304 |
</xsl:if> |
| 305 |
|
| 306 |
<xsl:if test="contains($toc.params,'figure') and .//d:figure"> |
| 307 |
<xsl:call-template name="page.sequence"> |
| 308 |
<xsl:with-param name="master-reference" |
| 309 |
select="$lot-master-reference"/> |
| 310 |
<xsl:with-param name="element" select="'toc'"/> |
| 311 |
<xsl:with-param name="gentext-key" select="'ListofFigures'"/> |
| 312 |
<xsl:with-param name="content"> |
| 313 |
<xsl:call-template name="list.of.titles"> |
| 314 |
<xsl:with-param name="titles" select="'figure'"/> |
| 315 |
<xsl:with-param name="nodes" select=".//d:figure"/> |
| 316 |
</xsl:call-template> |
| 317 |
</xsl:with-param> |
| 318 |
</xsl:call-template> |
| 319 |
</xsl:if> |
| 320 |
|
| 321 |
<xsl:if test="contains($toc.params,'table') and .//d:table"> |
| 322 |
<xsl:call-template name="page.sequence"> |
| 323 |
<xsl:with-param name="master-reference" |
| 324 |
select="$lot-master-reference"/> |
| 325 |
<xsl:with-param name="element" select="'toc'"/> |
| 326 |
<xsl:with-param name="gentext-key" select="'ListofTables'"/> |
| 327 |
<xsl:with-param name="content"> |
| 328 |
<xsl:call-template name="list.of.titles"> |
| 329 |
<xsl:with-param name="titles" select="'table'"/> |
| 330 |
<xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/> |
| 331 |
</xsl:call-template> |
| 332 |
</xsl:with-param> |
| 333 |
</xsl:call-template> |
| 334 |
</xsl:if> |
| 335 |
|
| 336 |
<xsl:if test="contains($toc.params,'example') and .//d:example"> |
| 337 |
<xsl:call-template name="page.sequence"> |
| 338 |
<xsl:with-param name="master-reference" |
| 339 |
select="$lot-master-reference"/> |
| 340 |
<xsl:with-param name="element" select="'toc'"/> |
| 341 |
<xsl:with-param name="gentext-key" select="'ListofExample'"/> |
| 342 |
<xsl:with-param name="content"> |
| 343 |
<xsl:call-template name="list.of.titles"> |
| 344 |
<xsl:with-param name="titles" select="'example'"/> |
| 345 |
<xsl:with-param name="nodes" select=".//d:example"/> |
| 346 |
</xsl:call-template> |
| 347 |
</xsl:with-param> |
| 348 |
</xsl:call-template> |
| 349 |
</xsl:if> |
| 350 |
|
| 351 |
<xsl:if test="contains($toc.params,'equation') and |
| 352 |
.//d:equation[d:title or d:info/d:title]"> |
| 353 |
<xsl:call-template name="page.sequence"> |
| 354 |
<xsl:with-param name="master-reference" |
| 355 |
select="$lot-master-reference"/> |
| 356 |
<xsl:with-param name="element" select="'toc'"/> |
| 357 |
<xsl:with-param name="gentext-key" select="'ListofEquations'"/> |
| 358 |
<xsl:with-param name="content"> |
| 359 |
<xsl:call-template name="list.of.titles"> |
| 360 |
<xsl:with-param name="titles" select="'equation'"/> |
| 361 |
<xsl:with-param name="nodes" |
| 362 |
select=".//d:equation[d:title or d:info/d:title]"/> |
| 363 |
</xsl:call-template> |
| 364 |
</xsl:with-param> |
| 365 |
</xsl:call-template> |
| 366 |
</xsl:if> |
| 367 |
|
| 368 |
<xsl:if test="contains($toc.params,'procedure') and |
| 369 |
.//d:procedure[d:title or d:info/d:title]"> |
| 370 |
<xsl:call-template name="page.sequence"> |
| 371 |
<xsl:with-param name="master-reference" |
| 372 |
select="$lot-master-reference"/> |
| 373 |
<xsl:with-param name="element" select="'toc'"/> |
| 374 |
<xsl:with-param name="gentext-key" select="'ListofProcedures'"/> |
| 375 |
<xsl:with-param name="content"> |
| 376 |
<xsl:call-template name="list.of.titles"> |
| 377 |
<xsl:with-param name="titles" select="'procedure'"/> |
| 378 |
<xsl:with-param name="nodes" |
| 379 |
select=".//d:procedure[d:title or d:info/d:title]"/> |
| 380 |
</xsl:call-template> |
| 381 |
</xsl:with-param> |
| 382 |
</xsl:call-template> |
| 383 |
</xsl:if> |
| 384 |
</xsl:template> |
| 385 |
|
| 386 |
|
| 387 |
<xsl:template match="d:part"> |
| 388 |
<xsl:if test="not(d:partintro)"> |
| 389 |
<xsl:apply-templates select="." mode="part.titlepage.mode"/> |
| 390 |
<xsl:call-template name="generate.part.toc"/> |
| 391 |
</xsl:if> |
| 392 |
<xsl:apply-templates/> |
| 393 |
</xsl:template> |
| 394 |
|
| 395 |
<xsl:template match="d:part" mode="part.titlepage.mode"> |
| 396 |
|
| 397 |
<xsl:param name="additional.content"/> |
| 398 |
|
| 399 |
<xsl:variable name="id"> |
| 400 |
<xsl:call-template name="object.id"/> |
| 401 |
</xsl:variable> |
| 402 |
|
| 403 |
<xsl:variable name="titlepage-master-reference"> |
| 404 |
<xsl:call-template name="select.pagemaster"> |
| 405 |
<xsl:with-param name="pageclass" select="'titlepage'"/> |
| 406 |
</xsl:call-template> |
| 407 |
</xsl:variable> |
| 408 |
|
| 409 |
<fo:page-sequence hyphenate="{$hyphenate}" |
| 410 |
master-reference="{$titlepage-master-reference}"> |
| 411 |
<xsl:attribute name="language"> |
| 412 |
<xsl:call-template name="l10n.language"/> |
| 413 |
</xsl:attribute> |
| 414 |
<xsl:attribute name="format"> |
| 415 |
<xsl:call-template name="page.number.format"> |
| 416 |
<xsl:with-param name="master-reference" |
| 417 |
select="$titlepage-master-reference"/> |
| 418 |
</xsl:call-template> |
| 419 |
</xsl:attribute> |
| 420 |
|
| 421 |
<xsl:attribute name="initial-page-number"> |
| 422 |
<xsl:call-template name="initial.page.number"> |
| 423 |
<xsl:with-param name="master-reference" |
| 424 |
select="$titlepage-master-reference"/> |
| 425 |
</xsl:call-template> |
| 426 |
</xsl:attribute> |
| 427 |
|
| 428 |
<xsl:attribute name="force-page-count"> |
| 429 |
<xsl:call-template name="force.page.count"> |
| 430 |
<xsl:with-param name="master-reference" |
| 431 |
select="$titlepage-master-reference"/> |
| 432 |
</xsl:call-template> |
| 433 |
</xsl:attribute> |
| 434 |
|
| 435 |
<xsl:attribute name="hyphenation-character"> |
| 436 |
<xsl:call-template name="gentext"> |
| 437 |
<xsl:with-param name="key" select="'hyphenation-character'"/> |
| 438 |
</xsl:call-template> |
| 439 |
</xsl:attribute> |
| 440 |
<xsl:attribute name="hyphenation-push-character-count"> |
| 441 |
<xsl:call-template name="gentext"> |
| 442 |
<xsl:with-param name="key" select="'hyphenation-push-character-count'"/> |
| 443 |
</xsl:call-template> |
| 444 |
</xsl:attribute> |
| 445 |
<xsl:attribute name="hyphenation-remain-character-count"> |
| 446 |
<xsl:call-template name="gentext"> |
| 447 |
<xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> |
| 448 |
</xsl:call-template> |
| 449 |
</xsl:attribute> |
| 450 |
|
| 451 |
<xsl:apply-templates select="." mode="running.head.mode"> |
| 452 |
<xsl:with-param name="master-reference" select="$titlepage-master-reference"/> |
| 453 |
</xsl:apply-templates> |
| 454 |
|
| 455 |
<xsl:apply-templates select="." mode="running.foot.mode"> |
| 456 |
<xsl:with-param name="master-reference" select="$titlepage-master-reference"/> |
| 457 |
</xsl:apply-templates> |
| 458 |
|
| 459 |
<fo:flow flow-name="xsl-region-body"> |
| 460 |
<xsl:call-template name="set.flow.properties"> |
| 461 |
<xsl:with-param name="element" select="local-name(.)"/> |
| 462 |
<xsl:with-param name="master-reference" |
| 463 |
select="$titlepage-master-reference"/> |
| 464 |
</xsl:call-template> |
| 465 |
|
| 466 |
<fo:block id="{$id}"> |
| 467 |
<xsl:call-template name="part.titlepage"/> |
| 468 |
</fo:block> |
| 469 |
<xsl:copy-of select="$additional.content"/> |
| 470 |
</fo:flow> |
| 471 |
</fo:page-sequence> |
| 472 |
</xsl:template> |
| 473 |
|
| 474 |
<xsl:template match="d:part/d:docinfo|d:partinfo"></xsl:template> |
| 475 |
<xsl:template match="d:part/d:info"></xsl:template> |
| 476 |
<xsl:template match="d:part/d:title"></xsl:template> |
| 477 |
<xsl:template match="d:part/d:subtitle"></xsl:template> |
| 478 |
<xsl:template match="d:part/d:titleabbrev"></xsl:template> |
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
<xsl:template name="generate.part.toc"> |
| 483 |
<xsl:param name="part" select="."/> |
| 484 |
|
| 485 |
<xsl:variable name="lot-master-reference"> |
| 486 |
<xsl:call-template name="select.pagemaster"> |
| 487 |
<xsl:with-param name="pageclass" select="'lot'"/> |
| 488 |
</xsl:call-template> |
| 489 |
</xsl:variable> |
| 490 |
|
| 491 |
<xsl:variable name="toc.params"> |
| 492 |
<xsl:call-template name="find.path.params"> |
| 493 |
<xsl:with-param name="node" select="$part"/> |
| 494 |
<xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 495 |
</xsl:call-template> |
| 496 |
</xsl:variable> |
| 497 |
|
| 498 |
<xsl:variable name="nodes" select="$part/d:reference| |
| 499 |
$part/d:preface| |
| 500 |
$part/d:chapter| |
| 501 |
$part/d:appendix| |
| 502 |
$part/d:article| |
| 503 |
$part/d:bibliography| |
| 504 |
$part/d:glossary| |
| 505 |
$part/d:index"/> |
| 506 |
|
| 507 |
<xsl:if test="count($nodes) > 0 and contains($toc.params, 'toc')"> |
| 508 |
<fo:page-sequence hyphenate="{$hyphenate}" |
| 509 |
master-reference="{$lot-master-reference}"> |
| 510 |
<xsl:attribute name="language"> |
| 511 |
<xsl:call-template name="l10n.language"/> |
| 512 |
</xsl:attribute> |
| 513 |
<xsl:attribute name="format"> |
| 514 |
<xsl:call-template name="page.number.format"> |
| 515 |
<xsl:with-param name="element" select="'toc'"/> |
| 516 |
<xsl:with-param name="master-reference" |
| 517 |
select="$lot-master-reference"/> |
| 518 |
</xsl:call-template> |
| 519 |
</xsl:attribute> |
| 520 |
<xsl:attribute name="initial-page-number"> |
| 521 |
<xsl:call-template name="initial.page.number"> |
| 522 |
<xsl:with-param name="element" select="'toc'"/> |
| 523 |
<xsl:with-param name="master-reference" |
| 524 |
select="$lot-master-reference"/> |
| 525 |
</xsl:call-template> |
| 526 |
</xsl:attribute> |
| 527 |
<xsl:attribute name="force-page-count"> |
| 528 |
<xsl:call-template name="force.page.count"> |
| 529 |
<xsl:with-param name="master-reference" |
| 530 |
select="$lot-master-reference"/> |
| 531 |
</xsl:call-template> |
| 532 |
</xsl:attribute> |
| 533 |
|
| 534 |
<xsl:attribute name="hyphenation-character"> |
| 535 |
<xsl:call-template name="gentext"> |
| 536 |
<xsl:with-param name="key" select="'hyphenation-character'"/> |
| 537 |
</xsl:call-template> |
| 538 |
</xsl:attribute> |
| 539 |
<xsl:attribute name="hyphenation-push-character-count"> |
| 540 |
<xsl:call-template name="gentext"> |
| 541 |
<xsl:with-param name="key" select="'hyphenation-push-character-count'"/> |
| 542 |
</xsl:call-template> |
| 543 |
</xsl:attribute> |
| 544 |
<xsl:attribute name="hyphenation-remain-character-count"> |
| 545 |
<xsl:call-template name="gentext"> |
| 546 |
<xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> |
| 547 |
</xsl:call-template> |
| 548 |
</xsl:attribute> |
| 549 |
|
| 550 |
<xsl:apply-templates select="$part" mode="running.head.mode"> |
| 551 |
<xsl:with-param name="master-reference" select="$lot-master-reference"/> |
| 552 |
</xsl:apply-templates> |
| 553 |
|
| 554 |
<xsl:apply-templates select="$part" mode="running.foot.mode"> |
| 555 |
<xsl:with-param name="master-reference" select="$lot-master-reference"/> |
| 556 |
</xsl:apply-templates> |
| 557 |
|
| 558 |
<fo:flow flow-name="xsl-region-body"> |
| 559 |
<xsl:call-template name="set.flow.properties"> |
| 560 |
<xsl:with-param name="element" select="local-name(.)"/> |
| 561 |
<xsl:with-param name="master-reference" |
| 562 |
select="$lot-master-reference"/> |
| 563 |
</xsl:call-template> |
| 564 |
|
| 565 |
<xsl:call-template name="division.toc"> |
| 566 |
<xsl:with-param name="toc-context" select="$part"/> |
| 567 |
<xsl:with-param name="toc.title.p" |
| 568 |
select="contains($toc.params, 'title')"/> |
| 569 |
</xsl:call-template> |
| 570 |
|
| 571 |
</fo:flow> |
| 572 |
</fo:page-sequence> |
| 573 |
</xsl:if> |
| 574 |
</xsl:template> |
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
<xsl:template match="d:part/d:partintro"> |
| 579 |
<xsl:apply-templates select=".." mode="part.titlepage.mode"> |
| 580 |
<xsl:with-param name="additional.content"> |
| 581 |
<xsl:if test="d:title"> |
| 582 |
<xsl:call-template name="partintro.titlepage"/> |
| 583 |
</xsl:if> |
| 584 |
<xsl:apply-templates/> |
| 585 |
</xsl:with-param> |
| 586 |
</xsl:apply-templates> |
| 587 |
|
| 588 |
<xsl:call-template name="generate.part.toc"> |
| 589 |
<xsl:with-param name="part" select=".."/> |
| 590 |
</xsl:call-template> |
| 591 |
</xsl:template> |
| 592 |
|
| 593 |
<xsl:template match="d:partintro/d:title"></xsl:template> |
| 594 |
<xsl:template match="d:partintro/d:subtitle"></xsl:template> |
| 595 |
<xsl:template match="d:partintro/d:titleabbrev"></xsl:template> |
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
<xsl:template match="d:book" mode="division.number"> |
| 600 |
<xsl:number from="d:set" count="d:book" format="1."/> |
| 601 |
</xsl:template> |
| 602 |
|
| 603 |
<xsl:template match="d:part" mode="division.number"> |
| 604 |
<xsl:number from="d:book" count="d:part" format="I."/> |
| 605 |
</xsl:template> |
| 606 |
|
| 607 |
|
| 608 |
</xsl:stylesheet> |
| 609 |
|