add "this" when create Qt obiect.
[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 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>            
20                 <xsl:if test="@bookmark = 'true'">
21                         <img src="mydata://image.png"/>   
22                 </xsl:if>
23                 <xsl:value-of select="."/> <!-- <img src="{$path}"/> -->
24                 </th>
25         </tr>
26 </xsl:template>
27
28 <xsl:template match="key">
29         <tr bgcolor="#99CCFF">
30         <th><xsl:value-of select="."/></th>                     
31         </tr>
32 </xsl:template> 
33
34 <xsl:template match="t">
35         <tr>
36         <td><xsl:apply-templates/></td>
37         </tr>
38 </xsl:template>
39
40 <xsl:template match="tr">
41         [<i><xsl:apply-templates/></i>]
42 </xsl:template> 
43
44 <xsl:template match="pot">
45         ,<i><xsl:apply-templates/></i>
46 </xsl:template>
47
48 <xsl:template match="tence">
49         ,<i><xsl:apply-templates/></i>
50 </xsl:template>
51
52 <xsl:template match="def">
53         ,(<xsl:apply-templates/>)
54 </xsl:template>
55
56 <xsl:template match="ex">
57         ,"<xsl:apply-templates/>"
58 </xsl:template>
59
60 <xsl:template match="c">
61         <xsl:variable name="atr" select="@c"/>
62         <font color="{$atr}"> <xsl:apply-templates/> </font>
63 </xsl:template>
64
65 </xsl:stylesheet>