1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <xsl:stylesheet version=
"1.0"
3 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
10 doctype-public=
"-//W3C//DTD HTML 4.01 Transitional//EN"
11 doctype-system=
"http://www.w3.org/TR/html4/loose.dtd"
15 omit-xml-declaration=
"yes"/>
17 <xsl:template match=
"webpresence">
20 <title>My IM Status
</title>
23 <p class=
"name"><xsl:value-of select=
"name"/></p>
24 <xsl:apply-templates select=
"accounts"/>
27 <xsl:text>Last update at:
</xsl:text>
28 <xsl:value-of select=
"listdate"/>
34 <xsl:template match=
"accounts">
36 <xsl:for-each select=
"account">
39 <xsl:apply-templates select=
"protocol"/>
41 <td class=
"accountname">
42 <xsl:value-of select=
"accountname"/>
44 <td class=
"accountstatus">
45 <xsl:apply-templates select=
"accountstatus"/>
47 <td class=
"accountaddress">
48 <xsl:value-of select=
"accountaddress"/>
55 <xsl:template match=
"protocol">
57 <xsl:when test=
".='AIMProtocol'">
58 <xsl:text>AIM
</xsl:text>
60 <xsl:when test=
".='MSNProtocol'">
61 <xsl:text>MSN
</xsl:text>
63 <xsl:when test=
".='ICQProtocol'">
64 <xsl:text>ICQ
</xsl:text>
66 <xsl:when test=
".='JabberProtocol'">
67 <xsl:text>Jabber
</xsl:text>
69 <xsl:when test=
".='YahooProtocol'">
70 <xsl:text>Yahoo
</xsl:text>
72 <xsl:when test=
".='GaduProtocol'">
73 <xsl:text>Gadu-Gadu
</xsl:text>
75 <xsl:when test=
".='WPProtocol'">
76 <xsl:text>WinPopup
</xsl:text>
78 <xsl:when test=
".='SMSProtocol'">
79 <xsl:text>SMS
</xsl:text>
81 <xsl:when test=
".='IRCProtocol'">
82 <xsl:text>IRC
</xsl:text>
85 <xsl:text>Unknown
</xsl:text>
90 <xsl:template match=
"accountstatus">
92 <xsl:when test=
".='ONLINE'">
93 <font color=
"#00FF00">
94 <xsl:value-of select=
"."/>
97 <xsl:when test=
".='OFFLINE'">
99 <xsl:value-of select=
"."/>
102 <xsl:when test=
".='AWAY'">
103 <font color=
"maroon">
104 <xsl:value-of select=
"."/>
106 <xsl:if test=
"@statusdescription != 'Away' or @awayreason">
107 <xsl:text> (
</xsl:text>
109 <xsl:if test=
"@statusdescription != 'Away'">
110 <xsl:value-of select=
"@statusdescription"/>
111 <xsl:if test=
"@awayreason">
112 <xsl:text>:
</xsl:text>
115 <xsl:if test=
"@awayreason">
116 <xsl:value-of select=
"@awayreason"/>
118 <xsl:if test=
"@statusdescription != 'Away' or @awayreason">
119 <xsl:text>)
</xsl:text>
122 <xsl:when test=
".='UNKNOWN'">
124 <xsl:value-of select=
"."/>
126 <xsl:if test=
"@statusdescription">
127 <xsl:text> (
</xsl:text>
128 <xsl:value-of select=
"@statusdescription"/>
129 <xsl:text>)
</xsl:text>
133 <xsl:value-of select=
"."/>
140 <!-- vim: set ts=4 sts=4 sw=4: -->