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