change a display of googleTranslator
[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="br">
73         <br/>
74 </xsl:template>
75
76 <!--
77 <xsl:template match="table">
78         <table>
79         <xsl:apply-templates/>
80         </table>
81 </xsl:template>
82
83 <xsl:template match="tr">
84         <tr>
85         <xsl:apply-templates/>
86         </tr>
87 </xsl:template>
88
89 <xsl:template match="td">
90         <td>
91         <xsl:apply-templates/>
92         </td>
93 </xsl:template> -->
94
95 </xsl:stylesheet>