small change
[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                 <table border="1" WIDTH="100%">
8                 <xsl:for-each select="ar/dict"> 
9                         <xsl:apply-templates/>
10                 </xsl:for-each>
11                 </table>        
12         </body>
13         </html>
14 </xsl:template> 
15
16 <xsl:template match="info">
17         <!-- <xsl:variable name="path" select="info/@path"/>-->
18         <tr bgcolor="#99FF99">
19         <th><xsl:value-of select="."/> <!-- <img src="{$path}"/> --></th>
20         </tr>
21 </xsl:template>
22
23 <xsl:template match="key">
24         <tr bgcolor="#99CCFF">
25         <th><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         [<i><xsl:apply-templates/></i>]
37 </xsl:template> 
38
39 <xsl:template match="pot">
40         ,<i><xsl:apply-templates/></i>
41 </xsl:template>
42
43 <xsl:template match="tence">
44         ,<i><xsl:apply-templates/></i>
45 </xsl:template>
46
47 <xsl:template match="def">
48         ,(<xsl:apply-templates/>)
49 </xsl:template>
50
51 <xsl:template match="ex">
52         ,"<xsl:apply-templates/>"
53 </xsl:template>
54
55 <xsl:template match="c">
56         <xsl:variable name="atr" select="@c"/>
57         <font color="{$atr}"> <xsl:apply-templates/> </font>
58 </xsl:template>
59
60 </xsl:stylesheet>