123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797 |
- <?xml version='1.0'?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
- version='1.0'>
- <!-- ********************************************************************
- $Id$
- ********************************************************************
- This file is part of the XSL DocBook Stylesheet distribution.
- See ../README or http://docbook.sf.net/release/xsl/current/ for
- copyright and other information.
- ******************************************************************** -->
- <!-- ==================================================================== -->
- <xsl:template name="component.title">
- <xsl:param name="node" select="."/>
- <xsl:param name="pagewide" select="0"/>
- <xsl:variable name="id">
- <xsl:call-template name="object.id">
- <xsl:with-param name="object" select="$node"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="title">
- <xsl:apply-templates select="$node" mode="object.title.markup">
- <xsl:with-param name="allow-anchors" select="1"/>
- </xsl:apply-templates>
- </xsl:variable>
- <xsl:variable name="titleabbrev">
- <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
- </xsl:variable>
- <xsl:variable name="level">
- <xsl:choose>
- <xsl:when test="ancestor::section">
- <xsl:value-of select="count(ancestor::section)+1"/>
- </xsl:when>
- <xsl:when test="ancestor::sect5">6</xsl:when>
- <xsl:when test="ancestor::sect4">5</xsl:when>
- <xsl:when test="ancestor::sect3">4</xsl:when>
- <xsl:when test="ancestor::sect2">3</xsl:when>
- <xsl:when test="ancestor::sect1">2</xsl:when>
- <xsl:otherwise>1</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$passivetex.extensions != 0">
- <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
- fotex-bookmark-level="2"
- fotex-bookmark-label="{$id}">
- <xsl:value-of select="$titleabbrev"/>
- </fotex:bookmark>
- </xsl:if>
- <fo:block xsl:use-attribute-sets="component.title.properties">
- <xsl:if test="$pagewide != 0">
- <!-- Doesn't work to use 'all' here since not a child of fo:flow -->
- <xsl:attribute name="span">inherit</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:if test="$axf.extensions != 0">
- <xsl:attribute name="axf:outline-level">
- <xsl:value-of select="count($node/ancestor::*)"/>
- </xsl:attribute>
- <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
- <xsl:attribute name="axf:outline-title">
- <xsl:value-of select="normalize-space($title)"/>
- </xsl:attribute>
- </xsl:if>
- <!-- Let's handle the case where a component (bibliography, for example)
- occurs inside a section; will we need parameters for this?
- Danger Will Robinson: using section.title.level*.properties here
- runs the risk that someone will set something other than
- font-size there... -->
- <xsl:choose>
- <xsl:when test="$level=2">
- <fo:block xsl:use-attribute-sets="section.title.level2.properties">
- <xsl:copy-of select="$title"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="$level=3">
- <fo:block xsl:use-attribute-sets="section.title.level3.properties">
- <xsl:copy-of select="$title"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="$level=4">
- <fo:block xsl:use-attribute-sets="section.title.level4.properties">
- <xsl:copy-of select="$title"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="$level=5">
- <fo:block xsl:use-attribute-sets="section.title.level5.properties">
- <xsl:copy-of select="$title"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="$level=6">
- <fo:block xsl:use-attribute-sets="section.title.level6.properties">
- <xsl:copy-of select="$title"/>
- </fo:block>
- </xsl:when>
- <xsl:otherwise>
- <!-- not in a section: do nothing special -->
- <xsl:copy-of select="$title"/>
- </xsl:otherwise>
- </xsl:choose>
- </fo:block>
- </xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="dedication" mode="dedication">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <fo:block id="{$id}"
- xsl:use-attribute-sets="component.titlepage.properties">
- <xsl:call-template name="dedication.titlepage"/>
- </fo:block>
- <xsl:apply-templates/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- <xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
- <xsl:template match="dedication/docinfo"></xsl:template>
- <xsl:template match="dedication/title"></xsl:template>
- <xsl:template match="dedication/subtitle"></xsl:template>
- <xsl:template match="dedication/titleabbrev"></xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="colophon">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <fo:block id="{$id}"
- xsl:use-attribute-sets="component.titlepage.properties">
- <xsl:call-template name="colophon.titlepage"/>
- </fo:block>
- <xsl:apply-templates/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- <xsl:template match="colophon/title"></xsl:template>
- <xsl:template match="colophon/subtitle"></xsl:template>
- <xsl:template match="colophon/titleabbrev"></xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="preface">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <fo:block id="{$id}"
- xsl:use-attribute-sets="component.titlepage.properties">
- <xsl:call-template name="preface.titlepage"/>
- </fo:block>
- <xsl:variable name="toc.params">
- <xsl:call-template name="find.path.params">
- <xsl:with-param name="table"
- select="normalize-space($generate.toc)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="contains($toc.params, 'toc')">
- <xsl:call-template name="component.toc">
- <xsl:with-param name="toc.title.p"
- select="contains($toc.params, 'title')"/>
- </xsl:call-template>
- <xsl:call-template name="component.toc.separator"/>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- <xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
- <xsl:template match="preface/info"></xsl:template>
- <xsl:template match="preface/title"></xsl:template>
- <xsl:template match="preface/titleabbrev"></xsl:template>
- <xsl:template match="preface/subtitle"></xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="chapter">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <fo:block id="{$id}"
- xsl:use-attribute-sets="component.titlepage.properties">
- <xsl:call-template name="chapter.titlepage"/>
- </fo:block>
- <xsl:variable name="toc.params">
- <xsl:call-template name="find.path.params">
- <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="contains($toc.params, 'toc')">
- <xsl:call-template name="component.toc">
- <xsl:with-param name="toc.title.p"
- select="contains($toc.params, 'title')"/>
- </xsl:call-template>
- <xsl:call-template name="component.toc.separator"/>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- <xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
- <xsl:template match="chapter/info"></xsl:template>
- <xsl:template match="chapter/title"></xsl:template>
- <xsl:template match="chapter/titleabbrev"></xsl:template>
- <xsl:template match="chapter/subtitle"></xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="appendix">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <fo:block id="{$id}"
- xsl:use-attribute-sets="component.titlepage.properties">
- <xsl:call-template name="appendix.titlepage"/>
- </fo:block>
- <xsl:variable name="toc.params">
- <xsl:call-template name="find.path.params">
- <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="contains($toc.params, 'toc')">
- <xsl:call-template name="component.toc">
- <xsl:with-param name="toc.title.p"
- select="contains($toc.params, 'title')"/>
- </xsl:call-template>
- <xsl:call-template name="component.toc.separator"/>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- <xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
- <xsl:template match="appendix/info"></xsl:template>
- <xsl:template match="appendix/title"></xsl:template>
- <xsl:template match="appendix/titleabbrev"></xsl:template>
- <xsl:template match="appendix/subtitle"></xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="article">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <fo:block id="{$id}"
- xsl:use-attribute-sets="component.titlepage.properties">
- <xsl:call-template name="article.titlepage"/>
- </fo:block>
- <xsl:variable name="toc.params">
- <xsl:call-template name="find.path.params">
- <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="contains($toc.params, 'toc')">
- <xsl:call-template name="component.toc">
- <xsl:with-param name="toc.title.p"
- select="contains($toc.params, 'title')"/>
- </xsl:call-template>
- <xsl:call-template name="component.toc.separator"/>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- <xsl:template match="article/artheader"></xsl:template>
- <xsl:template match="article/articleinfo"></xsl:template>
- <xsl:template match="article/info"></xsl:template>
- <xsl:template match="article/title"></xsl:template>
- <xsl:template match="article/subtitle"></xsl:template>
- <xsl:template match="article/titleabbrev"></xsl:template>
- <xsl:template match="article/appendix">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="title">
- <xsl:apply-templates select="." mode="object.title.markup"/>
- </xsl:variable>
- <xsl:variable name="titleabbrev">
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </xsl:variable>
- <fo:block id='{$id}'>
- <xsl:if test="$axf.extensions != 0">
- <xsl:attribute name="axf:outline-level">
- <xsl:value-of select="count(ancestor::*)+2"/>
- </xsl:attribute>
- <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
- <xsl:attribute name="axf:outline-title">
- <xsl:value-of select="normalize-space($titleabbrev)"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="$passivetex.extensions != 0">
- <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex"
- fotex-bookmark-level="{count(ancestor::*)+2}"
- fotex-bookmark-label="{$id}">
- <xsl:value-of select="$titleabbrev"/>
- </fotex:bookmark>
- </xsl:if>
- <fo:block xsl:use-attribute-sets="article.appendix.title.properties">
- <fo:marker marker-class-name="section.head.marker">
- <xsl:choose>
- <xsl:when test="$titleabbrev = ''">
- <xsl:value-of select="$title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$titleabbrev"/>
- </xsl:otherwise>
- </xsl:choose>
- </fo:marker>
- <xsl:copy-of select="$title"/>
- </fo:block>
- <xsl:apply-templates/>
- </fo:block>
- </xsl:template>
- <!-- ==================================================================== -->
- <!-- Utility template to create a page sequence for an element -->
- <xsl:template match="*" mode="page.sequence" name="page.sequence">
- <xsl:param name="content">
- <xsl:apply-templates/>
- </xsl:param>
- <xsl:param name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:param>
- <xsl:param name="element" select="local-name(.)"/>
- <xsl:param name="gentext-key" select="local-name(.)"/>
- <xsl:param name="language">
- <xsl:call-template name="l10n.language"/>
- </xsl:param>
- <xsl:param name="format">
- <xsl:call-template name="page.number.format">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- <xsl:with-param name="element" select="$element"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:param name="initial-page-number">
- <xsl:call-template name="initial.page.number">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- <xsl:with-param name="element" select="$element"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:param name="force-page-count">
- <xsl:call-template name="force.page.count">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- <xsl:with-param name="element" select="$element"/>
- </xsl:call-template>
- </xsl:param>
- <fo:page-sequence hyphenate="{$hyphenate}"
- master-reference="{$master-reference}">
- <xsl:attribute name="language">
- <xsl:value-of select="$language"/>
- </xsl:attribute>
- <xsl:attribute name="format">
- <xsl:value-of select="$format"/>
- </xsl:attribute>
- <xsl:attribute name="initial-page-number">
- <xsl:value-of select="$initial-page-number"/>
- </xsl:attribute>
- <xsl:attribute name="force-page-count">
- <xsl:value-of select="$force-page-count"/>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-character">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-character'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-push-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="hyphenation-remain-character-count">
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="running.head.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- <xsl:with-param name="gentext-key" select="$gentext-key"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="." mode="running.foot.mode">
- <xsl:with-param name="master-reference" select="$master-reference"/>
- <xsl:with-param name="gentext-key" select="$gentext-key"/>
- </xsl:apply-templates>
- <fo:flow flow-name="xsl-region-body">
- <xsl:call-template name="set.flow.properties">
- <xsl:with-param name="element" select="local-name(.)"/>
- <xsl:with-param name="master-reference" select="$master-reference"/>
- </xsl:call-template>
- <xsl:copy-of select="$content"/>
- </fo:flow>
- </fo:page-sequence>
- </xsl:template>
- </xsl:stylesheet>
|