Forum Moderators: open
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:key name="distinct-author" match="author" use="."/>
<xsl:key name="distinct-date" match="logentry" use="substring-before(date, 'T')"/>
<xsl:template match="/">
<html>
<head>
<script type="text/javascript">
function selectNode(nodeid)
{
var divs = document.getElementsByClassName(nodeid);
for(var i=0; divs.length > i; i++) {
divs[i].style.display='table-row'
};
};
</script>
</head>
<body>
<h1>SVN Log</h1>
<select>
<xsl:for-each select="//author[generate-id()=generate-id(key('distinct-author',.)[1])]">
<xsl:variable name="forSelectArtist"><xsl:value-of select="."/></xsl:variable>
<option value="{$forSelectArtist}" onclick="selectNode(this.value)"><xsl:value-of select="."/></option>
</xsl:for-each>
</select>
<table border="1">
<tr bgcolor="#9acd32">
<th>Date</th>
<th>Message</th>
</tr>
<xsl:for-each select="//logentry[generate-id()=generate-id(key('distinct-date', substring-before(date, 'T'))[1])]">
<xsl:sort select="date"/>
<xsl:variable name="currentArtist"><xsl:value-of select="author"/></xsl:variable>
<div class="{$currentArtist}" style="display:none;">
<xsl:for-each select="key('distinct-date', substring-before(date, 'T'))">
<xsl:if test="position() = 1">
<td valign="center">
<xsl:value-of select="substring-before(date, 'T')"/>
</td>
</xsl:if>
<xsl:value-of select="msg"/><br/>
</xsl:for-each>
</div>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<log>
<logentry revision="27046">
<author>dev060</author>
<date>2011-03-30T16:04:12.384275Z</date>
<msg>[ LS + CP ] : Fixed bug concerning -> added feature toggle for hotline calculator to deactivated OfferInfoBox in Production </msg>
</logentry>
</log>