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">
11 doctype-public=
"-//W3C//DTD XHTML 1.0 Strict//EN"
12 doctype-system=
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
16 <xsl:template match=
"webpresence">
19 <title>My IM Status
</title>
22 <p class=
"name"><xsl:value-of select=
"name"/></p>
23 <xsl:apply-templates select=
"accounts"/>
25 <p style=
"font-size: x-small">
26 <xsl:text>Last update at:
</xsl:text>
27 <xsl:value-of select=
"listdate"/>
33 <xsl:template match=
"accounts">
35 <xsl:for-each select=
"account">
38 <xsl:apply-templates select=
"protocol"/>
40 <td class=
"accountname">
41 <xsl:value-of select=
"accountname"/>
43 <td class=
"accountstatus">
44 <xsl:apply-templates select=
"accountstatus"/>
46 <td class=
"accountaddress">
47 <xsl:value-of select=
"accountaddress"/>
54 <xsl:template match=
"protocol">
56 <xsl:when test=
".='AIMProtocol'">
57 <xsl:text>AIM
</xsl:text>
59 <xsl:when test=
".='MSNProtocol'">
60 <xsl:text>MSN
</xsl:text>
62 <xsl:when test=
".='ICQProtocol'">
63 <xsl:text>ICQ
</xsl:text>
65 <xsl:when test=
".='JabberProtocol'">
66 <xsl:text>Jabber
</xsl:text>
68 <xsl:when test=
".='YahooProtocol'">
69 <xsl:text>Yahoo
</xsl:text>
71 <xsl:when test=
".='GaduProtocol'">
72 <xsl:text>Gadu-Gadu
</xsl:text>
74 <xsl:when test=
".='WPProtocol'">
75 <xsl:text>WinPopup
</xsl:text>
77 <xsl:when test=
".='SMSProtocol'">
78 <xsl:text>SMS
</xsl:text>
80 <xsl:when test=
".='IRCProtocol'">
81 <xsl:text>IRC
</xsl:text>
84 <xsl:text>Unknown
</xsl:text>
89 <xsl:template match=
"accountstatus">
91 <xsl:when test=
".='ONLINE'">
92 <span style=
"color: lime">
93 <xsl:value-of select=
"."/>
96 <xsl:when test=
".='OFFLINE'">
97 <span style=
"color: red">
98 <xsl:value-of select=
"."/>
101 <xsl:when test=
".='AWAY'">
102 <span style=
"color: maroon">
103 <xsl:value-of select=
"."/>
105 <xsl:if test=
"@statusdescription != 'Away' or @awayreason">
106 <xsl:text> (
</xsl:text>
108 <xsl:if test=
"@statusdescription != 'Away'">
109 <xsl:value-of select=
"@statusdescription"/>
110 <xsl:if test=
"@awayreason">
111 <xsl:text>:
</xsl:text>
114 <xsl:if test=
"@awayreason">
115 <xsl:value-of select=
"@awayreason"/>
117 <xsl:if test=
"@statusdescription != 'Away' or @awayreason">
118 <xsl:text>)
</xsl:text>
121 <xsl:when test=
".='UNKNOWN'">
122 <span style=
"color: gray">
123 <xsl:value-of select=
"."/>
125 <xsl:if test=
"@statusdescription">
126 <xsl:text> (
</xsl:text>
127 <xsl:value-of select=
"@statusdescription"/>
128 <xsl:text>)
</xsl:text>
132 <xsl:value-of select=
"."/>
139 <!-- vim: set ts=4 sts=4 sw=4: -->