~ubuntu.cat/ubuntaires/ajuda

« back to all changes in this revision

Viewing changes to intrepid/libs/fo-cust.xsl

  • Committer: Arnau Alcázar Lleopart
  • Date: 2009-07-17 11:09:35 UTC
  • Revision ID: arnau@alcalleop.net-20090717110935-gnslz4lobcm7wj8y
Afegit la traducció de la intrepid

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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" version="1.0">
 
4
    <!-- =============== -->
 
5
    <!-- WE DONT USE THIS YET -->
 
6
    <!-- =============== -->
 
7
    
 
8
    <!-- This file is a customization layer for FO only -->
 
9
    <!-- ======================= -->
 
10
    <!-- Imports -->
 
11
    <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/current/fo/profile-docbook.xsl"/>
 
12
    <xsl:include href="common-cust.xsl"/>
 
13
    
 
14
    <!-- ======================= -->
 
15
    <!-- Parameters -->
 
16
    <!-- ======================= -->
 
17
    <xsl:param name="profile.condition" select="'fo'"/>
 
18
    <xsl:param name="fop.extensions" select="1"/>
 
19
    <xsl:param name="paper.type" select="'A4'"/>
 
20
    <xsl:param name="double.sided" select="1"/>
 
21
    <xsl:param name="header.rule" select="1"/>
 
22
    <xsl:param name="footer.rule" select="1"/>
 
23
    <xsl:param name="body.font.master" select="'11'"/>
 
24
    
 
25
  <!-- Admon Graphics -->
 
26
    <xsl:param name="admon.graphics" select="1"/>
 
27
    <xsl:param name="admon.textlabel" select="0"/>
 
28
    <xsl:param name="admon.graphics.path" select="'libs/admon/'"/>
 
29
    <xsl:param name="admon.graphics.extension" select="'.png'"/>
 
30
    
 
31
    <!-- Callout Graphics -->
 
32
    <xsl:param name="callout.unicode" select="1"/>
 
33
    <xsl:param name="callout.graphics" select="0"/>
 
34
    <xsl:param name="callout.graphics.path" select="'libs/callouts/'"/>
 
35
    <xsl:param name="callout.graphics.extension" select="'.png'"/>
 
36
  
 
37
    <!-- ======================= -->
 
38
    <!-- Attribute Sets -->
 
39
    <!-- ======================= -->
 
40
    
 
41
    <!-- Page Break -->
 
42
    <!--<xsl:attribute-set name="section.level1.properties">
 
43
      <xsl:attribute name="break-before">page</xsl:attribute>
 
44
    </xsl:attribute-set>-->
 
45
    
 
46
    <!-- Header Design Formatting-->
 
47
    <xsl:attribute-set name="header.content.properties">
 
48
        <xsl:attribute name="font-family">Helvetica</xsl:attribute>
 
49
        <xsl:attribute name="font-size">9pt</xsl:attribute>
 
50
    </xsl:attribute-set>
 
51
    
 
52
    <!-- ======================= -->
 
53
    <!-- Templates -->
 
54
    <!-- ======================= -->
 
55
 
 
56
    <!-- Running Header Footer Content-->
 
57
    <xsl:template name="header.content">
 
58
        <xsl:param name="pageclass" select="''"/>
 
59
        <xsl:param name="sequence" select="''"/>
 
60
        <xsl:param name="position" select="''"/>
 
61
        <xsl:param name="gentext-key" select="''"/>
 
62
        <xsl:variable name="candidate">
 
63
            <!-- sequence can be odd, even, first, blank -->
 
64
            <!-- position can be left, center, right -->
 
65
            <xsl:choose>
 
66
                <xsl:when test="$sequence = 'odd' and $position = 'left'">
 
67
                    <fo:retrieve-marker retrieve-class-name="section.head.marker"
 
68
                        retrieve-position="first-including-carryover" retrieve-boundary="page"/>
 
69
                </xsl:when>
 
70
                <xsl:when test="$sequence = 'odd' and $position = 'center'">
 
71
                    <xsl:call-template name="draft.text"/>
 
72
                </xsl:when>
 
73
                <xsl:when test="$sequence = 'odd' and $position = 'right'">
 
74
                    <fo:page-number/>
 
75
                </xsl:when>
 
76
                <xsl:when test="$sequence = 'even' and $position = 'left'">
 
77
                    <fo:page-number/>
 
78
                </xsl:when>
 
79
                <xsl:when test="$sequence = 'even' and $position = 'center'">
 
80
                    <xsl:call-template name="draft.text"/>
 
81
                </xsl:when>
 
82
                <xsl:when test="$sequence = 'even' and $position = 'right'">
 
83
                    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
 
84
                </xsl:when>
 
85
                <xsl:when test="$sequence = 'first' and $position = 'left'"/>
 
86
                <xsl:when test="$sequence = 'first' and $position = 'right'"/>
 
87
                <xsl:when test="$sequence = 'first' and $position = 'center'">
 
88
                    <xsl:value-of select="ancestor-or-self::book/bookinfo/corpauthor"/>
 
89
                </xsl:when>
 
90
                <xsl:when test="$sequence = 'blank' and $position = 'left'">
 
91
                    <fo:page-number/>
 
92
                </xsl:when>
 
93
                <xsl:when test="$sequence = 'blank' and $position = 'center'">
 
94
                    <xsl:text>This page intentionally left blank</xsl:text>
 
95
                </xsl:when>
 
96
                <xsl:when test="$sequence = 'blank' and $position = 'right'"/>
 
97
            </xsl:choose>
 
98
        </xsl:variable>
 
99
        <!-- Does runtime parameter turn off blank page headers? -->
 
100
        <xsl:choose>
 
101
            <xsl:when test="$sequence='blank' and $headers.on.blank.pages=0">
 
102
                <!-- no output -->
 
103
            </xsl:when>
 
104
            <!-- titlepages have no headers -->
 
105
            <xsl:when test="$pageclass = 'titlepage'">
 
106
                <!-- no output -->
 
107
            </xsl:when>
 
108
            <xsl:otherwise>
 
109
                <xsl:copy-of select="$candidate"/>
 
110
            </xsl:otherwise>
 
111
        </xsl:choose>
 
112
    </xsl:template>
 
113
    
 
114
    <!-- Switch OFF Running Footer -->
 
115
    <xsl:template name="footer.content"/>
 
116
    
 
117
    <!-- Page Break use &lt?pagebreak?;&gt; to insert a page break -->
 
118
    <xsl:template match="processing-instruction('pagebreak')">
 
119
        <fo:block break-after="page"/>
 
120
    </xsl:template>
 
121
    
 
122
</xsl:stylesheet>