diff options
| author | William Harrington <kb0iic@berzerkula.org> | 2014-11-27 16:29:31 -0600 | 
|---|---|---|
| committer | William Harrington <kb0iic@berzerkula.org> | 2014-11-27 16:29:31 -0600 | 
| commit | 7df987a652b93d55dd8eca363706d3bacc469b55 (patch) | |
| tree | 17f84ce0fee76a3a0476b714eae09486ab2470e6 /stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/.svn/text-base/fop.xsl.svn-base | |
Diffstat (limited to 'stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/.svn/text-base/fop.xsl.svn-base')
| -rw-r--r-- | stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/.svn/text-base/fop.xsl.svn-base | 92 | 
1 files changed, 92 insertions, 0 deletions
diff --git a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/.svn/text-base/fop.xsl.svn-base b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/.svn/text-base/fop.xsl.svn-base new file mode 100644 index 0000000..c3a06ba --- /dev/null +++ b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/.svn/text-base/fop.xsl.svn-base @@ -0,0 +1,92 @@ +<?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" +                xmlns:fox="http://xml.apache.org/fop/extensions" +                version='1.0'> + +<!-- ******************************************************************** +     $Id$ +     ******************************************************************** +     (c) Stephane Bline Peregrine Systems 2001 +     Driver file to allow pdf bookmarking (based on fop implementation). +     ******************************************************************** --> +<!-- +In PDF bookmarks can't be used characters with code>255. This version of file +translates characters with code>255 back to ASCII. + +   Pavel Zampach (zampach@volny.cz) +--> + +<xsl:variable name="a-dia" select= +"'āăąćĉċčďđēĕėęěœĝğġģĥħĩīĭįıĵķĺļľŀłńņňŋōŏőŕŗřśŝşšţťŧũūŭůűųŵŷźżžĀĂĄĆĈĊČĎĐĒĔĖĘĚŒĜĞĠĢĤĦĨĪĬĮİĴĶĹĻĽĿŁŃŅŇŊŌŎŐŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ'"/> +<xsl:variable name="a-asc" select= +"'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/> + +<xsl:template match="*" mode="fop.outline"> +  <xsl:variable name="id"> +    <xsl:value-of select="(@id|@xml:id)[1]"/> +  </xsl:variable> +  <xsl:if test="$id != ''"> +    <fox:destination internal-destination="{$id}"/> +  </xsl:if> +  <xsl:apply-templates select="*" mode="fop.outline"/> +</xsl:template> + +<xsl:template match="set|book|part|reference|preface|chapter|appendix|article +                     |glossary|bibliography|index|setindex +                     |refentry +                     |sect1|sect2|sect3|sect4|sect5|section" +              mode="fop.outline"> +  <xsl:variable name="id"> +    <xsl:call-template name="object.id"/> +  </xsl:variable> +  <xsl:variable name="bookmark-label"> +    <xsl:apply-templates select="." mode="object.title.markup"/> +  </xsl:variable> + +  <!-- Put the root element bookmark at the same level as its children --> +  <!-- If the object is a set or book, generate a bookmark for the toc --> + +  <xsl:choose> +    <xsl:when test="parent::*"> +      <fox:outline internal-destination="{$id}"> +        <fox:label> +          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> +        </fox:label> +        <xsl:apply-templates select="*" mode="fop.outline"/> +      </fox:outline> +    </xsl:when> +    <xsl:otherwise> +      <fox:outline internal-destination="{$id}"> +        <fox:label> +          <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> +        </fox:label> +      </fox:outline> + +      <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') +                    and (book|part|reference|preface|chapter|appendix|article +                         |glossary|bibliography|index|setindex +                         |refentry +                         |sect1|sect2|sect3|sect4|sect5|section)"> +        <fox:outline internal-destination="toc...{$id}"> +          <fox:label> +            <xsl:call-template name="gentext"> +              <xsl:with-param name="key" select="'TableofContents'"/> +            </xsl:call-template> +          </fox:label> +        </fox:outline> +      </xsl:if> +      <xsl:apply-templates select="*" mode="fop.outline"/> +    </xsl:otherwise> +  </xsl:choose> +  <fox:destination internal-destination="{$id}"/> +</xsl:template> + +</xsl:stylesheet> +  | 
