Fixed downloaded dict untar on Maemo
[mdictionary] / data / xsl / 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         <div class="tab">
6                 <xsl:for-each select="ar"> 
7                         <xsl:apply-templates/>
8                 </xsl:for-each>
9         </div>
10 </xsl:template> 
11
12 <xsl:template match="dict">
13         <div class="dict"><xsl:apply-templates/></div>
14 </xsl:template>
15
16
17 <xsl:template match="info">
18         <div class="info">
19                 <xsl:variable name="path" select="@path"/>
20                 <img class="icon" src="{$path}"/>
21                 <xsl:if test="@bookmark = 'true'">
22                         <img src="$STAR$" width="16" height="16"/>   
23                 </xsl:if>
24                 <xsl:value-of select="."/> 
25         </div>
26 </xsl:template>
27
28 <xsl:template match="key">
29         <div class="key"><xsl:value-of select="."/></div>                       
30 </xsl:template>
31
32 <xsl:template match="t">
33         <div class="cell"><xsl:apply-templates/></div>
34 </xsl:template>
35
36 <xsl:template match="tr">
37         [<span class="i"><xsl:apply-templates/></span>]
38 </xsl:template> 
39
40 <xsl:template match="pos">
41         (<span><xsl:apply-templates/></span>)
42 </xsl:template>
43
44 <xsl:template match="pot">
45         ,<span class="i"><xsl:apply-templates/></span>
46 </xsl:template>
47
48 <xsl:template match="tence">
49         ,<span class="i"><xsl:apply-templates/></span>
50 </xsl:template>
51
52 <xsl:template match="def">
53         ,(<xsl:apply-templates/>)
54 </xsl:template>
55
56 <xsl:template match="ex">
57         ,"<xsl:apply-templates/>"
58 </xsl:template>
59
60 <xsl:template match="b">
61         <span class="b"><xsl:apply-templates/></span>
62 </xsl:template>
63
64 <xsl:template match="u">
65         <span class="u"><xsl:apply-templates/></span>
66 </xsl:template>
67
68 <xsl:template match="i">
69         <span class="i"><xsl:apply-templates/></span>
70 </xsl:template> 
71
72 <xsl:template match="c">
73         <xsl:variable name="atr" select="@c"/>
74         <font color="{$atr}"> <xsl:apply-templates/></font>
75 </xsl:template>
76
77 <xsl:template match="br">
78         <br/>
79 </xsl:template>
80
81 </xsl:stylesheet>