Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / plugins / webpresence / webpresence_xhtml.xsl
blob9d749c14a378a335ef02d2a76e84fa71483d96b4
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml">
6 <!--
7 XHTML 1.0 Strict
8 -->
10 <xsl:output
11 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
12 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
13 indent="yes"
14 encoding="UTF-8"/>
16 <xsl:template match="webpresence">
17 <html>
18 <head>
19 <title>My IM Status</title>
20 </head>
21 <body>
22 <p class="name"><xsl:value-of select="name"/></p>
23 <xsl:apply-templates select="accounts"/>
24 <hr/>
25 <p style="font-size: x-small">
26 <xsl:text>Last update at: </xsl:text>
27 <xsl:value-of select="listdate"/>
28 </p>
29 </body>
30 </html>
31 </xsl:template>
33 <xsl:template match="accounts">
34 <table>
35 <xsl:for-each select="account">
36 <tr>
37 <td class="protocol">
38 <xsl:apply-templates select="protocol"/>
39 </td>
40 <td class="accountname">
41 <xsl:value-of select="accountname"/>
42 </td>
43 <td class="accountstatus">
44 <xsl:apply-templates select="accountstatus"/>
45 </td>
46 <td class="accountaddress">
47 <xsl:value-of select="accountaddress"/>
48 </td>
49 </tr>
50 </xsl:for-each>
51 </table>
52 </xsl:template>
54 <xsl:template match="protocol">
55 <xsl:choose>
56 <xsl:when test=".='AIMProtocol'">
57 <xsl:text>AIM</xsl:text>
58 </xsl:when>
59 <xsl:when test=".='MSNProtocol'">
60 <xsl:text>MSN</xsl:text>
61 </xsl:when>
62 <xsl:when test=".='ICQProtocol'">
63 <xsl:text>ICQ</xsl:text>
64 </xsl:when>
65 <xsl:when test=".='JabberProtocol'">
66 <xsl:text>Jabber</xsl:text>
67 </xsl:when>
68 <xsl:when test=".='YahooProtocol'">
69 <xsl:text>Yahoo</xsl:text>
70 </xsl:when>
71 <xsl:when test=".='GaduProtocol'">
72 <xsl:text>Gadu-Gadu</xsl:text>
73 </xsl:when>
74 <xsl:when test=".='WPProtocol'">
75 <xsl:text>WinPopup</xsl:text>
76 </xsl:when>
77 <xsl:when test=".='SMSProtocol'">
78 <xsl:text>SMS</xsl:text>
79 </xsl:when>
80 <xsl:when test=".='IRCProtocol'">
81 <xsl:text>IRC</xsl:text>
82 </xsl:when>
83 <xsl:otherwise>
84 <xsl:text>Unknown</xsl:text>
85 </xsl:otherwise>
86 </xsl:choose>
87 </xsl:template>
89 <xsl:template match="accountstatus">
90 <xsl:choose>
91 <xsl:when test=".='ONLINE'">
92 <span style="color: lime">
93 <xsl:value-of select="."/>
94 </span>
95 </xsl:when>
96 <xsl:when test=".='OFFLINE'">
97 <span style="color: red">
98 <xsl:value-of select="."/>
99 </span>
100 </xsl:when>
101 <xsl:when test=".='AWAY'">
102 <span style="color: maroon">
103 <xsl:value-of select="."/>
104 </span>
105 <xsl:if test="@statusdescription != 'Away' or @awayreason">
106 <xsl:text> (</xsl:text>
107 </xsl:if>
108 <xsl:if test="@statusdescription != 'Away'">
109 <xsl:value-of select="@statusdescription"/>
110 <xsl:if test="@awayreason">
111 <xsl:text>: </xsl:text>
112 </xsl:if>
113 </xsl:if>
114 <xsl:if test="@awayreason">
115 <xsl:value-of select="@awayreason"/>
116 </xsl:if>
117 <xsl:if test="@statusdescription != 'Away' or @awayreason">
118 <xsl:text>)</xsl:text>
119 </xsl:if>
120 </xsl:when>
121 <xsl:when test=".='UNKNOWN'">
122 <span style="color: gray">
123 <xsl:value-of select="."/>
124 </span>
125 <xsl:if test="@statusdescription">
126 <xsl:text> (</xsl:text>
127 <xsl:value-of select="@statusdescription"/>
128 <xsl:text>)</xsl:text>
129 </xsl:if>
130 </xsl:when>
131 <xsl:otherwise>
132 <xsl:value-of select="."/>
133 </xsl:otherwise>
134 </xsl:choose>
135 </xsl:template>
137 </xsl:stylesheet>
139 <!-- vim: set ts=4 sts=4 sw=4: -->