Merge branch 'google' of ssh://drop.maemo.org/git/mdictionary into google
[mdictionary] / trunk / src / base / xsl.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:template match="/">
5         <html>
6            <head>
7               <link rel="stylesheet" type="text/css" href="styles.css" />  
8            </head>
9               <body>
10                  <table border="1" width="100%">
11                     <xsl:for-each select="ar/dict"> 
12                         <xsl:apply-templates/>
13                     </xsl:for-each>
14                  </table>
15               </body>
16         </html>
17 </xsl:template> 
18
19 <xsl:template match="info">
20         <tr>
21                 <th class="info">               
22                 <xsl:if test="@bookmark = 'true'">
23                         <img src="mydata://image.png"/>   
24                 </xsl:if>
25                 <xsl:value-of select="."/> <!-- <img src="{$path}"/> -->
26                 </th>
27         </tr>
28 </xsl:template>
29
30 <xsl:template match="key">
31         <tr>
32         <th class="key"><xsl:value-of select="."/></th>                 
33         </tr>
34 </xsl:template> 
35
36 <xsl:template match="t">
37         <tr>
38            <td><xsl:apply-templates/></td>
39         </tr>
40 </xsl:template>
41
42 <xsl:template match="tr">
43         [<span class="i"><xsl:apply-templates/></span>]
44 </xsl:template> 
45
46 <xsl:template match="pos">
47         (<span><xsl:apply-templates/></span>)
48 </xsl:template>
49
50 <xsl:template match="pot">
51         ,<span class="i"><xsl:apply-templates/></span>
52 </xsl:template>
53
54 <xsl:template match="tence">
55         ,<span class="i"><xsl:apply-templates/></span>
56 </xsl:template>
57
58 <xsl:template match="def">
59         ,(<xsl:apply-templates/>)
60 </xsl:template>
61
62 <xsl:template match="ex">
63         ,"<xsl:apply-templates/>"
64 </xsl:template>
65
66 <xsl:template match="b">
67         <span class="b"><xsl:apply-templates/></span>
68 </xsl:template>
69
70 <xsl:template match="u">
71         <span class="u"><xsl:apply-templates/></span>
72 </xsl:template>
73
74 <xsl:template match="i">
75         <span class="i"><xsl:apply-templates/></span>
76 </xsl:template> 
77
78 <xsl:template match="c">
79         <xsl:variable name="atr" select="@c"/>
80         <font color="{$atr}"> <xsl:apply-templates/></font>
81 </xsl:template>
82
83 <xsl:template match="br">
84         <br/>
85 </xsl:template>
86
87 <!--
88 <xsl:template match="table">
89         <table>
90         <xsl:apply-templates/>
91         </table>
92 </xsl:template>
93
94 <xsl:template match="tr">
95         <tr>
96         <xsl:apply-templates/>
97         </tr>
98 </xsl:template>
99
100 <xsl:template match="td">
101         <td>
102         <xsl:apply-templates/>
103         </td>
104 </xsl:template> -->
105
106 </xsl:stylesheet>