| [2] | 1 | <?xml version='1.0'?>
|
|---|
| 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|---|
| 3 | xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
|---|
| 4 | xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
|
|---|
| 5 | version='1.0'>
|
|---|
| 6 |
|
|---|
| 7 | <!-- ********************************************************************
|
|---|
| 8 | $Id: component.xsl,v 1.35 2005/04/08 20:28:55 bobstayton Exp $
|
|---|
| 9 | ********************************************************************
|
|---|
| 10 |
|
|---|
| 11 | This file is part of the XSL DocBook Stylesheet distribution.
|
|---|
| 12 | See ../README or http://nwalsh.com/docbook/xsl/ for copyright
|
|---|
| 13 | and other information.
|
|---|
| 14 |
|
|---|
| 15 | ******************************************************************** -->
|
|---|
| 16 |
|
|---|
| 17 | <!-- ==================================================================== -->
|
|---|
| 18 |
|
|---|
| 19 | <xsl:template name="component.title">
|
|---|
| 20 | <xsl:param name="node" select="."/>
|
|---|
| 21 | <xsl:param name="pagewide" select="0"/>
|
|---|
| 22 |
|
|---|
| 23 | <xsl:variable name="id">
|
|---|
| 24 | <xsl:call-template name="object.id">
|
|---|
| 25 | <xsl:with-param name="object" select="$node"/>
|
|---|
| 26 | </xsl:call-template>
|
|---|
| 27 | </xsl:variable>
|
|---|
| 28 |
|
|---|
| 29 | <xsl:variable name="title">
|
|---|
| 30 | <xsl:apply-templates select="$node" mode="object.title.markup">
|
|---|
| 31 | <xsl:with-param name="allow-anchors" select="1"/>
|
|---|
| 32 | </xsl:apply-templates>
|
|---|
| 33 | </xsl:variable>
|
|---|
| 34 |
|
|---|
| 35 | <xsl:variable name="titleabbrev">
|
|---|
| 36 | <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
|
|---|
| 37 | </xsl:variable>
|
|---|
| 38 |
|
|---|
| 39 | <xsl:variable name="level">
|
|---|
| 40 | <xsl:choose>
|
|---|
| 41 | <xsl:when test="ancestor::section">
|
|---|
| 42 | <xsl:value-of select="count(ancestor::section)+1"/>
|
|---|
| 43 | </xsl:when>
|
|---|
| 44 | <xsl:when test="ancestor::sect5">6</xsl:when>
|
|---|
| 45 | <xsl:when test="ancestor::sect4">5</xsl:when>
|
|---|
| 46 | <xsl:when test="ancestor::sect3">4</xsl:when>
|
|---|
| 47 | <xsl:when test="ancestor::sect2">3</xsl:when>
|
|---|
| 48 | <xsl:when test="ancestor::sect1">2</xsl:when>
|
|---|
| 49 | <xsl:otherwise>1</xsl:otherwise>
|
|---|
| 50 | </xsl:choose>
|
|---|
| 51 | </xsl:variable>
|
|---|
| 52 |
|
|---|
| 53 | <xsl:if test="$passivetex.extensions != 0">
|
|---|
| 54 | <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
|
|---|
| 55 | fotex-bookmark-level="2"
|
|---|
| 56 | fotex-bookmark-label="{$id}">
|
|---|
| 57 | <xsl:value-of select="$titleabbrev"/>
|
|---|
| 58 | </fotex:bookmark>
|
|---|
| 59 | </xsl:if>
|
|---|
| 60 |
|
|---|
| 61 | <fo:block xsl:use-attribute-sets="component.title.properties">
|
|---|
| 62 | <xsl:if test="$pagewide != 0">
|
|---|
| 63 | <!-- Doesn't work to use 'all' here since not a child of fo:flow -->
|
|---|
| 64 | <xsl:attribute name="span">inherit</xsl:attribute>
|
|---|
| 65 | </xsl:if>
|
|---|
| 66 | <xsl:attribute name="hyphenation-character">
|
|---|
| 67 | <xsl:call-template name="gentext">
|
|---|
| 68 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 69 | </xsl:call-template>
|
|---|
| 70 | </xsl:attribute>
|
|---|
| 71 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 72 | <xsl:call-template name="gentext">
|
|---|
| 73 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 74 | </xsl:call-template>
|
|---|
| 75 | </xsl:attribute>
|
|---|
| 76 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 77 | <xsl:call-template name="gentext">
|
|---|
| 78 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 79 | </xsl:call-template>
|
|---|
| 80 | </xsl:attribute>
|
|---|
| 81 | <xsl:if test="$axf.extensions != 0">
|
|---|
| 82 | <xsl:attribute name="axf:outline-level">
|
|---|
| 83 | <xsl:value-of select="count($node/ancestor::*)"/>
|
|---|
| 84 | </xsl:attribute>
|
|---|
| 85 | <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
|
|---|
| 86 | <xsl:attribute name="axf:outline-title">
|
|---|
| 87 | <xsl:value-of select="normalize-space($title)"/>
|
|---|
| 88 | </xsl:attribute>
|
|---|
| 89 | </xsl:if>
|
|---|
| 90 |
|
|---|
| 91 | <!-- Let's handle the case where a component (bibliography, for example)
|
|---|
| 92 | occurs inside a section; will we need parameters for this?
|
|---|
| 93 | Danger Will Robinson: using section.title.level*.properties here
|
|---|
| 94 | runs the risk that someone will set something other than
|
|---|
| 95 | font-size there... -->
|
|---|
| 96 | <xsl:choose>
|
|---|
| 97 | <xsl:when test="$level=2">
|
|---|
| 98 | <fo:block xsl:use-attribute-sets="section.title.level2.properties">
|
|---|
| 99 | <xsl:copy-of select="$title"/>
|
|---|
| 100 | </fo:block>
|
|---|
| 101 | </xsl:when>
|
|---|
| 102 | <xsl:when test="$level=3">
|
|---|
| 103 | <fo:block xsl:use-attribute-sets="section.title.level3.properties">
|
|---|
| 104 | <xsl:copy-of select="$title"/>
|
|---|
| 105 | </fo:block>
|
|---|
| 106 | </xsl:when>
|
|---|
| 107 | <xsl:when test="$level=4">
|
|---|
| 108 | <fo:block xsl:use-attribute-sets="section.title.level4.properties">
|
|---|
| 109 | <xsl:copy-of select="$title"/>
|
|---|
| 110 | </fo:block>
|
|---|
| 111 | </xsl:when>
|
|---|
| 112 | <xsl:when test="$level=5">
|
|---|
| 113 | <fo:block xsl:use-attribute-sets="section.title.level5.properties">
|
|---|
| 114 | <xsl:copy-of select="$title"/>
|
|---|
| 115 | </fo:block>
|
|---|
| 116 | </xsl:when>
|
|---|
| 117 | <xsl:when test="$level=6">
|
|---|
| 118 | <fo:block xsl:use-attribute-sets="section.title.level6.properties">
|
|---|
| 119 | <xsl:copy-of select="$title"/>
|
|---|
| 120 | </fo:block>
|
|---|
| 121 | </xsl:when>
|
|---|
| 122 | <xsl:otherwise>
|
|---|
| 123 | <!-- not in a section: do nothing special -->
|
|---|
| 124 | <xsl:copy-of select="$title"/>
|
|---|
| 125 | </xsl:otherwise>
|
|---|
| 126 | </xsl:choose>
|
|---|
| 127 | </fo:block>
|
|---|
| 128 | </xsl:template>
|
|---|
| 129 |
|
|---|
| 130 | <!-- ==================================================================== -->
|
|---|
| 131 |
|
|---|
| 132 | <xsl:template match="dedication" mode="dedication">
|
|---|
| 133 | <xsl:variable name="id">
|
|---|
| 134 | <xsl:call-template name="object.id"/>
|
|---|
| 135 | </xsl:variable>
|
|---|
| 136 |
|
|---|
| 137 | <xsl:variable name="master-reference">
|
|---|
| 138 | <xsl:call-template name="select.pagemaster"/>
|
|---|
| 139 | </xsl:variable>
|
|---|
| 140 |
|
|---|
| 141 | <fo:page-sequence hyphenate="{$hyphenate}"
|
|---|
| 142 | master-reference="{$master-reference}">
|
|---|
| 143 | <xsl:attribute name="language">
|
|---|
| 144 | <xsl:call-template name="l10n.language"/>
|
|---|
| 145 | </xsl:attribute>
|
|---|
| 146 | <xsl:attribute name="format">
|
|---|
| 147 | <xsl:call-template name="page.number.format">
|
|---|
| 148 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 149 | </xsl:call-template>
|
|---|
| 150 | </xsl:attribute>
|
|---|
| 151 |
|
|---|
| 152 | <xsl:attribute name="initial-page-number">
|
|---|
| 153 | <xsl:call-template name="initial.page.number">
|
|---|
| 154 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 155 | </xsl:call-template>
|
|---|
| 156 | </xsl:attribute>
|
|---|
| 157 |
|
|---|
| 158 | <xsl:attribute name="force-page-count">
|
|---|
| 159 | <xsl:call-template name="force.page.count">
|
|---|
| 160 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 161 | </xsl:call-template>
|
|---|
| 162 | </xsl:attribute>
|
|---|
| 163 |
|
|---|
| 164 | <xsl:attribute name="hyphenation-character">
|
|---|
| 165 | <xsl:call-template name="gentext">
|
|---|
| 166 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 167 | </xsl:call-template>
|
|---|
| 168 | </xsl:attribute>
|
|---|
| 169 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 170 | <xsl:call-template name="gentext">
|
|---|
| 171 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 172 | </xsl:call-template>
|
|---|
| 173 | </xsl:attribute>
|
|---|
| 174 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 175 | <xsl:call-template name="gentext">
|
|---|
| 176 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 177 | </xsl:call-template>
|
|---|
| 178 | </xsl:attribute>
|
|---|
| 179 |
|
|---|
| 180 | <xsl:apply-templates select="." mode="running.head.mode">
|
|---|
| 181 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 182 | </xsl:apply-templates>
|
|---|
| 183 |
|
|---|
| 184 | <xsl:apply-templates select="." mode="running.foot.mode">
|
|---|
| 185 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 186 | </xsl:apply-templates>
|
|---|
| 187 |
|
|---|
| 188 | <fo:flow flow-name="xsl-region-body">
|
|---|
| 189 | <xsl:call-template name="set.flow.properties">
|
|---|
| 190 | <xsl:with-param name="element" select="local-name(.)"/>
|
|---|
| 191 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 192 | </xsl:call-template>
|
|---|
| 193 |
|
|---|
| 194 | <fo:block id="{$id}">
|
|---|
| 195 | <xsl:call-template name="dedication.titlepage"/>
|
|---|
| 196 | </fo:block>
|
|---|
| 197 | <xsl:apply-templates/>
|
|---|
| 198 | </fo:flow>
|
|---|
| 199 | </fo:page-sequence>
|
|---|
| 200 | </xsl:template>
|
|---|
| 201 |
|
|---|
| 202 | <xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
|
|---|
| 203 | <xsl:template match="dedication/docinfo"></xsl:template>
|
|---|
| 204 | <xsl:template match="dedication/title"></xsl:template>
|
|---|
| 205 | <xsl:template match="dedication/subtitle"></xsl:template>
|
|---|
| 206 | <xsl:template match="dedication/titleabbrev"></xsl:template>
|
|---|
| 207 |
|
|---|
| 208 | <!-- ==================================================================== -->
|
|---|
| 209 |
|
|---|
| 210 | <xsl:template match="colophon">
|
|---|
| 211 | <xsl:variable name="id">
|
|---|
| 212 | <xsl:call-template name="object.id"/>
|
|---|
| 213 | </xsl:variable>
|
|---|
| 214 |
|
|---|
| 215 | <xsl:variable name="master-reference">
|
|---|
| 216 | <xsl:call-template name="select.pagemaster"/>
|
|---|
| 217 | </xsl:variable>
|
|---|
| 218 |
|
|---|
| 219 | <fo:page-sequence hyphenate="{$hyphenate}"
|
|---|
| 220 | master-reference="{$master-reference}">
|
|---|
| 221 | <xsl:attribute name="language">
|
|---|
| 222 | <xsl:call-template name="l10n.language"/>
|
|---|
| 223 | </xsl:attribute>
|
|---|
| 224 | <xsl:attribute name="format">
|
|---|
| 225 | <xsl:call-template name="page.number.format">
|
|---|
| 226 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 227 | </xsl:call-template>
|
|---|
| 228 | </xsl:attribute>
|
|---|
| 229 | <xsl:attribute name="initial-page-number">
|
|---|
| 230 | <xsl:call-template name="initial.page.number">
|
|---|
| 231 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 232 | </xsl:call-template>
|
|---|
| 233 | </xsl:attribute>
|
|---|
| 234 | <xsl:attribute name="force-page-count">
|
|---|
| 235 | <xsl:call-template name="force.page.count">
|
|---|
| 236 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 237 | </xsl:call-template>
|
|---|
| 238 | </xsl:attribute>
|
|---|
| 239 | <xsl:attribute name="hyphenation-character">
|
|---|
| 240 | <xsl:call-template name="gentext">
|
|---|
| 241 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 242 | </xsl:call-template>
|
|---|
| 243 | </xsl:attribute>
|
|---|
| 244 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 245 | <xsl:call-template name="gentext">
|
|---|
| 246 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 247 | </xsl:call-template>
|
|---|
| 248 | </xsl:attribute>
|
|---|
| 249 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 250 | <xsl:call-template name="gentext">
|
|---|
| 251 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 252 | </xsl:call-template>
|
|---|
| 253 | </xsl:attribute>
|
|---|
| 254 |
|
|---|
| 255 | <xsl:apply-templates select="." mode="running.head.mode">
|
|---|
| 256 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 257 | </xsl:apply-templates>
|
|---|
| 258 |
|
|---|
| 259 | <xsl:apply-templates select="." mode="running.foot.mode">
|
|---|
| 260 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 261 | </xsl:apply-templates>
|
|---|
| 262 |
|
|---|
| 263 | <fo:flow flow-name="xsl-region-body">
|
|---|
| 264 | <xsl:call-template name="set.flow.properties">
|
|---|
| 265 | <xsl:with-param name="element" select="local-name(.)"/>
|
|---|
| 266 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 267 | </xsl:call-template>
|
|---|
| 268 |
|
|---|
| 269 | <fo:block id="{$id}">
|
|---|
| 270 | <xsl:call-template name="colophon.titlepage"/>
|
|---|
| 271 | </fo:block>
|
|---|
| 272 | <xsl:apply-templates/>
|
|---|
| 273 | </fo:flow>
|
|---|
| 274 | </fo:page-sequence>
|
|---|
| 275 | </xsl:template>
|
|---|
| 276 |
|
|---|
| 277 | <xsl:template match="colophon/title"></xsl:template>
|
|---|
| 278 | <xsl:template match="colophon/subtitle"></xsl:template>
|
|---|
| 279 | <xsl:template match="colophon/titleabbrev"></xsl:template>
|
|---|
| 280 |
|
|---|
| 281 | <!-- ==================================================================== -->
|
|---|
| 282 |
|
|---|
| 283 | <xsl:template match="preface">
|
|---|
| 284 | <xsl:variable name="id">
|
|---|
| 285 | <xsl:call-template name="object.id"/>
|
|---|
| 286 | </xsl:variable>
|
|---|
| 287 |
|
|---|
| 288 | <xsl:variable name="master-reference">
|
|---|
| 289 | <xsl:call-template name="select.pagemaster"/>
|
|---|
| 290 | </xsl:variable>
|
|---|
| 291 |
|
|---|
| 292 | <fo:page-sequence hyphenate="{$hyphenate}"
|
|---|
| 293 | master-reference="{$master-reference}">
|
|---|
| 294 | <xsl:attribute name="language">
|
|---|
| 295 | <xsl:call-template name="l10n.language"/>
|
|---|
| 296 | </xsl:attribute>
|
|---|
| 297 | <xsl:attribute name="format">
|
|---|
| 298 | <xsl:call-template name="page.number.format">
|
|---|
| 299 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 300 | </xsl:call-template>
|
|---|
| 301 | </xsl:attribute>
|
|---|
| 302 |
|
|---|
| 303 | <xsl:attribute name="initial-page-number">
|
|---|
| 304 | <xsl:call-template name="initial.page.number">
|
|---|
| 305 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 306 | </xsl:call-template>
|
|---|
| 307 | </xsl:attribute>
|
|---|
| 308 |
|
|---|
| 309 | <xsl:attribute name="force-page-count">
|
|---|
| 310 | <xsl:call-template name="force.page.count">
|
|---|
| 311 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 312 | </xsl:call-template>
|
|---|
| 313 | </xsl:attribute>
|
|---|
| 314 |
|
|---|
| 315 | <xsl:attribute name="hyphenation-character">
|
|---|
| 316 | <xsl:call-template name="gentext">
|
|---|
| 317 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 318 | </xsl:call-template>
|
|---|
| 319 | </xsl:attribute>
|
|---|
| 320 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 321 | <xsl:call-template name="gentext">
|
|---|
| 322 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 323 | </xsl:call-template>
|
|---|
| 324 | </xsl:attribute>
|
|---|
| 325 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 326 | <xsl:call-template name="gentext">
|
|---|
| 327 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 328 | </xsl:call-template>
|
|---|
| 329 | </xsl:attribute>
|
|---|
| 330 |
|
|---|
| 331 | <xsl:apply-templates select="." mode="running.head.mode">
|
|---|
| 332 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 333 | </xsl:apply-templates>
|
|---|
| 334 |
|
|---|
| 335 | <xsl:apply-templates select="." mode="running.foot.mode">
|
|---|
| 336 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 337 | </xsl:apply-templates>
|
|---|
| 338 |
|
|---|
| 339 | <fo:flow flow-name="xsl-region-body">
|
|---|
| 340 | <xsl:call-template name="set.flow.properties">
|
|---|
| 341 | <xsl:with-param name="element" select="local-name(.)"/>
|
|---|
| 342 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 343 | </xsl:call-template>
|
|---|
| 344 |
|
|---|
| 345 | <fo:block id="{$id}">
|
|---|
| 346 | <xsl:call-template name="preface.titlepage"/>
|
|---|
| 347 | </fo:block>
|
|---|
| 348 |
|
|---|
| 349 | <xsl:variable name="toc.params">
|
|---|
| 350 | <xsl:call-template name="find.path.params">
|
|---|
| 351 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
|---|
| 352 | </xsl:call-template>
|
|---|
| 353 | </xsl:variable>
|
|---|
| 354 | <xsl:if test="contains($toc.params, 'toc')">
|
|---|
| 355 | <xsl:call-template name="component.toc"/>
|
|---|
| 356 | <xsl:call-template name="component.toc.separator"/>
|
|---|
| 357 | </xsl:if>
|
|---|
| 358 |
|
|---|
| 359 | <xsl:apply-templates/>
|
|---|
| 360 | </fo:flow>
|
|---|
| 361 | </fo:page-sequence>
|
|---|
| 362 | </xsl:template>
|
|---|
| 363 |
|
|---|
| 364 | <xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
|
|---|
| 365 | <xsl:template match="preface/title"></xsl:template>
|
|---|
| 366 | <xsl:template match="preface/titleabbrev"></xsl:template>
|
|---|
| 367 | <xsl:template match="preface/subtitle"></xsl:template>
|
|---|
| 368 |
|
|---|
| 369 | <!-- ==================================================================== -->
|
|---|
| 370 |
|
|---|
| 371 | <xsl:template match="chapter">
|
|---|
| 372 | <xsl:variable name="id">
|
|---|
| 373 | <xsl:call-template name="object.id"/>
|
|---|
| 374 | </xsl:variable>
|
|---|
| 375 |
|
|---|
| 376 | <xsl:variable name="master-reference">
|
|---|
| 377 | <xsl:call-template name="select.pagemaster"/>
|
|---|
| 378 | </xsl:variable>
|
|---|
| 379 |
|
|---|
| 380 | <fo:page-sequence hyphenate="{$hyphenate}"
|
|---|
| 381 | master-reference="{$master-reference}">
|
|---|
| 382 | <xsl:attribute name="language">
|
|---|
| 383 | <xsl:call-template name="l10n.language"/>
|
|---|
| 384 | </xsl:attribute>
|
|---|
| 385 | <xsl:attribute name="format">
|
|---|
| 386 | <xsl:call-template name="page.number.format">
|
|---|
| 387 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 388 | </xsl:call-template>
|
|---|
| 389 | </xsl:attribute>
|
|---|
| 390 | <xsl:attribute name="initial-page-number">
|
|---|
| 391 | <xsl:call-template name="initial.page.number">
|
|---|
| 392 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 393 | </xsl:call-template>
|
|---|
| 394 | </xsl:attribute>
|
|---|
| 395 |
|
|---|
| 396 | <xsl:attribute name="force-page-count">
|
|---|
| 397 | <xsl:call-template name="force.page.count">
|
|---|
| 398 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 399 | </xsl:call-template>
|
|---|
| 400 | </xsl:attribute>
|
|---|
| 401 |
|
|---|
| 402 | <xsl:attribute name="hyphenation-character">
|
|---|
| 403 | <xsl:call-template name="gentext">
|
|---|
| 404 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 405 | </xsl:call-template>
|
|---|
| 406 | </xsl:attribute>
|
|---|
| 407 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 408 | <xsl:call-template name="gentext">
|
|---|
| 409 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 410 | </xsl:call-template>
|
|---|
| 411 | </xsl:attribute>
|
|---|
| 412 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 413 | <xsl:call-template name="gentext">
|
|---|
| 414 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 415 | </xsl:call-template>
|
|---|
| 416 | </xsl:attribute>
|
|---|
| 417 |
|
|---|
| 418 | <xsl:apply-templates select="." mode="running.head.mode">
|
|---|
| 419 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 420 | </xsl:apply-templates>
|
|---|
| 421 |
|
|---|
| 422 | <xsl:apply-templates select="." mode="running.foot.mode">
|
|---|
| 423 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 424 | </xsl:apply-templates>
|
|---|
| 425 |
|
|---|
| 426 | <fo:flow flow-name="xsl-region-body">
|
|---|
| 427 | <xsl:call-template name="set.flow.properties">
|
|---|
| 428 | <xsl:with-param name="element" select="local-name(.)"/>
|
|---|
| 429 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 430 | </xsl:call-template>
|
|---|
| 431 |
|
|---|
| 432 | <fo:block id="{$id}">
|
|---|
| 433 | <xsl:call-template name="chapter.titlepage"/>
|
|---|
| 434 | </fo:block>
|
|---|
| 435 |
|
|---|
| 436 | <xsl:variable name="toc.params">
|
|---|
| 437 | <xsl:call-template name="find.path.params">
|
|---|
| 438 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
|---|
| 439 | </xsl:call-template>
|
|---|
| 440 | </xsl:variable>
|
|---|
| 441 | <xsl:if test="contains($toc.params, 'toc')">
|
|---|
| 442 | <xsl:call-template name="component.toc"/>
|
|---|
| 443 | <xsl:call-template name="component.toc.separator"/>
|
|---|
| 444 | </xsl:if>
|
|---|
| 445 | <xsl:apply-templates/>
|
|---|
| 446 | </fo:flow>
|
|---|
| 447 | </fo:page-sequence>
|
|---|
| 448 | </xsl:template>
|
|---|
| 449 |
|
|---|
| 450 | <xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
|
|---|
| 451 | <xsl:template match="chapter/title"></xsl:template>
|
|---|
| 452 | <xsl:template match="chapter/titleabbrev"></xsl:template>
|
|---|
| 453 | <xsl:template match="chapter/subtitle"></xsl:template>
|
|---|
| 454 |
|
|---|
| 455 | <!-- ==================================================================== -->
|
|---|
| 456 |
|
|---|
| 457 | <xsl:template match="appendix">
|
|---|
| 458 | <xsl:variable name="id">
|
|---|
| 459 | <xsl:call-template name="object.id"/>
|
|---|
| 460 | </xsl:variable>
|
|---|
| 461 |
|
|---|
| 462 | <xsl:variable name="master-reference">
|
|---|
| 463 | <xsl:call-template name="select.pagemaster"/>
|
|---|
| 464 | </xsl:variable>
|
|---|
| 465 |
|
|---|
| 466 | <fo:page-sequence hyphenate="{$hyphenate}"
|
|---|
| 467 | master-reference="{$master-reference}">
|
|---|
| 468 | <xsl:attribute name="language">
|
|---|
| 469 | <xsl:call-template name="l10n.language"/>
|
|---|
| 470 | </xsl:attribute>
|
|---|
| 471 | <xsl:attribute name="format">
|
|---|
| 472 | <xsl:call-template name="page.number.format">
|
|---|
| 473 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 474 | </xsl:call-template>
|
|---|
| 475 | </xsl:attribute>
|
|---|
| 476 | <xsl:attribute name="initial-page-number">
|
|---|
| 477 | <xsl:call-template name="initial.page.number">
|
|---|
| 478 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 479 | </xsl:call-template>
|
|---|
| 480 | </xsl:attribute>
|
|---|
| 481 |
|
|---|
| 482 | <xsl:attribute name="force-page-count">
|
|---|
| 483 | <xsl:call-template name="force.page.count">
|
|---|
| 484 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 485 | </xsl:call-template>
|
|---|
| 486 | </xsl:attribute>
|
|---|
| 487 |
|
|---|
| 488 | <xsl:attribute name="hyphenation-character">
|
|---|
| 489 | <xsl:call-template name="gentext">
|
|---|
| 490 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 491 | </xsl:call-template>
|
|---|
| 492 | </xsl:attribute>
|
|---|
| 493 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 494 | <xsl:call-template name="gentext">
|
|---|
| 495 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 496 | </xsl:call-template>
|
|---|
| 497 | </xsl:attribute>
|
|---|
| 498 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 499 | <xsl:call-template name="gentext">
|
|---|
| 500 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 501 | </xsl:call-template>
|
|---|
| 502 | </xsl:attribute>
|
|---|
| 503 |
|
|---|
| 504 | <xsl:apply-templates select="." mode="running.head.mode">
|
|---|
| 505 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 506 | </xsl:apply-templates>
|
|---|
| 507 |
|
|---|
| 508 | <xsl:apply-templates select="." mode="running.foot.mode">
|
|---|
| 509 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 510 | </xsl:apply-templates>
|
|---|
| 511 |
|
|---|
| 512 | <fo:flow flow-name="xsl-region-body">
|
|---|
| 513 | <xsl:call-template name="set.flow.properties">
|
|---|
| 514 | <xsl:with-param name="element" select="local-name(.)"/>
|
|---|
| 515 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 516 | </xsl:call-template>
|
|---|
| 517 |
|
|---|
| 518 | <fo:block id="{$id}">
|
|---|
| 519 | <xsl:call-template name="appendix.titlepage"/>
|
|---|
| 520 | </fo:block>
|
|---|
| 521 |
|
|---|
| 522 | <xsl:variable name="toc.params">
|
|---|
| 523 | <xsl:call-template name="find.path.params">
|
|---|
| 524 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
|---|
| 525 | </xsl:call-template>
|
|---|
| 526 | </xsl:variable>
|
|---|
| 527 |
|
|---|
| 528 | <xsl:if test="contains($toc.params, 'toc')">
|
|---|
| 529 | <xsl:call-template name="component.toc"/>
|
|---|
| 530 | <xsl:call-template name="component.toc.separator"/>
|
|---|
| 531 | </xsl:if>
|
|---|
| 532 | <xsl:apply-templates/>
|
|---|
| 533 | </fo:flow>
|
|---|
| 534 | </fo:page-sequence>
|
|---|
| 535 | </xsl:template>
|
|---|
| 536 |
|
|---|
| 537 | <xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
|
|---|
| 538 | <xsl:template match="appendix/title"></xsl:template>
|
|---|
| 539 | <xsl:template match="appendix/titleabbrev"></xsl:template>
|
|---|
| 540 | <xsl:template match="appendix/subtitle"></xsl:template>
|
|---|
| 541 |
|
|---|
| 542 | <!-- ==================================================================== -->
|
|---|
| 543 |
|
|---|
| 544 | <xsl:template match="article">
|
|---|
| 545 | <xsl:variable name="id">
|
|---|
| 546 | <xsl:call-template name="object.id"/>
|
|---|
| 547 | </xsl:variable>
|
|---|
| 548 |
|
|---|
| 549 | <xsl:variable name="master-reference">
|
|---|
| 550 | <xsl:call-template name="select.pagemaster"/>
|
|---|
| 551 | </xsl:variable>
|
|---|
| 552 |
|
|---|
| 553 | <fo:page-sequence hyphenate="{$hyphenate}"
|
|---|
| 554 | master-reference="{$master-reference}">
|
|---|
| 555 | <xsl:attribute name="language">
|
|---|
| 556 | <xsl:call-template name="l10n.language"/>
|
|---|
| 557 | </xsl:attribute>
|
|---|
| 558 | <xsl:attribute name="format">
|
|---|
| 559 | <xsl:call-template name="page.number.format">
|
|---|
| 560 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 561 | </xsl:call-template>
|
|---|
| 562 | </xsl:attribute>
|
|---|
| 563 | <xsl:attribute name="initial-page-number">
|
|---|
| 564 | <xsl:call-template name="initial.page.number">
|
|---|
| 565 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 566 | </xsl:call-template>
|
|---|
| 567 | </xsl:attribute>
|
|---|
| 568 |
|
|---|
| 569 | <xsl:attribute name="force-page-count">
|
|---|
| 570 | <xsl:call-template name="force.page.count">
|
|---|
| 571 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 572 | </xsl:call-template>
|
|---|
| 573 | </xsl:attribute>
|
|---|
| 574 |
|
|---|
| 575 | <xsl:attribute name="hyphenation-character">
|
|---|
| 576 | <xsl:call-template name="gentext">
|
|---|
| 577 | <xsl:with-param name="key" select="'hyphenation-character'"/>
|
|---|
| 578 | </xsl:call-template>
|
|---|
| 579 | </xsl:attribute>
|
|---|
| 580 | <xsl:attribute name="hyphenation-push-character-count">
|
|---|
| 581 | <xsl:call-template name="gentext">
|
|---|
| 582 | <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
|
|---|
| 583 | </xsl:call-template>
|
|---|
| 584 | </xsl:attribute>
|
|---|
| 585 | <xsl:attribute name="hyphenation-remain-character-count">
|
|---|
| 586 | <xsl:call-template name="gentext">
|
|---|
| 587 | <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
|
|---|
| 588 | </xsl:call-template>
|
|---|
| 589 | </xsl:attribute>
|
|---|
| 590 |
|
|---|
| 591 | <xsl:apply-templates select="." mode="running.head.mode">
|
|---|
| 592 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 593 | </xsl:apply-templates>
|
|---|
| 594 |
|
|---|
| 595 | <xsl:apply-templates select="." mode="running.foot.mode">
|
|---|
| 596 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 597 | </xsl:apply-templates>
|
|---|
| 598 |
|
|---|
| 599 | <fo:flow flow-name="xsl-region-body">
|
|---|
| 600 | <xsl:call-template name="set.flow.properties">
|
|---|
| 601 | <xsl:with-param name="element" select="local-name(.)"/>
|
|---|
| 602 | <xsl:with-param name="master-reference" select="$master-reference"/>
|
|---|
| 603 | </xsl:call-template>
|
|---|
| 604 |
|
|---|
| 605 | <fo:block id="{$id}">
|
|---|
| 606 | <xsl:call-template name="article.titlepage"/>
|
|---|
| 607 | </fo:block>
|
|---|
| 608 |
|
|---|
| 609 | <xsl:variable name="toc.params">
|
|---|
| 610 | <xsl:call-template name="find.path.params">
|
|---|
| 611 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
|---|
| 612 | </xsl:call-template>
|
|---|
| 613 | </xsl:variable>
|
|---|
| 614 |
|
|---|
| 615 | <xsl:if test="contains($toc.params, 'toc')">
|
|---|
| 616 | <xsl:call-template name="component.toc"/>
|
|---|
| 617 | <xsl:call-template name="component.toc.separator"/>
|
|---|
| 618 | </xsl:if>
|
|---|
| 619 | <xsl:apply-templates/>
|
|---|
| 620 | </fo:flow>
|
|---|
| 621 | </fo:page-sequence>
|
|---|
| 622 | </xsl:template>
|
|---|
| 623 |
|
|---|
| 624 | <xsl:template match="article/artheader"></xsl:template>
|
|---|
| 625 | <xsl:template match="article/articleinfo"></xsl:template>
|
|---|
| 626 | <xsl:template match="article/title"></xsl:template>
|
|---|
| 627 | <xsl:template match="article/subtitle"></xsl:template>
|
|---|
| 628 |
|
|---|
| 629 | <xsl:template match="article/appendix">
|
|---|
| 630 | <xsl:variable name="id">
|
|---|
| 631 | <xsl:call-template name="object.id"/>
|
|---|
| 632 | </xsl:variable>
|
|---|
| 633 |
|
|---|
| 634 | <xsl:variable name="title">
|
|---|
| 635 | <xsl:apply-templates select="." mode="object.title.markup"/>
|
|---|
| 636 | </xsl:variable>
|
|---|
| 637 |
|
|---|
| 638 | <xsl:variable name="titleabbrev">
|
|---|
| 639 | <xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
|---|
| 640 | </xsl:variable>
|
|---|
| 641 |
|
|---|
| 642 | <fo:block id='{$id}'>
|
|---|
| 643 | <xsl:if test="$passivetex.extensions != 0">
|
|---|
| 644 | <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
|
|---|
| 645 | fotex-bookmark-level="{count(ancestor::*)+2}"
|
|---|
| 646 | fotex-bookmark-label="{$id}">
|
|---|
| 647 | <xsl:value-of select="$titleabbrev"/>
|
|---|
| 648 | </fotex:bookmark>
|
|---|
| 649 | </xsl:if>
|
|---|
| 650 |
|
|---|
| 651 | <xsl:if test="$axf.extensions != 0">
|
|---|
| 652 | <xsl:attribute name="axf:outline-level">
|
|---|
| 653 | <xsl:value-of select="count(ancestor::*)+2"/>
|
|---|
| 654 | </xsl:attribute>
|
|---|
| 655 | <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
|
|---|
| 656 | <xsl:attribute name="axf:outline-title">
|
|---|
| 657 | <xsl:value-of select="normalize-space($titleabbrev)"/>
|
|---|
| 658 | </xsl:attribute>
|
|---|
| 659 | </xsl:if>
|
|---|
| 660 |
|
|---|
| 661 | <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
|
|---|
| 662 | <fo:marker marker-class-name="section.head.marker">
|
|---|
| 663 | <xsl:choose>
|
|---|
| 664 | <xsl:when test="$titleabbrev = ''">
|
|---|
| 665 | <xsl:value-of select="$title"/>
|
|---|
| 666 | </xsl:when>
|
|---|
| 667 | <xsl:otherwise>
|
|---|
| 668 | <xsl:value-of select="$titleabbrev"/>
|
|---|
| 669 | </xsl:otherwise>
|
|---|
| 670 | </xsl:choose>
|
|---|
| 671 | </fo:marker>
|
|---|
| 672 | <xsl:copy-of select="$title"/>
|
|---|
| 673 | </fo:block>
|
|---|
| 674 |
|
|---|
| 675 | <xsl:apply-templates/>
|
|---|
| 676 | </fo:block>
|
|---|
| 677 | </xsl:template>
|
|---|
| 678 |
|
|---|
| 679 | <!-- ==================================================================== -->
|
|---|
| 680 |
|
|---|
| 681 | </xsl:stylesheet>
|
|---|
| 682 |
|
|---|