added css 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         <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         <tr>
21         <th class="info"><xsl:value-of select="."/></th>
22         </tr>
23 </xsl:template>
24
25 <xsl:template match="key">
26         <tr>
27         <th class="key"><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         [<p><xsl:apply-templates/></p>]
39 </xsl:template> 
40
41 <xsl:template match="pot">
42         ,<p><xsl:apply-templates/></p>
43 </xsl:template>
44
45 <xsl:template match="tence">
46         ,<p><xsl:apply-templates/></p>
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>