~noskcaj/ubuntu/vivid/thunar/1.6.4

« back to all changes in this revision

Viewing changes to docs/manual/Thunar-html.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-12-04 16:46:20 UTC
  • mto: (2.1.3 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 69.
  • Revision ID: james.westby@ubuntu.com-20101204164620-h7p4t2e9z6hfhz6l
Tags: upstream-1.1.4
ImportĀ upstreamĀ versionĀ 1.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0'?>
 
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
3
                version='1.0'
 
4
                xmlns="http://www.w3.org/TR/xhtml1/transitional"
 
5
                exclude-result-prefixes="#default">
 
6
 
 
7
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
 
8
 
 
9
<!-- Use stylesheet -->
 
10
<xsl:param name="html.stylesheet" select="'../thunar.css'"/>
 
11
 
 
12
<!-- labels and numbering -->
 
13
<xsl:param name="autotoc.label.separator" select="'. '"/>
 
14
<xsl:param name="chapter.autolabel" select="1"/>
 
15
 
 
16
<!-- Don't force the use of index.html as root filename -->
 
17
<xsl:param name="root.filename" select="''"/>
 
18
 
 
19
<!--  Use element id (if present) as file name  -->
 
20
<xsl:variable name="use.id.as.filename">1</xsl:variable>
 
21
 
 
22
<xsl:template match="releaseinfo" mode="titlepage.mode">
 
23
  <span class="{name(.)}">
 
24
    <br/>
 
25
    <xsl:apply-templates mode="titlepage.mode"/>
 
26
    <br/>
 
27
  </span>
 
28
</xsl:template>
 
29
 
 
30
<!-- Use graphics in admonitions (note, warning, etc)  -->
 
31
<xsl:variable name="admon.graphics">0</xsl:variable>
 
32
 
 
33
<xsl:param name="admon.style">
 
34
        <xsl:text>text-align: left;</xsl:text></xsl:param>
 
35
 
 
36
<xsl:variable name="admon.graphics.path">stylesheet-images/</xsl:variable>
 
37
 
 
38
<xsl:variable name="admon.graphics.extension">.gif</xsl:variable>
 
39
 
 
40
<xsl:param name="table.border.thickness" select="'0.2pt'"/>
 
41
 
 
42
<xsl:param name="graphic.default.extension" select="png"/>
 
43
 
 
44
<!-- This requires an adapted template for tgroup (see end of stylesheet) -->
 
45
<xsl:attribute-set name="table.style">
 
46
        <xsl:attribute name="bgcolor">#fdf9f8</xsl:attribute>
 
47
        <xsl:attribute name="cellspacing">0</xsl:attribute>
 
48
        <xsl:attribute name="cellpadding">4</xsl:attribute>
 
49
</xsl:attribute-set>
 
50
 
 
51
 
 
52
<xsl:param name="generate.legalnotice.link" select="0"/>
 
53
 
 
54
<!-- set font styles for various tags   -->
 
55
<xsl:template match="guibutton">
 
56
<xsl:call-template name="inline.boldseq"/>
 
57
</xsl:template>
 
58
 
 
59
<xsl:template match="guiicon">
 
60
<xsl:call-template name="inline.boldseq"/>
 
61
</xsl:template>
 
62
 
 
63
<xsl:template match="guilabel">
 
64
<xsl:call-template name="inline.boldseq"/>
 
65
</xsl:template>
 
66
 
 
67
<xsl:template match="guimenu">
 
68
<xsl:call-template name="inline.boldseq"/>
 
69
</xsl:template>
 
70
 
 
71
<xsl:template match="guimenuitem">
 
72
<xsl:call-template name="inline.boldseq"/>
 
73
</xsl:template>
 
74
 
 
75
<xsl:template match="guisubmenu">
 
76
<xsl:call-template name="inline.boldseq"/>
 
77
</xsl:template>
 
78
 
 
79
<xsl:template match="application">
 
80
<xsl:call-template name="inline.boldmonoseq"/>
 
81
</xsl:template>
 
82
 
 
83
<xsl:template match="caption">
 
84
<xsl:call-template name="inline.boldseq"/>
 
85
</xsl:template>
 
86
 
 
87
<!-- Adapted template for tgroup. The only change is the addition of -->
 
88
<!-- table.style attributes -->
 
89
<xsl:template match="tgroup">
 
90
  <table xsl:use-attribute-sets="table.style">
 
91
    <xsl:choose>
 
92
      <!-- If there's a <?dbhtml table-summary="foo"?> PI, use it for
 
93
           the HTML table summary attribute -->
 
94
      <xsl:when test="processing-instruction('dbhtml')">
 
95
        <xsl:variable name="summary">
 
96
          <xsl:call-template name="dbhtml-attribute">
 
97
            <xsl:with-param name="pis"
 
98
                            select="processing-instruction('dbhtml')[1]"/>
 
99
            <xsl:with-param name="attribute" select="'table-summary'"/>
 
100
          </xsl:call-template>
 
101
        </xsl:variable>
 
102
        <xsl:if test="$summary != ''">
 
103
          <xsl:attribute name="summary">
 
104
            <xsl:value-of select="$summary"/>
 
105
          </xsl:attribute>
 
106
        </xsl:if>
 
107
      </xsl:when>
 
108
      <!-- Otherwise, if there's a title, use that -->
 
109
      <xsl:when test="../title">
 
110
        <xsl:attribute name="summary">
 
111
          <xsl:value-of select="string(../title)"/>
 
112
        </xsl:attribute>
 
113
      </xsl:when>
 
114
      <!-- Otherwise, forget the whole idea -->
 
115
      <xsl:otherwise><!-- nevermind --></xsl:otherwise>
 
116
    </xsl:choose>
 
117
 
 
118
    <xsl:if test="../@pgwide=1">
 
119
      <xsl:attribute name="width">100%</xsl:attribute>
 
120
    </xsl:if>
 
121
 
 
122
    <xsl:choose>
 
123
      <xsl:when test="../@frame='none'">
 
124
        <xsl:attribute name="border">0</xsl:attribute>
 
125
      </xsl:when>
 
126
      <xsl:when test="$table.borders.with.css != 0">
 
127
        <xsl:attribute name="border">0</xsl:attribute>
 
128
        <xsl:choose>
 
129
          <xsl:when test="../@frame='topbot' or ../@frame='top'">
 
130
            <xsl:attribute name="style">
 
131
              <xsl:call-template name="border">
 
132
                <xsl:with-param name="side" select="'top'"/>
 
133
              </xsl:call-template>
 
134
            </xsl:attribute>
 
135
          </xsl:when>
 
136
          <xsl:when test="../@frame='sides'">
 
137
            <xsl:attribute name="style">
 
138
              <xsl:call-template name="border">
 
139
                <xsl:with-param name="side" select="'left'"/>
 
140
              </xsl:call-template>
 
141
              <xsl:call-template name="border">
 
142
                <xsl:with-param name="side" select="'right'"/>
 
143
              </xsl:call-template>
 
144
            </xsl:attribute>
 
145
          </xsl:when>
 
146
        </xsl:choose>
 
147
      </xsl:when>
 
148
      <xsl:otherwise>
 
149
        <xsl:attribute name="border">1</xsl:attribute>
 
150
      </xsl:otherwise>
 
151
    </xsl:choose>
 
152
 
 
153
    <xsl:variable name="colgroup">
 
154
      <colgroup>
 
155
        <xsl:call-template name="generate.colgroup">
 
156
          <xsl:with-param name="cols" select="@cols"/>
 
157
        </xsl:call-template>
 
158
      </colgroup>
 
159
    </xsl:variable>
 
160
 
 
161
    <xsl:variable name="explicit.table.width">
 
162
      <xsl:call-template name="dbhtml-attribute">
 
163
        <xsl:with-param name="pis"
 
164
                        select="../processing-instruction('dbhtml')[1]"/>
 
165
        <xsl:with-param name="attribute" select="'table-width'"/>
 
166
      </xsl:call-template>
 
167
    </xsl:variable>
 
168
 
 
169
    <xsl:variable name="table.width">
 
170
      <xsl:choose>
 
171
        <xsl:when test="$explicit.table.width != ''">
 
172
          <xsl:value-of select="$explicit.table.width"/>
 
173
        </xsl:when>
 
174
        <xsl:when test="$default.table.width = ''">
 
175
          <xsl:text>100%</xsl:text>
 
176
        </xsl:when>
 
177
        <xsl:otherwise>
 
178
          <xsl:value-of select="$default.table.width"/>
 
179
        </xsl:otherwise>
 
180
      </xsl:choose>
 
181
    </xsl:variable>
 
182
 
 
183
    <xsl:if test="$default.table.width != ''
 
184
                  or $explicit.table.width != ''">
 
185
      <xsl:attribute name="width">
 
186
        <xsl:choose>
 
187
          <xsl:when test="contains($table.width, '%')">
 
188
            <xsl:value-of select="$table.width"/>
 
189
          </xsl:when>
 
190
          <xsl:when test="$use.extensions != 0
 
191
                          and $tablecolumns.extension != 0">
 
192
            <xsl:choose>
 
193
              <xsl:when test="function-available('stbl:convertLength')">
 
194
                <xsl:value-of select="stbl:convertLength($table.width)"/>
 
195
              </xsl:when>
 
196
              <xsl:when test="function-available('xtbl:convertLength')">
 
197
                <xsl:value-of select="xtbl:convertLength($table.width)"/>
 
198
              </xsl:when>
 
199
              <xsl:otherwise>
 
200
                <xsl:message terminate="yes">
 
201
                  <xsl:text>No convertLength function available.</xsl:text>
 
202
                </xsl:message>
 
203
              </xsl:otherwise>
 
204
            </xsl:choose>
 
205
          </xsl:when>
 
206
          <xsl:otherwise>
 
207
            <xsl:value-of select="$table.width"/>
 
208
          </xsl:otherwise>
 
209
        </xsl:choose>
 
210
      </xsl:attribute>
 
211
    </xsl:if>
 
212
 
 
213
    <xsl:choose>
 
214
      <xsl:when test="$use.extensions != 0
 
215
                      and $tablecolumns.extension != 0">
 
216
        <xsl:choose>
 
217
          <xsl:when test="function-available('stbl:adjustColumnWidths')">
 
218
            <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
 
219
          </xsl:when>
 
220
          <xsl:when test="function-available('xtbl:adjustColumnWidths')">
 
221
            <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
 
222
          </xsl:when>
 
223
          <xsl:otherwise>
 
224
            <xsl:message terminate="yes">
 
225
              <xsl:text>No adjustColumnWidths function available.</xsl:text>
 
226
            </xsl:message>
 
227
          </xsl:otherwise>
 
228
        </xsl:choose>
 
229
      </xsl:when>
 
230
      <xsl:otherwise>
 
231
        <xsl:copy-of select="$colgroup"/>
 
232
      </xsl:otherwise>
 
233
    </xsl:choose>
 
234
 
 
235
    <xsl:apply-templates select="thead"/>
 
236
    <xsl:apply-templates select="tbody"/>
 
237
    <xsl:apply-templates select="tfoot"/>
 
238
 
 
239
    <xsl:if test=".//footnote">
 
240
      <tbody class="footnotes">
 
241
        <tr>
 
242
          <td colspan="{@cols}">
 
243
            <xsl:apply-templates select=".//footnote" 
 
244
                                 mode="table.footnote.mode"/>
 
245
          </td>
 
246
        </tr>
 
247
      </tbody>
 
248
    </xsl:if>
 
249
  </table>
 
250
</xsl:template>
 
251
 
 
252
 
 
253
</xsl:stylesheet>
 
254