diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2013-10-08 20:03:29 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2013-10-08 20:03:29 +0000 |
commit | 15c7d39533a1eb1da0748011f3378fd0f02ed14d (patch) | |
tree | a7ed12df60c5ffd4d00a570804c51470bfb8b0f5 /stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl | |
parent | 09a35dd7178070f01a7961d2ded39e11ba2aac83 (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/footnote.xsl')
-rw-r--r-- | stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl | 186 |
1 files changed, 0 insertions, 186 deletions
diff --git a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl deleted file mode 100644 index 3340b322d..000000000 --- a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/footnote.xsl +++ /dev/null @@ -1,186 +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" - xmlns:exsl="http://exslt.org/common" - exclude-result-prefixes="exsl" - 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="format.footnote.mark"> - <xsl:param name="mark" select="'?'"/> - <fo:inline xsl:use-attribute-sets="footnote.mark.properties"> - <xsl:choose> - <xsl:when test="$fop.extensions != 0"> - <xsl:attribute name="vertical-align">super</xsl:attribute> - </xsl:when> - <xsl:otherwise> - <xsl:attribute name="baseline-shift">super</xsl:attribute> - </xsl:otherwise> - </xsl:choose> - <xsl:copy-of select="$mark"/> - </fo:inline> -</xsl:template> - -<xsl:template match="footnote"> - <xsl:choose> - <xsl:when test="ancestor::table or ancestor::informaltable"> - <xsl:call-template name="format.footnote.mark"> - <xsl:with-param name="mark"> - <xsl:apply-templates select="." mode="footnote.number"/> - </xsl:with-param> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <fo:footnote> - <fo:inline> - <xsl:call-template name="format.footnote.mark"> - <xsl:with-param name="mark"> - <xsl:apply-templates select="." mode="footnote.number"/> - </xsl:with-param> - </xsl:call-template> - </fo:inline> - <fo:footnote-body xsl:use-attribute-sets="footnote.properties"> - <xsl:apply-templates/> - </fo:footnote-body> - </fo:footnote> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template match="footnoteref"> - <xsl:variable name="footnote" select="key('id',@linkend)"/> - <xsl:call-template name="format.footnote.mark"> - <xsl:with-param name="mark"> - <xsl:apply-templates select="$footnote" mode="footnote.number"/> - </xsl:with-param> - </xsl:call-template> -</xsl:template> - -<xsl:template match="footnote" mode="footnote.number"> - <xsl:choose> - <xsl:when test="string-length(@label) != 0"> - <xsl:value-of select="@label"/> - </xsl:when> - <xsl:when test="ancestor::table or ancestor::informaltable"> - <xsl:variable name="tfnum"> - <xsl:number level="any" from="table|informaltable" format="1"/> - </xsl:variable> - - <xsl:choose> - <xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum"> - <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/> - </xsl:when> - <xsl:otherwise> - <xsl:number level="any" from="table|informaltable" - format="{$table.footnote.number.format}"/> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="fnum"> - <!-- FIXME: list in @from is probably not complete --> - <xsl:number level="any" - from="chapter|appendix|preface|article|refentry|bibliography" - count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)]|ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::footnote)][$ulink.show != 0]" - format="1"/> - </xsl:variable> - <xsl:choose> - <xsl:when test="string-length($footnote.number.symbols) >= $fnum"> - <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/> - </xsl:when> - <xsl:otherwise> - <xsl:number value="$fnum" format="{$footnote.number.format}"/> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<!-- ==================================================================== --> - -<xsl:template match="*" mode="footnote.body.number"> - <xsl:variable name="footnote.mark"> - <xsl:call-template name="format.footnote.mark"> - <xsl:with-param name="mark"> - <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/> - </xsl:with-param> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="fo"> - <xsl:apply-templates select="."/> - </xsl:variable> - - <xsl:variable name="fo-nodes" select="exsl:node-set($fo)"/> - - <xsl:choose> - <xsl:when test="$fo-nodes//fo:block"> - <xsl:apply-templates select="$fo-nodes" mode="insert.fo.fnum"> - <xsl:with-param name="mark" select="$footnote.mark"/> - </xsl:apply-templates> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates select="$fo-nodes" mode="insert.fo.text"> - <xsl:with-param name="mark" select="$footnote.mark"/> - </xsl:apply-templates> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<!-- ==================================================================== --> - -<xsl:template match="footnote/para[1] - |footnote/simpara[1] - |footnote/formalpara[1]" - priority="2"> - <!-- this only works if the first thing in a footnote is a para, --> - <!-- which is ok, because it usually is. --> - <fo:block> - <xsl:call-template name="format.footnote.mark"> - <xsl:with-param name="mark"> - <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/> - </xsl:with-param> - </xsl:call-template> - <xsl:apply-templates/> - </fo:block> -</xsl:template> - -<xsl:template match="footnote" mode="table.footnote.mode"> - <xsl:choose> - <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'"> - <fo:block xsl:use-attribute-sets="table.footnote.properties"> - <xsl:apply-templates/> - </fo:block> - </xsl:when> - - <xsl:when test="function-available('exsl:node-set')"> - <fo:block xsl:use-attribute-sets="table.footnote.properties"> - <xsl:apply-templates select="*[1]" mode="footnote.body.number"/> - <xsl:apply-templates select="*[position() > 1]"/> - </fo:block> - </xsl:when> - - <xsl:otherwise> - <xsl:message> - <xsl:text>Warning: footnote number may not be generated </xsl:text> - <xsl:text>correctly; </xsl:text> - <xsl:value-of select="local-name(*[1])"/> - <xsl:text> unexpected as first child of footnote.</xsl:text> - </xsl:message> - <fo:block xsl:use-attribute-sets="table.footnote.properties"> - <xsl:apply-templates/> - </fo:block> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -</xsl:stylesheet> |