Finish ChangeLog, ChangeLog plain-text version, reduced HTML size and
[terminatorX.git] / website / teXt.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3   <xsl:template match="section">
4     <html>
5       <head>
6         <meta content="Alexander Koenig" name="Author"/>
7         <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>
8         <title><xsl:value-of select="@name"/></title>
9           </head>
10       <body>
11          <xsl:apply-templates/>
12       </body>
13     </html>
14   </xsl:template>
15   <xsl:template match="heading">
16     <font size="+2">
17       <xsl:apply-templates/>
18     </font>
19     <br/>
20   </xsl:template>
21   <xsl:template match="subtitle">
22     <font size="-2">
23       <xsl:apply-templates/>
24     </font>
25   </xsl:template>
26   <xsl:template match="para">
27     <xsl:if test="@class='fancy'">
28       <p class="fancy">
29         <xsl:apply-templates/>
30       </p>
31     </xsl:if>
32     <xsl:if test="@class='plain'">
33       <p class="plain">
34         <xsl:apply-templates/>
35       </p>
36     </xsl:if>
37   </xsl:template>
38   <xsl:template match="italic">
39     <i>
40       <xsl:apply-templates/>
41     </i>
42   </xsl:template>
43   <xsl:template match="red">
44     <font color="#FF0000">
45       <xsl:apply-templates/>
46     </font>
47   </xsl:template>
48   <xsl:template match="bold">
49     <b>
50       <xsl:apply-templates/>
51     </b>
52   </xsl:template>
53   <xsl:template match="newsheader"/>
54   <xsl:template match="newsitem">
55     <table border="0" cellpadding="0" cellspacing="0">
56       <!-- header -->
57       <tr>
58         <td bgcolor="#999999">
59           <xsl:for-each select="newsheader">
60             <table border="0" cellpadding="2px" cellspacing="0">
61               <tr>
62                 <td>
63                   <img alt="new:" src="pix/new.png"/>
64                 </td>
65                 <td align="left" valign="middle" width="100%">
66                   <font size="+1">
67                     <xsl:apply-templates/>
68                   </font>
69                   <font color="#DDDDDD" size="+1"> [<xsl:value-of select="@date"/>]</font>
70                 </td>
71               </tr>
72             </table>
73           </xsl:for-each>
74         </td>
75       </tr>
76       <!-- contents -->
77       <tr>
78         <td>
79           <xsl:apply-templates/>
80         </td>
81       </tr>
82     </table>
83   </xsl:template>
84   <xsl:template match="link">
85      <xsl:apply-templates/>
86   </xsl:template>
87   <xsl:template match="dblink">
88     <xsl:variable name="search" select="@id"/>
89     <a>
90       <xsl:attribute name="href">
91         <xsl:value-of select="//dlink[@id=$search]/@url"/>
92       </xsl:attribute>
93       <xsl:choose>
94         <xsl:when test="./text()">
95           <xsl:apply-templates/>
96         </xsl:when>
97         <xsl:otherwise>
98           <xsl:value-of select="//dlink[@id=$search]/@text"/>
99         </xsl:otherwise>
100       </xsl:choose>
101     </a>
102     <xsl:if test="sum(//dlink[@id=$search])=0">
103       <font color="#FF0000">
104         <blink>broken dblink &quot;<xsl:value-of select="$search"/>&quot;</blink>
105       </font>
106     </xsl:if>
107   </xsl:template>
108   <xsl:template match="newline">
109     <br/>
110   </xsl:template>
111   <xsl:template match="itemizedlist">CLOSE_DA_P <ul>
112       <xsl:apply-templates/>
113     </ul>OPEN_DA_P</xsl:template>
114   <xsl:template match="listitem">
115     <li>
116       <xsl:apply-templates/>
117     </li>
118   </xsl:template>
119   <xsl:template match="person">
120           <xsl:value-of select="name"/> &lt;<xsl:value-of select="email"/>&gt;
121   </xsl:template>
122   <xsl:template match="index">
123     <p>
124       <font size="+2">
125         <b><xsl:value-of select="title"/></b>
126       </font>
127     </p>
128     <ul>
129       <xsl:for-each select="//subsection">
130         <li>
131           <a>
132             <xsl:attribute name="href">#<xsl:value-of select="title"/>
133             </xsl:attribute>
134             <xsl:value-of select="title"/>
135           </a>
136         </li>
137       </xsl:for-each>
138     </ul>
139     <p/>
140   </xsl:template>
141   <xsl:template match="subsection">
142     <p>
143       <font size="+1"><b>
144         <a>
145           <xsl:attribute name="name">
146             <xsl:value-of select="title"/>
147           </xsl:attribute>
148           <xsl:value-of select="title"/>
149         </a>
150       </b></font>
151     </p>
152     <xsl:apply-templates/>
153   </xsl:template>
154   <xsl:template match="title"/>
155   <xsl:template match="tarfiles">
156     <ul>
157       <xsl:for-each select="tar">
158         <xsl:if test="@version!=//current/@version">
159           <li>Version <xsl:value-of select="@version"/>: <a>
160               <xsl:attribute name="href">dist/terminatorX-<xsl:value-of
161                 select="@version"/>.tar.gz</xsl:attribute>terminatorX-<xsl:value-of select="@version"/>.tar.gz</a>
162             <xsl:if test="@havebz2='yes'"> (<a>
163                 <xsl:attribute name="href">dist/terminatorX-<xsl:value-of select="@version"/>.tar.bz2</xsl:attribute>bz2</a>)</xsl:if>
164           </li>
165         </xsl:if>
166       </xsl:for-each>
167     </ul>
168   </xsl:template>
169   <xsl:template match="rpm" name="rpm">
170     <li>
171       <xsl:if test="@type='src'">Source RPM: </xsl:if>
172       <xsl:if test="@type!='src'">
173         <xsl:value-of select="@type"/>-binary RPM: </xsl:if>
174       <a>
175         <xsl:attribute name="href">rpms/terminatorX-<xsl:value-of select="@version"/>-<xsl:value-of
176             select="@rpmsubversion"/>.<xsl:value-of select="@type"/>.<xsl:if test="@ext">
177             <xsl:value-of select="@ext"/>.</xsl:if>rpm</xsl:attribute> terminatorX-<xsl:value-of
178           select="@version"/>-<xsl:value-of select="@rpmsubversion"/>.<xsl:value-of
179           select="@type"/>.<xsl:if test="@ext">
180           <xsl:value-of select="@ext"/>.</xsl:if>rpm</a>
181       <xsl:if test="@distribution"> built for: <i>
182           <xsl:value-of select="@distribution"/>
183         </i>
184       </xsl:if>
185       <xsl:if test="@note">
186         <b> note: </b>
187         <xsl:value-of select="@note"/>
188       </xsl:if>
189     </li>
190   </xsl:template>
191   <xsl:template match="rpmfiles">
192     <ul>
193       <xsl:for-each select="rpm[@version!=//current/@version]">
194         <xsl:call-template name="rpm"/>
195       </xsl:for-each>
196     </ul>
197   </xsl:template>
198   <xsl:template match="currentversion">
199     <p>The current terminatorX release is Version <xsl:value-of select="//current/@version"/>.
200       <br/>Download as:</p>
201     <ul>
202       <li>tar file: <a>
203           <xsl:attribute name="href">dist/terminatorX-<xsl:value-of
204             select="//current/@version"/>.tar.gz</xsl:attribute>terminatorX-<xsl:value-of select="//current/@version"/>.tar.gz</a>
205         <xsl:if test="//current/@havebz2='yes'"> (<a>
206             <xsl:attribute name="href">dist/terminatorX-<xsl:value-of select="//current/@version"/>.tar.bz2</xsl:attribute>bz2</a>)</xsl:if>
207       </li>
208       <xsl:for-each select="//rpm[@version=//current/@version]">
209         <xsl:call-template name="rpm"/>
210       </xsl:for-each>
211     </ul>
212     <xsl:if test="sum(//rpm[@version=//current/@version])=0">Sorry, no RPMs available for the
213       current release, yet. Stay tuned.</xsl:if>
214   </xsl:template>
215   <xsl:template match="filelist">
216     <ul>
217       <xsl:for-each select="file">
218         <li>
219           <xsl:call-template name="file"/>
220         </li>
221       </xsl:for-each>
222     </ul>
223   </xsl:template>
224   <xsl:template match="file" name="file">
225     <a>
226       <xsl:attribute name="href">files/<xsl:apply-templates/>
227       </xsl:attribute>
228       <xsl:apply-templates/>
229     </a>
230   </xsl:template>
231   <xsl:template match="faq">
232     <a name="index">
233       <font size="+1">Question-Index:</font>
234     </a>
235     <ul>
236       <xsl:for-each select="qa">
237         <li>
238           <a>
239             <xsl:attribute name="href">#<xsl:value-of select="position()"/>
240             </xsl:attribute>
241             <xsl:value-of select="question"/>
242           </a>
243         </li>
244       </xsl:for-each>
245     </ul>
246     <p>
247       <font size="+1">Answers:</font>
248     </p>
249     <xsl:apply-templates/>
250   </xsl:template>
251   <xsl:template match="qa">
252     <table border="0" cellpadding="0" cellspacing="0" width="100%">
253       <tr>
254         <td bgcolor="#999999">
255           <table border="0" cellpadding="3px" cellspacing="0" width="100%">
256             <tr>
257               <td>
258                 <a>
259                   <xsl:attribute name="name">
260                     <xsl:value-of select="position() div 2"/>
261                   </xsl:attribute>
262                   <font color="#FFEE88" size="+1">
263                     <xsl:value-of select="question"/>
264                   </font>
265                 </a>
266               </td>
267             </tr>
268           </table>
269         </td>
270       </tr>
271       <tr>
272         <td>
273           <xsl:apply-templates/>
274         </td>
275       </tr>
276     </table>
277     <p>
278       <font size="-1">
279         <a href="#index">(back to index)</a>
280       </font>
281     </p>
282   </xsl:template>
283   <xsl:template match="question"/>
284   <xsl:template match="answer">
285     <xsl:apply-templates/>
286   </xsl:template>
287   <xsl:template match="turntabletable">
288     <table border="2" cellpadding="2px" width="100%">
289       <!--
290   
291 <tr bgcolor="#FFFF99">
292 <td width="100%" colspan="2">
293 <font face="Arial,Helvetica" color="#000000" size="+2">
294 <b>Users' Turntables
295 </b>
296 </font>
297 </td>
298 </tr>
299   -->
300       <xsl:apply-templates/>
301     </table>
302   </xsl:template>
303   <xsl:template match="tt">
304     <tr bgcolor="#FFFF99">
305       <td align="left" colspan="2" width="100%">
306         <font color="#000000" face="Arial,Helvetica" size="+1">
307           <b>
308             <xsl:value-of select="@title"/>
309           </b>
310         </font>
311       </td>
312     </tr>
313     <tr>
314       <td valign="top" width="50%">
315         <xsl:for-each select="author">
316           <b>Creator:</b>
317           <xsl:apply-templates/>
318           <br/>
319         </xsl:for-each>
320         <xsl:for-each select="text">
321           <xsl:apply-templates/>
322         </xsl:for-each>
323       </td>
324       <td width="50%">
325         <table width="100%">
326           <tr>
327             <xsl:for-each select="ttimages">
328               <xsl:apply-templates/>
329             </xsl:for-each>
330           </tr>
331         </table>
332       </td>
333     </tr>
334   </xsl:template>
335   <xsl:template match="scratchtable">
336     <table border="2" width="100%">
337       <tr bgcolor="#FFFF99">
338         <td>
339           <font color="#000000" face="Arial,Helvetica" size="+1">
340             <b>Scratch</b>
341           </font>
342         </td>
343         <td>
344           <font color="#000000" face="Arial,Helvetica" size="+1">
345             <b>Author</b>
346           </font>
347         </td>
348         <td>
349           <font color="#000000" face="Arial,Helvetica" size="+1">
350             <b>Description</b>
351           </font>
352         </td>
353       </tr>
354       <xsl:apply-templates/>
355     </table>
356   </xsl:template>
357   <xsl:template match="scratch">
358     <tr>
359       <xsl:apply-templates/>
360     </tr>
361   </xsl:template>
362   <xsl:template match="mp3file|author|comment">
363     <td valign="top">
364       <xsl:apply-templates/>
365     </td>
366   </xsl:template>
367   <xsl:template match="tinycomment|filesize">
368     <br/>
369     <font size="-1">
370       <xsl:apply-templates/>
371     </font>
372   </xsl:template>
373   <xsl:template match="screen">
374     <span style="font-family: monospace; color: #DDFFDD">
375       <xsl:apply-templates/>
376     </span>
377   </xsl:template>
378
379   <xsl:template match="changelog">
380     <span style="font-family: monospace;">
381     <p><font size="+2">terminatorX ChangeLog</font></p>
382         <p>Copyright (C) 1999-2004 Alexander KMAKE_THIS_MYOUMLnig</p>
383       <xsl:apply-templates/>
384           </span>
385   </xsl:template>
386
387   <xsl:template match="version">
388     <p><font size="+1">Version <xsl:value-of select="@name"/> <xsl:if 
389         test="@unreleased='true'"><i> (unreleased) </i></xsl:if></font>
390         </p>
391         <ul>
392       <xsl:apply-templates/>
393          </ul>
394   </xsl:template>
395   
396   <xsl:template match="screenshot">
397     <xsl:if test="name(.)='screenshot'">CLOSE_DA_P</xsl:if>
398     <center>
399       <table border="0" width="100%">
400         <tr>
401           <td>
402             <center>
403               <a>
404                 <xsl:attribute name="href">pix/<xsl:value-of select="@filename"/>
405                 </xsl:attribute>
406                 <img border="0">
407                   <xsl:attribute name="alt">
408                     <xsl:value-of select="name(.)"/>
409                   </xsl:attribute>
410                   <xsl:attribute name="src">pix/pre_<xsl:value-of select="@filename"/>
411                   </xsl:attribute>
412                 </img>
413               </a>
414             </center>
415           </td>
416         </tr>
417         <tr>
418           <td>
419             <center>
420               <xsl:apply-templates/>
421             </center>
422           </td>
423         </tr>
424       </table>
425     </center>
426     <xsl:if test="name(.)='screenshot'">OPEN_DA_P</xsl:if>
427   </xsl:template>
428   <xsl:template match="image">
429     <xsl:if test="position()&gt;3">
430       <xsl:if test="(position() div 2) mod 3=1">NEW_TT_ROW</xsl:if>
431     </xsl:if>
432     <td align="center" valign="top" width="33%">
433       <table border="0">
434         <tr>
435           <td>
436             <center>
437               <a>
438                 <xsl:attribute name="href">pix/<xsl:value-of select="@filename"/>
439                 </xsl:attribute>
440                 <img border="0">
441                   <xsl:attribute name="alt">
442                     <xsl:value-of select="name(.)"/>
443                   </xsl:attribute>
444                   <xsl:attribute name="src">pix/pre_<xsl:value-of select="@filename"/>
445                   </xsl:attribute>
446                 </img>
447               </a>
448             </center>
449           </td>
450         </tr>
451         <tr>
452           <td>
453             <center>
454               <xsl:apply-templates/>
455             </center>
456           </td>
457         </tr>
458       </table>
459     </td>
460   </xsl:template>
461   <xsl:template match="ilink">
462     <table bgcolor="#999999" border="0" cellspacing="5px" width="100%">
463       <tr>
464         <xsl:if test="banner">
465           <td align="center" valign="top" width="90px">
466             <a>
467               <xsl:attribute name="href">
468                 <xsl:if test="link">
469                   <xsl:value-of select="link/@ref"/>
470                 </xsl:if>
471                 <xsl:if test="dblink">
472                   <xsl:variable name="search" select="dblink/@id"/>
473                   <xsl:value-of select="//dlink[@id=$search]/@url"/>
474                 </xsl:if>
475               </xsl:attribute>
476               <img border="0">
477                 <xsl:attribute name="alt">
478                   <xsl:value-of select="logo"/>
479                 </xsl:attribute>
480                 <xsl:attribute name="src">pix/banner/<xsl:value-of select="banner/@filename"/>
481                 </xsl:attribute>
482               </img>
483             </a>
484           </td>
485         </xsl:if>
486         <td valign="top">
487           <xsl:for-each select="para">
488             <xsl:apply-templates/>
489           </xsl:for-each>
490         </td>
491       </tr>
492     </table>
493     <xsl:if test="following-sibling::ilink">
494       <hr/>
495     </xsl:if>
496   </xsl:template>
497 </xsl:stylesheet>