96770ebaaa9922e947b8287d88ee539a222625eb
[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                  <table border="1" width="100%">
6                     <xsl:for-each select="ar/dict"> 
7                         <xsl:apply-templates/>
8                     </xsl:for-each>
9                  </table>
10 </xsl:template> 
11
12 <xsl:template match="info">
13         <tr>
14                 <th class="info">               
15                 <xsl:if test="@bookmark = 'true'">
16                         <img src="$STAR$" width="16" height="16"/>   
17                 </xsl:if>
18                 <xsl:value-of select="."/> <!-- <img src="{$path}"/> -->
19                 </th>
20         </tr>
21 </xsl:template>
22
23 <xsl:template match="key">
24         <tr>
25         <th class="key"><xsl:value-of select="."/></th>                 
26         </tr>
27 </xsl:template> 
28
29 <xsl:template match="t">
30         <tr>
31            <td><xsl:apply-templates/></td>
32         </tr>
33 </xsl:template>
34
35 <xsl:template match="tr">
36         [<span class="i"><xsl:apply-templates/></span>]
37 </xsl:template> 
38
39 <xsl:template match="pos">
40         (<span><xsl:apply-templates/></span>)
41 </xsl:template>
42
43 <xsl:template match="pot">
44         ,<span class="i"><xsl:apply-templates/></span>
45 </xsl:template>
46
47 <xsl:template match="tence">
48         ,<span class="i"><xsl:apply-templates/></span>
49 </xsl:template>
50
51 <xsl:template match="def">
52         ,(<xsl:apply-templates/>)
53 </xsl:template>
54
55 <xsl:template match="ex">
56         ,"<xsl:apply-templates/>"
57 </xsl:template>
58
59 <xsl:template match="b">
60         <span class="b"><xsl:apply-templates/></span>
61 </xsl:template>
62
63 <xsl:template match="u">
64         <span class="u"><xsl:apply-templates/></span>
65 </xsl:template>
66
67 <xsl:template match="i">
68         <span class="i"><xsl:apply-templates/></span>
69 </xsl:template> 
70
71 <xsl:template match="c">
72         <xsl:variable name="atr" select="@c"/>
73         <font color="{$atr}"> <xsl:apply-templates/></font>
74 </xsl:template>
75
76 <xsl:template match="br">
77         <br/>
78 </xsl:template>
79
80 <!--
81 <xsl:template match="table">
82         <table>
83         <xsl:apply-templates/>
84         </table>
85 </xsl:template>
86
87 <xsl:template match="tr">
88         <tr>
89         <xsl:apply-templates/>
90         </tr>
91 </xsl:template>
92
93 <xsl:template match="td">
94         <td>
95         <xsl:apply-templates/>
96         </td>
97 </xsl:template> -->
98
99 </xsl:stylesheet>