source: stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/fop1.xsl@ 65b2904

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 65b2904 was 65b2904, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS-XSL Stylesheets files.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6840 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.5 KB
Line 
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
4 version='1.0'>
5
6<xsl:template match="*" mode="fop1.outline">
7 <xsl:apply-templates select="*" mode="fop1.outline"/>
8</xsl:template>
9
10<xsl:template match="set|book|part|reference|
11 preface|chapter|appendix|article
12 |glossary|bibliography|index|setindex
13 |refentry
14 |sect1|sect2|sect3|sect4|sect5|section"
15 mode="fop1.outline">
16
17 <xsl:variable name="id">
18 <xsl:call-template name="object.id"/>
19 </xsl:variable>
20 <xsl:variable name="bookmark-label">
21 <xsl:apply-templates select="." mode="object.title.markup"/>
22 </xsl:variable>
23
24 <!-- Put the root element bookmark at the same level as its children -->
25 <!-- If the object is a set or book, generate a bookmark for the toc -->
26
27 <xsl:choose>
28 <xsl:when test="parent::*">
29 <fo:bookmark internal-destination="{$id}">
30 <fo:bookmark-title>
31 <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
32 </fo:bookmark-title>
33 <xsl:apply-templates select="*" mode="fop1.outline"/>
34 </fo:bookmark>
35 </xsl:when>
36 <xsl:otherwise>
37 <fo:bookmark internal-destination="{$id}">
38 <fo:bookmark-title>
39 <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
40 </fo:bookmark-title>
41 </fo:bookmark>
42
43 <xsl:variable name="toc.params">
44 <xsl:call-template name="find.path.params">
45 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
46 </xsl:call-template>
47 </xsl:variable>
48
49 <xsl:if test="contains($toc.params, 'toc')
50 and (book|part|reference|preface|chapter|appendix|article
51 |glossary|bibliography|index|setindex
52 |refentry
53 |sect1|sect2|sect3|sect4|sect5|section)">
54 <fo:bookmark internal-destination="toc...{$id}">
55 <fo:bookmark-title>
56 <xsl:call-template name="gentext">
57 <xsl:with-param name="key" select="'TableofContents'"/>
58 </xsl:call-template>
59 </fo:bookmark-title>
60 </fo:bookmark>
61 </xsl:if>
62 <xsl:apply-templates select="*" mode="fop1.outline"/>
63 </xsl:otherwise>
64 </xsl:choose>
65<!--
66 <fo:bookmark internal-destination="{$id}"/>
67-->
68</xsl:template>
69
70
71</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.