2008-10-09 [colin] 3.6.0cvs20
[claws.git] / manual / dtd / manual.xsl
1 <?xml version="1.0" encoding="utf-8"?>
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:import href="@DOCBOOK_XSL_PATH@/fo/docbook.xsl"/>
7
8 <xsl:param name="fop1.extensions" select="1"/>
9 <xsl:param name="title.margin.left" select="'0pt'"/>
10 <xsl:param name="body.start.indent" select="'0pt'"/>
11 <xsl:param name="variablelist.as.blocks" select="1"/>
12 <xsl:param name="paper.type" select="'A4'"/>
13
14 <xsl:template match="processing-instruction('hard-pagebreak')">
15    <fo:block break-before='page'/>
16 </xsl:template>
17  
18 <xsl:template match="appendix[@id='ap_glossary']/variablelist"
19               mode="fop1.outline">
20
21   <xsl:variable name="id">
22     <xsl:call-template name="object.id"/>
23   </xsl:variable>
24   
25   <xsl:variable name="bookmark-label">
26     <xsl:apply-templates select="." mode="object.title.markup"/>
27   </xsl:variable>
28
29   <!-- Put the root element bookmark at the same level as its children -->
30   <!-- If the object is a set or book, generate a bookmark for the toc -->
31
32   <xsl:choose>
33     <xsl:when test="parent::*">
34       <fo:bookmark internal-destination="{$id}">
35         <fo:bookmark-title>
36           <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
37         </fo:bookmark-title>
38         <xsl:apply-templates select="*" mode="fop1.outline"/>
39       </fo:bookmark>
40     </xsl:when>
41     <xsl:otherwise>
42       <fo:bookmark internal-destination="{$id}">
43         <fo:bookmark-title>
44           <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
45         </fo:bookmark-title>
46       </fo:bookmark>
47
48       <xsl:variable name="toc.params">
49         <xsl:call-template name="find.path.params">
50           <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
51         </xsl:call-template>
52       </xsl:variable>
53
54       <xsl:if test="contains($toc.params, 'toc')
55                     and (book|part|reference|preface|chapter|appendix|article
56                          |glossary|bibliography|index|setindex
57                          |refentry
58                          |sect1|sect2|sect3|sect4|sect5|section)">
59         <fo:bookmark internal-destination="toc...{$id}">
60           <fo:bookmark-title>
61             <xsl:call-template name="gentext">
62               <xsl:with-param name="key" select="'TableofContents'"/>
63             </xsl:call-template>
64           </fo:bookmark-title>
65         </fo:bookmark>
66       </xsl:if>
67       <xsl:apply-templates select="*" mode="fop1.outline"/>
68     </xsl:otherwise>
69   </xsl:choose>
70 </xsl:template>
71
72 </xsl:stylesheet>