~ubuntu-branches/ubuntu/utopic/xubuntu-docs/utopic-proposed

« back to all changes in this revision

Viewing changes to desktop-guide/libs/xubuntu-html-chunk-cust.xsl

  • Committer: Package Import Robot
  • Author(s): Matthew East, Matthew East, Jeremy Bicha
  • Date: 2012-09-19 20:38:04 UTC
  • Revision ID: package-import@ubuntu.com-20120919203804-1t50gcb1xi8xbyzo
Tags: 12.10.1
[ Matthew East ]
* Complete rewrite of desktop-guide by Pasi Lallinaho
* Change to folder structure of desktop-guide to allow translations

[ Jeremy Bicha ]
* debian/control:
  - Bump Standards-Version to 3.9.3 and debhelper to 8
  - Don't build-depend on ubuntu-docs
* debian/preinst: Dropped, not needed after 12.04 LTS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8" ?>
2
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
 
    <!-- This file is a customization layer for HTML only -->
4
 
    <!-- ======================= -->
5
 
    <!-- Imports -->
 
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
        <!-- This file is a customization layer for HTML only -->
 
6
        <!-- ======================= -->
 
7
        <!-- Imports -->
6
8
        <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/chunk.xsl"/>
7
 
        <xsl:import href="ubuntu-banner.xsl"/>  
 
9
        <xsl:import href="xubuntu-banner.xsl"/> 
8
10
 
9
 
    <!-- Params -->
10
 
    <xsl:param name="generate.legalnotice.link" select="1"/>
 
11
        <!-- Params -->
 
12
        <xsl:param name="generate.legalnotice.link" select="1"/>
11
13
        <!-- requires DocBook XSL 1.69.1a -->
12
 
    <xsl:param name="generate.revhistory.link" select="1"/>
13
 
<!--
14
 
    <xsl:param name="generate.toc" select="'no'"/>
15
 
-->
16
 
    <xsl:param name="toc.section.depth" select="1"/>
17
 
    <xsl:param name="chunker.output.indent" select="'yes'"/>
18
 
    <xsl:param name="body.font.master" select="10"/>
19
 
    <xsl:param name="html.stylesheet" select="'common/xubuntu-book.css'"/>
20
 
    <xsl:param name="shade.verbatim" select="0"/>
21
 
    <xsl:param name="draft.mode" select="'no'"/>
 
14
        <xsl:param name="generate.revhistory.link" select="1"/>
 
15
        <!-- <xsl:param name="generate.toc" select="'no'"/> -->
 
16
 
 
17
        <xsl:param name="toc.section.depth" select="1"/>
 
18
        <xsl:param name="chunker.output.indent" select="'yes'"/>
 
19
        <xsl:param name="body.font.master" select="10"/>
 
20
        <xsl:param name="html.stylesheet" select="'../common/xubuntu-book.css'"/>
 
21
        <xsl:param name="shade.verbatim" select="0"/>
 
22
        <xsl:param name="draft.mode" select="'no'"/>
22
23
 
23
24
        <!-- disable scaling (which is needed for PDF generation) -->
24
25
        <xsl:param name="ignore.image.scaling" select="1"/>
25
26
 
26
27
        <!--Navigation Graphics-->
27
28
        <xsl:param name="navig.graphics" select="1"/>
28
 
        <xsl:param name="navig.graphics.path" select="'common/images/navig/'"/>
 
29
        <xsl:param name="navig.graphics.path" select="'../common/images/navig/'"/>
29
30
        <xsl:param name="navig.graphics.extension" select="'.png'"/> 
30
31
        <xsl:param name="navig.showtitles" select="1"/>
31
32
        
32
33
        <!--Admon Graphics--> 
33
34
        <xsl:param name="admon.graphics" select="1"/>
34
35
        <xsl:param name="admon.textlabel" select="0"/>
35
 
        <xsl:param name="admon.graphics.path" select="'common/images/admon/'"/>
 
36
        <xsl:param name="admon.graphics.path" select="'../common/images/admon/'"/>
36
37
        <xsl:param name="admon.graphics.extension" select="'.png'"/>
37
38
        
38
39
        <!-- Callout Graphics -->
39
40
        <xsl:param name="callout.unicode" select="1"/>
40
41
        <xsl:param name="callout.graphics" select="0"/>
41
 
        <xsl:param name="callout.graphics.path" select="'common/images/callouts/'"/>
 
42
        <xsl:param name="callout.graphics.path" select="'../common/images/callouts/'"/>
42
43
        <xsl:param name="callout.graphics.extension" select="'.png'"/>
