~ubuntu-branches/ubuntu/precise/stylebook/precise

« back to all changes in this revision

Viewing changes to styles/christmas/stylesheets/document2html.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2007-07-16 07:01:18 UTC
  • Revision ID: james.westby@ubuntu.com-20070716070118-y1rz43swy1w9qosb
Tags: upstream-1.0~b3~svn20061109
ImportĀ upstreamĀ versionĀ 1.0~b3~svn20061109

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
 
 
3
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
 
4
 
 
5
  <xsl:param name="stylebook.project"/>
 
6
  <xsl:param name="copyright"/>
 
7
  <xsl:param name="id"/>
 
8
 
 
9
  <xsl:template match="/">
 
10
    <xsl:apply-templates/>
 
11
  </xsl:template>
 
12
 
 
13
  <xsl:template match="s1">
 
14
    <html>
 
15
      <head>
 
16
        <script language="JavaScript" type="text/javascript" src="resources/script.js"/>
 
17
        <title><xsl:value-of select="@title"/></title>
 
18
      </head>
 
19
      <body text="#000000" link="#990000" vlink="#660000" alink="#ff0000"
 
20
            topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"
 
21
            bgcolor="#ffffff">
 
22
        <!-- THE TOP BAR (HEADER) -->
 
23
        <table border="0" cellspacing="0" cellpadding="0" width="725">
 
24
          <tr height="60">
 
25
            <td width="137" rowspan="2">
 
26
              <img src="resources/logo-1.gif" width="137" height="65" border="0" vspace="0" hspace="0" align="left"/></td>
 
27
            <td width="583">
 
28
              <img src="graphics/{$id}-header.jpg" width="583" height="60" border="0" vspace="0" hspace="0" align="left"/></td>
 
29
            <td width="5">
 
30
              <img src="resources/red-lo.gif" width="5" height="60" border="0" vspace="0" hspace="0" align="left"/></td>
 
31
          </tr>
 
32
          <tr height="5">
 
33
            <td width="588" colspan="2">
 
34
              <img src="resources/red-lo.gif" width="588" height="5" border="0" vspace="0" hspace="0" align="left"/></td>
 
35
          </tr>
 
36
          <tr height="16">
 
37
            <td width="137" rowspan="2">
 
38
              <img src="resources/logo-2.gif" width="137" height="16" border="0" vspace="0" hspace="0" align="left"/></td>
 
39
            <td width="588" colspan="2">
 
40
              <img src="resources/green-bar.gif" width="173" height="16" border="0" vspace="0" hspace="0" align="left"/>
 
41
              <img src="resources/green-bar-1.gif" width="8" height="16" border="0" vspace="0" hspace="0" align="left"/>
 
42
              <a href="http://www.xml.org/" target="new">
 
43
                <img src="resources/www.xml.org.gif" width="100" height="16" border="0" vspace="0" hspace="0" align="left"/></a>
 
44
              <a href="http://www.w3.org/" target="new">
 
45
                <img src="resources/www.w3.org.gif" width="100" height="16" border="0" vspace="0" hspace="0" align="left"/></a>
 
46
              <a href="http://www.apache.org/" target="new">
 
47
                <img src="resources/www.apache.org.gif" width="100" height="16" border="0" vspace="0" hspace="0" align="left"/></a>
 
48
              <a href="http://xml.apache.org/" target="new">
 
49
                <img src="resources/xml.apache.org.gif" width="100" height="16" border="0" vspace="0" hspace="0" align="left"/></a>
 
50
              <img src="resources/green-bar-2.gif" width="7" height="16" border="0" vspace="0" hspace="0" align="left"/></td>
 
51
          </tr>
 
52
      </table>
 
53
        <!-- THE MAIN PANEL (SIDEBAR AND CONTENT) -->
 
54
        <table border="0" cellspacing="0" cellpadding="0" width="725">
 
55
          <tr>
 
56
            <!-- THE SIDE BAR -->
 
57
            <td width="130" valign="top" align="left">
 
58
              <img src="resources/logo-3.gif" width="130" height="33" border="0" vspace="0" hspace="0"/><br/>
 
59
              <xsl:apply-templates select="document($stylebook.project)"/>
 
60
            </td>
 
61
            <!-- THE CONTENT PANEL -->
 
62
            <td width="595" valign="top" align="left">
 
63
              <table border="0" cellspacing="0" cellpadding="3">
 
64
                <tr><td><font face="arial,helvetica,sanserif" color="#000000">
 
65
                  <xsl:apply-templates/>
 
66
                </font></td></tr>
 
67
              </table>
 
68
            </td>
 
69
          </tr>
 
70
        </table>
 
71
        <br/>
 
72
        <!-- THE COPYRIGHT NOTICE -->
 
