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

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since c873d807 was c873d807, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added new-xsl files.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8196 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • 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.