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