73
        <table border="0" cellspacing="0" cellpadding="0" width="725">
 
74
          <tr>
 
75
            <td align="center" width="725">
 
76
              <img src="resources/green-hi.gif" width="715" height="1" border="0" vspace="0" hspace="0"/><br/>
 
77
              <img src="resources/green-lo.gif" width="715" height="1" border="0" vspace="0" hspace="0"/>
 
78
            </td>
 
79
          </tr>
 
80
          <tr>
 
81
            <td align="center" width="725"><font size="-1"><i>
 
82
              Copyright &#169; <xsl:value-of select="$copyright"/>.
 
83
              All Rights Reserved.
 
84
            </i><br/></font></td>
 
85
          </tr>
 
86
        </table>
 
87
      </body>
 
88
    </html>
 
89
  </xsl:template>
 
90
 
 
91
<!-- ###################################################################### -->
 
92
<!-- book -->
 
93
 
 
94
  <xsl:template match="book">
 
95
    <xsl:apply-templates/>
 
96
  </xsl:template>
 
97
 
 
98
  <xsl:template match="document|faqs|changes|group|container">
 
99
    <xsl:if test="@id=$id">
 
100
      <img src="graphics/{@id}-label-1.jpg" width="130" height="30" hspace="0" vspace="0" border="0" alt="{@label}"/>
 
101
    </xsl:if>
 
102
    <xsl:if test="@id!=$id">
 
103
      <a href="{@id}.html" onMouseOver="rolloverOn('side-{@id}');" onMouseOut="rolloverOff('side-{@id}');">
 
104
        <img onLoad="rolloverLoad('side-{@id}','graphics/{@id}-label-2.jpg','graphics/{@id}-label-3.jpg');"
 
105
             name="side-{@id}" src="graphics/{@id}-label-3.jpg" width="130" height="30" hspace="0" vspace="0" border="0" alt="{@label}"/>
 
106
      </a>
 
107
    </xsl:if>
 
108
    <br/>
 
109
  </xsl:template>
 
110
 
 
111
  <xsl:template match="external">
 
112
    <xsl:variable name="extid" select="concat('ext-',position())"/>
 
113
    <a href="{@href}" onMouseOver="rolloverOn('side-{$extid}');" onMouseOut="rolloverOff('side-{$extid}');">
 
114
      <img onLoad="rolloverLoad('side-{$extid}','graphics/{$extid}-label-2.jpg','graphics/{$extid}-label-3.jpg');"
 
115
           name="side-{$extid}" src="graphics/{$extid}-label-3.jpg" width="130" height="30" hspace="0" vspace="0" border="0" alt="{@label}"/>
 
116
    </a>
 
117
    <br/>
 
118
  </xsl:template>
 
119
 
 
120
  <xsl:template match="separator">
 
121
    <img src="resources/separator.gif" width="130" height="20" hspace="0" vspace="0" border="0"/><br/>
 
122
  </xsl:template>
 
123
 
 
124
 
 
125
<!-- ###################################################################### -->
 
126
<!-- document -->
 
127
 
 
128
  <xsl:template match="s2">
 
129
    <table width="589" cellspacing="0" cellpadding="0" border="0">
 
130
      <tr>
 
131
        <td bgcolor="ffffff" colspan="2" width="589">
 
132
          <table width="589" cellspacing="0" cellpadding="0" border="0">
 
133
            <tr>
 
134
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
135
              <td bgcolor="009900" width="587" height="1"><img src="resources/green-lo.gif" width="587" height="1" vspace="0" hspace="0" border="0"/></td>
 
136
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void-lo.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
137
            </tr>
 
138
            <tr>
 
139
              <td bgcolor="009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
140
              <td bgcolor="00cc00" width="587">
 
141
                <font size="+1" face="arial,helvetica,sanserif" color="#ffffff">
 
142
                  <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
 
143
                  <b><xsl:value-of select="@title"/></b>
 
144
                </font>
 
145
              </td>
 
146
              <td bgcolor="009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
147
            </tr>
 
148
            <tr>
 
149
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
150
              <td bgcolor="009900" width="587" height="1"><img src="resources/green-lo.gif" width="587" height="1" vspace="0" hspace="0" border="0"/></td>
 
151
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
152
            </tr>
 
153
          </table>
 
154
        </td>
 
155
      </tr>  
 
156
      <tr>
 
157
        <td width="10">&#160;</td>
 
158
        <td width="579">
 
159
          <font face="arial,helvetica,sanserif" color="#000000">
 
160
            <xsl:apply-templates/>
 
161
          </font>
 
162
        </td>
 
163
      </tr>  
 
164
    </table>
 
165
    <br/>
 
166
  </xsl:template>
 
167
 
 
168
  <xsl:template match="s3">
 
169
    <table width="579" cellspacing="0" cellpadding="0" border="0">
 
