1fefc09efb2784b8c945234af6ebc77c50e0aba2
[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>
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         <!-- <xsl:variable name="path" select="info/@path"/>-->
21         <tr>
22                 <th class="info">               
23                 <xsl:if test="@bookmark = 'true'">
24                         <img src="mydata://image.png"/>   
25                 </xsl:if>
26                 <xsl:value-of select="."/> <!-- <img src="{$path}"/> -->
27                 </th>
28         </tr>
29 </xsl:template>
30
31 <xsl:template match="key">
32         <tr>
33         <th class="key"><xsl:value-of select="."/></th>                 
34         </tr>
35 </xsl:template> 
36
37 <xsl:template match="t">
38         <tr>
39         <td><xsl:apply-templates/></td>
40         </tr>
41 </xsl:template>
42
43 <xsl:template match="tr">
44         [<p><xsl:apply-templates/></p>]
45 </xsl:template> 
46
47 <xsl:template match="pos">
48         (<p><xsl:apply-templates/></p>)
49 </xsl:template>
50
51 <xsl:template match="pot">
52         ,<p><xsl:apply-templates/></p>
53 </xsl:template>
54
55 <xsl:template match="tence">
56         ,<p><xsl:apply-templates/></p>
57 </xsl:template>
58
59 <xsl:template match="def">
60         ,(<xsl:apply-templates/>)
61 </xsl:template>
62
63 <xsl:template match="ex">
64         ,"<xsl:apply-templates/>"
65 </xsl:template>
66
67 <xsl:template match="c">
68         <xsl:variable name="atr" select="@c"/>
69         <font color="{$atr}"> <xsl:apply-templates/></font>
70 </xsl:template>
71 <!--
72 <xsl:template match="table">
73         <table>
74         <xsl:apply-templates/>
75         </table>
76 </xsl:template>
77
78 <xsl:template match="tr">
79         <tr>
80         <xsl:apply-templates/>
81         </tr>
82 </xsl:template>
83
84 <xsl:template match="td">
85         <td>
86         <xsl:apply-templates/>
87         </td>
88 </xsl:template> -->
89
90 </xsl:stylesheet>