aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl
diff options
context:
space:
mode:
authorMatthew Burgess <matthew@linuxfromscratch.org>2013-10-08 20:03:29 +0000
committerMatthew Burgess <matthew@linuxfromscratch.org>2013-10-08 20:03:29 +0000
commit15c7d39533a1eb1da0748011f3378fd0f02ed14d (patch)
treea7ed12df60c5ffd4d00a570804c51470bfb8b0f5 /stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl
parent09a35dd7178070f01a7961d2ded39e11ba2aac83 (diff)
Update stylesheets to docbook-xsl-1.78.1.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl')
-rw-r--r--stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl280
1 files changed, 0 insertions, 280 deletions
diff --git a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl
deleted file mode 100644
index 40d9b7343..000000000
--- a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/toc.xsl
+++ /dev/null
@@ -1,280 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- 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.
-
- ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<!-- FIXME: in the contexts where <toc> can occur, I think it's always
- the case that a page-sequence is required. Is that true? -->
-
-<xsl:template match="toc">
- <xsl:variable name="master-reference">
- <xsl:call-template name="select.pagemaster"/>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="*">
- <xsl:if test="$process.source.toc != 0">
- <!-- if the toc isn't empty, process it -->
- <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="element" select="'toc'"/>
- <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="element" select="'toc'"/>
- <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 xsl:use-attribute-sets="toc.margin.properties">
- <xsl:call-template name="table.of.contents.titlepage"/>
- <xsl:apply-templates/>
- </fo:block>
- </fo:flow>
- </fo:page-sequence>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$process.empty.source.toc != 0">
- <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="element" select="'toc'"/>
- <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="element" select="'toc'"/>
- <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:choose>
- <xsl:when test="parent::section
- or parent::sect1
- or parent::sect2
- or parent::sect3
- or parent::sect4
- or parent::sect5">
- <xsl:apply-templates select="parent::*"
- mode="toc.for.section"/>
- </xsl:when>
- <xsl:when test="parent::article">
- <xsl:apply-templates select="parent::*"
- mode="toc.for.component"/>
- </xsl:when>
- <xsl:when test="parent::book
- or parent::part">
- <xsl:apply-templates select="parent::*"
- mode="toc.for.division"/>
- </xsl:when>
- <xsl:when test="parent::set">
- <xsl:apply-templates select="parent::*"
- mode="toc.for.set"/>
- </xsl:when>
- <!-- there aren't any other contexts that allow toc -->
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>I don't know how to make a TOC in this context!</xsl:text>
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </fo:flow>
- </fo:page-sequence>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="tocpart|tocchap
- |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
- <xsl:apply-templates select="tocentry"/>
- <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
- <fo:block start-indent="{count(ancestor::*)*2}pc">
- <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
- </fo:block>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="tocentry|tocfront|tocback">
- <fo:block text-align-last="justify"
- end-indent="2pc"
- last-line-end-indent="-2pc">
- <fo:inline keep-with-next.within-line="always">
- <xsl:choose>
- <xsl:when test="@linkend">
- <fo:basic-link internal-destination="{@linkend}">
- <xsl:apply-templates/>
- </fo:basic-link>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
- </fo:inline>
-
- <xsl:choose>
- <xsl:when test="@linkend">
- <fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="dots"
- keep-with-next.within-line="always"/>
- <xsl:text> </xsl:text>
- <fo:basic-link internal-destination="{@linkend}">
- <xsl:choose>
- <xsl:when test="@pagenum">
- <xsl:value-of select="@pagenum"/>
- </xsl:when>
- <xsl:otherwise>
- <fo:page-number-citation ref-id="{@linkend}"/>
- </xsl:otherwise>
- </xsl:choose>
- </fo:basic-link>
- </fo:inline>
- </xsl:when>
- <xsl:when test="@pagenum">
- <fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="dots"
- keep-with-next.within-line="always"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@pagenum"/>
- </fo:inline>
- </xsl:when>
- <xsl:otherwise>
- <!-- just the leaders, what else can I do? -->
- <fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="space"
- keep-with-next.within-line="always"/>
- </fo:inline>
- </xsl:otherwise>
- </xsl:choose>
- </fo:block>
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="*" mode="toc.for.section">
-<!--
- <xsl:call-template name="section.toc"/>
--->
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.component">
- <xsl:call-template name="component.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.section">
-<!--
- <xsl:call-template name="section.toc"/>
--->
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.division">
- <xsl:call-template name="division.toc"/>
-</xsl:template>
-
-<xsl:template match="*" mode="toc.for.set">
-<!--
- <xsl:call-template name="set.toc"/>
--->
-</xsl:template>
-
-<!-- ==================================================================== -->
-
-<xsl:template match="lot|lotentry">
-</xsl:template>
-
-</xsl:stylesheet>