170
      <tr>
 
171
        <td bgcolor="ffffff" colspan="2" width="579">
 
172
          <table width="579" cellspacing="0" cellpadding="0" border="0">
 
173
            <tr>
 
174
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
175
              <td bgcolor="009900" width="577" height="1"><img src="resources/green-lo.gif" width="577" height="1" vspace="0" hspace="0" border="0"/></td>
 
176
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void-lo.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
177
            </tr>
 
178
            <tr>
 
179
              <td bgcolor="009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
180
              <td bgcolor="00cc00" width="577">
 
181
              <font face="arial,helvetica,sanserif" color="#ffffff">
 
182
                <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
 
183
                <b><xsl:value-of select="@title"/></b>
 
184
              </font>
 
185
              </td>
 
186
              <td bgcolor="009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
187
            </tr>
 
188
            <tr>
 
189
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
190
              <td bgcolor="009900" width="577" height="1"><img src="resources/green-lo.gif" width="577" height="1" vspace="0" hspace="0" border="0"/></td>
 
191
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
192
            </tr>
 
193
          </table>
 
194
        </td>
 
195
      </tr>  
 
196
      <tr>
 
197
        <td width="10">&#160;</td>
 
198
        <td width="569">
 
199
          <font size="-1" face="arial,helvetica,sanserif" color="#000000">
 
200
            <xsl:apply-templates/>
 
201
          </font>
 
202
        </td>
 
203
      </tr>  
 
204
    </table>
 
205
    <br/>
 
206
  </xsl:template>
 
207
 
 
208
  <xsl:template match="s4">
 
209
    <table width="569" cellspacing="0" cellpadding="0" border="0">
 
210
      <tr>
 
211
        <td bgcolor="ffffff" colspan="2" width="569">
 
212
          <table width="569" cellspacing="0" cellpadding="0" border="0">
 
213
            <tr>
 
214
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
215
              <td bgcolor="009900" width="567" height="1"><img src="resources/green-lo.gif" width="567" height="1" vspace="0" hspace="0" border="0"/></td>
 
216
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void-lo.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
217
            </tr>
 
218
            <tr>
 
219
              <td bgcolor="009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
220
              <td bgcolor="00cc00" width="567">
 
221
              <font size="-1" face="arial,helvetica,sanserif" color="#ffffff">
 
222
                <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
 
223
                <b><xsl:value-of select="@title"/></b>
 
224
              </font>
 
225
              </td>
 
226
              <td bgcolor="009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
227
            </tr>
 
228
            <tr>
 
229
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
230
              <td bgcolor="009900" width="567" height="1"><img src="resources/green-lo.gif" width="567" height="1" vspace="0" hspace="0" border="0"/></td>
 
231
              <td bgcolor="009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
232
            </tr>
 
233
          </table>
 
234
        </td>
 
235
      </tr>  
 
236
      <tr>
 
237
        <td width="10">&#160;</td>
 
238
        <td width="559">
 
239
          <font size="-1" face="arial,helvetica,sanserif" color="#000000">
 
240
            <xsl:apply-templates/>
 
241
          </font>
 
242
        </td>
 
243
      </tr>  
 
244
    </table>
 
245
    <br/>
 
246
  </xsl:template>
 
247
 
 
248
<!-- ###################################################################### -->
 
249
<!-- blocks -->
 
250
 
 
251
  <xsl:template match="p">
 
252
    <p><xsl:apply-templates/></p>
 
253
  </xsl:template>
 
254
 
 
255
  <xsl:template match="note">
 
256
    <table width="100%" cellspacing="3" cellpadding="0" border="0">
 
257
      <tr>
 
258
        <td width="20" valign="top">
 
259
          <img src="resources/note.gif" width="20" height="24" vspace="0" hspace="0" border="0" alt="Note"/>
 
260
        </td>
 
261
        <td valign="top">
 
262
          <font size="-1" face="arial,helvetica,sanserif" color="#000000">
 
263
            <i>
 
264
              <xsl:apply-templates/>
 
265
            </i>
 
266
          </font>
 
267
        </td>
 
268
      </tr>  
 
269
    </table>
 
270
  </xsl:template>
 
271
 
 
272
  <xsl:template match="ul">
 
273
    <ul><xsl:apply-templates/></ul>
 
274
  </xsl:template>
 
275
 
 
276
  <xsl:template match="ol">
 
277
    <ol><xsl:apply-templates/></ol>
 
278
  </xsl:template>
 
279
 
 
280
  <xsl:template match="li">
 
281
    <li><xsl:apply-templates/></li>
 
282
  </xsl:template>
 
283
 
 
284
  <xsl:template match="source">
 
285
  <div align="right">
 
286
  <table width="464" cellspacing="4" cellpadding="0" border="0">
 
