updated xsl and css files
[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 border="1" width="100%">
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         [<span class="i"><xsl:apply-templates/></span>]
39 </xsl:template> 
40
41 <xsl:template match="pot">
42         ,<span class="i"><xsl:apply-templates/></span>
43 </xsl:template>
44
45 <xsl:template match="tence">
46         ,<span class="i"><xsl:apply-templates/></span>
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="b">
58         <span class="b"><xsl:apply-templates/></span>
59 </xsl:template>
60
61 <xsl:template match="u">
62         <span class="u"><xsl:apply-templates/></span>
63 </xsl:template>
64
65 <xsl:template match="i">
66         <span class="i"><xsl:apply-templates/></span>
67 </xsl:template> 
68
69 <xsl:template match="c">
70         <xsl:variable name="atr" select="@c"/>
71         <font color="{$atr}"> <xsl:apply-templates/></font>
72 </xsl:template>
73
74 </xsl:stylesheet>