43
44
        
44
 
    <!-- Inline Formatting -->
45
 
    <xsl:template match="application">
46
 
      <xsl:call-template name="inline.boldseq"/>
47
 
    </xsl:template>
48
 
    <xsl:template match="guibutton">
49
 
      <xsl:call-template name="inline.boldseq"/>
50
 
    </xsl:template>
51
 
    <xsl:template match="guilabel">
52
 
      <xsl:call-template name="inline.italicseq"/>
53
 
    </xsl:template>
 
45
        <!-- Show all subpages directly below the mainpage -->
 
46
        <xsl:param name="chunk.section.depth" select="0" />
 
47
 
 
48
        <!-- Inline Formatting -->
 
49
        <xsl:template match="application">
 
50
                <xsl:call-template name="inline.boldseq"/>
 
51
        </xsl:template>
 
52
        <xsl:template match="guibutton">
 
53
                <xsl:call-template name="inline.boldseq"/>
 
54
        </xsl:template>
 
55
        <xsl:template match="guilabel">
 
56
                <xsl:call-template name="inline.italicseq"/>
 
57
        </xsl:template>
 
58
        <xsl:template match="processing-instruction('br')">
 
59
                <br />
 
60
                <fo:block/>
 
61
        </xsl:template>
 
62
 
 
63
        <!-- Icons -->
 
64
        <xsl:template match="inlinemediaobject[@role = 'icon-pkg']" mode="class.value">
 
65
                <xsl:value-of select="'inline-icon-pkg'"/>
 
66
        </xsl:template>
 
67
        <xsl:template match="inlinemediaobject[@role = 'icon-key']" mode="class.value">
 
68
                <xsl:value-of select="'inline-icon-key'"/>
 
69
        </xsl:template>
 
70
 
54
71
 
55
72
        <xsl:param name="use.id.as.filename" select="1"/>
56
73
    
57
74
        <!-- this strippath template is copied from the 1.68.1 version of common.xls  -->
58
75
        <xsl:template name="strippath">
59
 
          <xsl:param name="filename" select="''"/>
60
 
          <xsl:choose>
61
 
            <!-- Leading .. are not eliminated -->
62
 
            <xsl:when test="starts-with($filename, '../')">
63
 
              <xsl:value-of select="'../'"/>
64
 
              <xsl:call-template name="strippath">
65
 
                <xsl:with-param name="filename" select="substring-after($filename, '../')"/>
66
 
              </xsl:call-template>
67
 
            </xsl:when>
68
 
            <xsl:when test="contains($filename, '/../')">
69
 
              <xsl:call-template name="strippath">
70
 
                <xsl:with-param name="filename">
71
 
                  <xsl:call-template name="getdir">
72
 
                    <xsl:with-param name="filename" select="substring-before($filename, '/../')"/>
73
 
                  </xsl:call-template>
74
 
                  <xsl:value-of select="substring-after($filename, '/../')"/>
75
 
                </xsl:with-param>
76
 
              </xsl:call-template>
77
 
            </xsl:when>
78
 
            <xsl:otherwise>
79
 
              <xsl:value-of select="$filename"/>
80
 
            </xsl:otherwise>
81
 
          </xsl:choose>
 
76
                <xsl:param name="filename" select="''"/>
 
77
                <xsl:choose>
 
78
                        <!-- Leading .. are not eliminated -->
 
79
                        <xsl:when test="starts-with($filename, '../')">
 
80
                                <xsl:value-of select="'../'"/>
 
81
                                <xsl:call-template name="strippath">
 
82
                                        <xsl:with-param name="filename" select="substring-after($filename, '../')"/>
 
83
                                </xsl:call-template>
 
84
                        </xsl:when>
 
85
                        <xsl:when test="contains($filename, '/../')">
 
86
                                <xsl:call-template name="strippath">
 
87
                                        <xsl:with-param name="filename">
 
88
                                                <xsl:call-template name="getdir">
 
89
                                                        <xsl:with-param name="filename" select="substring-before($filename, '/../')"/>
 
90
                                                </xsl:call-template>
 
91
                                                <xsl:value-of select="substring-after($filename, '/../')"/>
 
92
                                        </xsl:with-param>
 
93
                                </xsl:call-template>
 
94
                        </xsl:when>
 
95
                        <xsl:otherwise>
 
96
                                <xsl:value-of select="$filename"/>
 
97
                        </xsl:otherwise>
 
98
                </xsl:choose>
82
99
        </xsl:template>
83
 
 
84
100
</xsl:stylesheet>