287
    <tr>
 
288
      <td bgcolor="#009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
289
      <td bgcolor="#009900" width="462" height="1"><img src="resources/void.gif" width="462" height="1" vspace="0" hspace="0" border="0"/></td>
 
290
      <td bgcolor="#009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
291
    </tr>
 
292
    <tr>
 
293
      <td bgcolor="#009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
294
      <td bgcolor="#ffffff"  width="462">
 
295
          <font size="-1"><pre><xsl:apply-templates/></pre></font>
 
296
      </td>
 
297
      <td bgcolor="#009900" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
 
298
    </tr>
 
299
    <tr>
 
300
      <td bgcolor="#009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
301
      <td bgcolor="#009900" width="462" height="1"><img src="resources/void.gif" width="462" height="1" vspace="0" hspace="0" border="0"/></td>
 
302
      <td bgcolor="#009900" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
 
303
    </tr>
 
304
  </table>
 
305
  </div>
 
306
  </xsl:template>
 
307
 
 
308
  <xsl:template match="table">
 
309
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
 
310
      <xsl:apply-templates/>
 
311
    </table>
 
312
  </xsl:template>
 
313
 
 
314
  <xsl:template match="tr">
 
315
    <tr><xsl:apply-templates/></tr>
 
316
  </xsl:template>
 
317
 
 
318
  <xsl:template match="th">
 
319
    <td bgcolor="#006600" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center">
 
320
      <font color="#ffffff" size="-1" face="arial,helvetica,sanserif">
 
321
        <b><xsl:apply-templates/></b>&#160;
 
322
      </font>
 
323
    </td>
 
324
  </xsl:template>
 
325
 
 
326
  <xsl:template match="td">
 
327
    <td bgcolor="#009900" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="left">
 
328
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
 
329
        <xsl:apply-templates/>&#160;
 
330
      </font>
 
331
    </td>
 
332
  </xsl:template>
 
333
 
 
334
  <xsl:template match="tn">
 
335
    <td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}">
 
336
      &#160;
 
337
    </td>
 
338
  </xsl:template>
 
339
 
 
340
<!-- ###################################################################### -->
 
341
<!-- markup -->
 
342
 
 
343
  <xsl:template match="em">
 
344
    <b><xsl:apply-templates/></b>
 
345
  </xsl:template>
 
346
 
 
347
  <xsl:template match="ref">
 
348
    <i><xsl:apply-templates/></i>
 
349
  </xsl:template>
 
350
  
 
351
  <xsl:template match="code">
 
352
    <code><font face="courier, monospaced"><xsl:apply-templates/></font></code>
 
353
  </xsl:template>
 
354
  
 
355
  <xsl:template match="br">
 
356
    <br/>
 
357
  </xsl:template>
 
358
  
 
359
<!-- ###################################################################### -->
 
360
<!-- links -->
 
361
 
 
362
  <xsl:template match="link">
 
363
    <xsl:if test="string-length(@anchor)=0">
 
364
      <xsl:if test="string-length(@idref)=0">
 
365
        <xsl:apply-templates/>
 
366
      </xsl:if>
 
367
      <xsl:if test="string-length(@idref)>0">
 
368
        <a href="{@idref}.html"><xsl:apply-templates/></a>
 
369
      </xsl:if>
 
370
    </xsl:if>
 
371
 
 
372
    <xsl:if test="string-length(@anchor)>0">
 
373
      <xsl:if test="string-length(@idref)=0">
 
374
        <a href="#{@anchor}"><xsl:apply-templates/></a>
 
375
      </xsl:if>
 
376
      <xsl:if test="string-length(@idref)>0">
 
377
        <a href="{@idref}.html#{@anchor}"><xsl:apply-templates/></a>
 
378
      </xsl:if>
 
379
    </xsl:if>
 
380
  </xsl:template>
 
381
 
 
382
  <xsl:template match="anchor">
 
383
    <a name="{@name}"><xsl:comment>anchor</xsl:comment></a>
 
384
  </xsl:template>
 
385
 
 
386
  <xsl:template match="jump">
 
387
    <a href="{@href}"><xsl:apply-templates/></a>
 
388
  </xsl:template>
 
389
 
 
390
  <xsl:template match="img">
 
391
    <img src="images/{@src}" border="0" vspace="4" hspace="4" align="right"/>
 
392
  </xsl:template>
 
393
 
 
394
<!-- ###################################################################### -->
 
395
<!-- copy
 
396
 
 
397
  <xsl:template match="@*|node()">
 
398
    <xsl:copy>
 
399
      <xsl:apply-templates select="@*|node()"/>
 
400
    </xsl:copy>
 
401
  </xsl:template>
 
402
-->
 
403
</xsl:stylesheet>
 
 
b'\\ No newline at end of file'