1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2 xmlns:fo="http://www.w3.org/1999/XSL/Format"
5 <!-- ================================================================ -->
7 <!-- PTC/Arbortext Code for XSL 1.1 bookmark support -->
9 <!-- ================================================================ -->
11 <xsl:param name="ati.xsl11.bookmarks" select="1"/>
13 <xsl:variable name="ati-a-dia" select=
14 "'āăąćĉċčďđēĕėęěœĝğġģĥħĩīĭįıĵķĺļľŀłńņňŋōŏőŕŗřśŝşšţťŧũūŭůűųŵŷźżžĀĂĄĆĈĊČĎĐĒĔĖĘĚŒĜĞĠĢĤĦĨĪĬĮİĴĶĹĻĽĿŁŃŅŇŊŌŎŐŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ'"/>
16 <xsl:variable name="ati-a-asc" select=
17 "'aaaccccddeeeeeegggghhiiiiijklllllnnnnooorrrsssstttuuuuuuwyzzzAAACCCCDDEEEEEEGGGGHHIIIIIJKLLLLLNNNNOOORRRSSSSTTTUUUUUUWYYZZZ'"/>
19 <xsl:template match="*" mode="ati.xsl11.bookmarks">
20 <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>
23 <xsl:template match="set|book|part|reference|preface|chapter|appendix|article
24 |glossary|bibliography|index|setindex
25 |refentry|refsynopsisdiv
26 |refsect1|refsect2|refsect3|refsection
27 |sect1|sect2|sect3|sect4|sect5|section"
28 mode="ati.xsl11.bookmarks">
29 <xsl:variable name="id">
30 <xsl:call-template name="object.id"/>
32 <xsl:variable name="bookmark-label">
33 <xsl:apply-templates select="." mode="object.title.markup"/>
36 <!-- Put the root element bookmark at the same level as its children -->
37 <!-- If the object is a set or book, generate a bookmark for the toc -->
40 <xsl:when test="self::index and $generate.index = 0"/>
41 <xsl:when test="parent::*">
42 <fo:bookmark internal-destination="{$id}">
44 <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/>
46 <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>
50 <fo:bookmark internal-destination="{$id}">
52 <xsl:value-of select="translate($bookmark-label, $ati-a-dia, $ati-a-asc)"/>
56 <xsl:variable name="toc.params">
57 <xsl:call-template name="find.path.params">
58 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
61 <xsl:if test="contains($toc.params, 'toc')
62 and section|sect1|refentry
63 |article|bibliography|glossary
65 <fo:bookmark internal-destination="toc...{$id}">
67 <xsl:call-template name="gentext">
68 <xsl:with-param name="key" select="'TableofContents'"/>
73 <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>