39096bc96834712a5aff5fdef87e111655f40ed9
[mdictionary] / trunk / src / base / xsl.xsl
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:template match="/">
5         <html>
6         <body bgcolor="#FF0000">
7         <tr bgcolor="#FF0000">
8                 <table border="1" WIDTH="100%">
9                 <xsl:for-each select="ar/dict"> 
10                         <xsl:apply-templates/>
11                 </xsl:for-each>
12                 </table>
13         </tr>   
14         </body>
15         </html>
16 </xsl:template> 
17
18 <xsl:template match="info">
19         <!-- <xsl:variable name="path" select="info/@path"/>-->
20         <tr bgcolor="#99FF99">
21         <th><xsl:value-of select="."/> <!-- <img src="{$path}"/> --></th>
22         </tr>
23 </xsl:template>
24
25 <xsl:template match="key">
26         <tr bgcolor="#99CCFF">
27         <th><xsl:value-of select="."/></th>             
28         </tr>
29 </xsl:template> 
30
31 <xsl:template match="t">
32         <tr>
33         <td><xsl:apply-templates/></td>
34         </tr>
35 </xsl:template>
36
37 <xsl:template match="tr">
38         [<i><xsl:apply-templates/></i>]
39 </xsl:template> 
40
41 <xsl:template match="pot">
42         ,<i><xsl:apply-templates/></i>
43 </xsl:template>
44
45 <xsl:template match="tence">
46         ,<i><xsl:apply-templates/></i>
47 </xsl:template>
48
49 <xsl:template match="def">
50         ,(<xsl:apply-templates/>)
51 </xsl:template>
52
53 <xsl:template match="ex">
54         ,"<xsl:apply-templates/>"
55 </xsl:template>
56
57 <xsl:template match="c">
58         <xsl:variable name="atr" select="@c"/>
59         <font color="{$atr}"> <xsl:apply-templates/> </font>
60 </xsl:template>
61
62 </xsl:stylesheet>