| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
- <!-- path to original XSL used to do transforms -->
- <xsl:import href="@DOCBOOK_FO_XSL@"/>
- <!-- DIRECTIVES FOR CUSTOMIZATION -->
- <xsl:param name="fop1.extensions" select="1"></xsl:param>
- <!-- Hyphenation -->
- <xsl:template name="set.flow.properties">
- <xsl:param name="element" select="local-name(.)"/>
- <xsl:param name="master-reference" select="''"/>
- <xsl:choose>
- <xsl:when test="starts-with($master-reference, 'index') or
- starts-with($master-reference, 'titlepage') or
- starts-with($master-reference, 'lot') or
- starts-with($master-reference, 'front')">
- <xsl:attribute name="hyphenate">false</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="hyphenate">
- <xsl:value-of select="$hyphenate"/>
- </xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- pages always start on odd -->
- <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}"
- force-page-count="end-on-even">
- <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:stylesheet>
|