<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                 xmlns="http://www.w3.org/1999/xhtml">

	<xsl:template match="/">
		<html>
		<head>
		<title>IM Log for <xsl:value-of select="imLog/@gmtDate"/></title></head>
		<body style="font-family: arial; font-size:12px;">
			<i>Timestamps are in Greenwich Mean Time (GMT)</i><br/><br/>
			<xsl:apply-templates select="imLog/imUser|imLog/imBuddy"/>
		</body>
		</html>
	</xsl:template>

	<xsl:template match="imLog/imUser|imLog/imBuddy">	
			<xsl:apply-templates select="imLog/imUser"/>
			<xsl:apply-templates select="imLog/imBuddy"/>
	</xsl:template>

	<xsl:template match="imLog/imUser">
		<span style="color: #ff7e00; font-weight: bold;"><xsl:value-of select="//imLog/@userIdentity"/>
 			(<xsl:value-of select="@gmtTime"/>):
 		</span>
 		<!-- IM markup -->
		<xsl:value-of select="." disable-output-escaping="yes"/><br/>
	</xsl:template>
	
	<xsl:template match="imLog/imBuddy">
		<span style="color: #0052a3; font-weight: bold;"><xsl:value-of select="@identity"/>
 			(<xsl:value-of select="@gmtTime"/>):
 		</span>
 		<!-- IM markup -->
		<xsl:value-of select="." disable-output-escaping="yes"/><br/>
	</xsl:template>
</xsl:stylesheet>