1 <xsl:stylesheet version = '
1.0' xmlns:xsl='http://www.w3.org/
1999/XSL/Transform'
>
3 <xsl:output method=
"html" encoding=
"utf-8" indent=
"yes"/>
5 <xsl:template match=
"/">
8 <style type=
"text/css">
12 font-family: Verdana,
"Bitstream Vera Sans", Sans-Serif;
30 color: rgb(
54,
100,
139);
33 color: rgb(
46,
139,
87);
36 color: rgb(
205,
92,
92);
40 <title><xsl:value-of select=
"$title"/></title>
43 <xsl:apply-templates/>
48 <xsl:template name=
"get-day">
49 <xsl:param name=
"stamp"/>
50 <xsl:value-of select=
"substring ($stamp, 1, 8)"/>
53 <xsl:template name=
"format-stamp">
54 <xsl:param name=
"stamp"/>
55 <xsl:variable name=
"hour" select=
"substring ($stamp, 10, 2)"/>
56 <xsl:variable name=
"min" select=
"substring ($stamp, 13, 2)"/>
58 <xsl:value-of select=
"$hour"/>:
<xsl:value-of select=
"$min"/>
61 <xsl:template name=
"format-day-stamp">
62 <xsl:param name=
"stamp"/>
63 <xsl:variable name=
"year" select=
"substring ($stamp, 1, 4)"/>
64 <xsl:variable name=
"month" select=
"substring ($stamp, 5, 2)"/>
65 <xsl:variable name=
"day" select=
"substring ($stamp, 7, 2)"/>
67 <xsl:value-of select=
"$year"/>-
<xsl:value-of select=
"$month"/>-
<xsl:value-of select=
"$day"/>
70 <xsl:template name=
"header">
71 <xsl:param name=
"stamp"/>
72 <div class=
"top-day-stamp">
73 <xsl:call-template name=
"format-day-stamp">
74 <xsl:with-param name=
"stamp" select=
"@time"/>
79 <xsl:template match=
"a">
80 <xsl:text disable-output-escaping=
"yes"><a
href=
"</xsl:text>
82 <xsl:value-of disable-output-escaping="yes
" select="@href
"/>
84 <xsl:text disable-output-escaping="yes
">"></xsl:text>
86 <xsl:value-of select=
"@href"/>
87 <xsl:text disable-output-escaping=
"yes"></a
></xsl:text>
90 <xsl:template match=
"log">
92 <div class=
"top-day-stamp">
93 <xsl:call-template name=
"format-day-stamp">
94 <xsl:with-param name=
"stamp" select=
"//message[1]/@time"/>
98 <xsl:for-each select=
"*">
100 <xsl:variable name=
"prev-time">
101 <xsl:call-template name=
"get-day">
102 <xsl:with-param name=
"stamp" select=
"preceding-sibling::*[1]/@time"/>
106 <xsl:variable name=
"this-time">
107 <xsl:call-template name=
"get-day">
108 <xsl:with-param name=
"stamp" select=
"@time"/>
112 <xsl:if test=
"$prev-time < $this-time">
113 <div class=
"new-day-stamp">
114 <xsl:call-template name=
"format-day-stamp">
115 <xsl:with-param name=
"stamp" select=
"@time"/>
120 <xsl:variable name=
"stamp">
121 <xsl:call-template name=
"format-stamp">
122 <xsl:with-param name=
"stamp" select=
"@time"/>
127 <xsl:value-of select=
"$stamp"/>
130 <xsl:variable name=
"nick-class">
132 <xsl:when test=
"not(string(@id))">nick-self
</xsl:when>
133 <xsl:otherwise>nick
</xsl:otherwise>
137 <span class=
"{$nick-class}">
138 <<xsl:value-of select=
"@name"/>>
141 <xsl:apply-templates/>