<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

<CENTER><H1 class="guild-level">GUILD LEVEL: <xsl:apply-templates select="GUILDACTIVITY/GUILDLEVEL" /></H1></CENTER>
<table class="guild-activity" width="100%" border="0" cellpadding="5">
	<xsl:for-each select="GUILDACTIVITY/ACTIVITYLIST/ACTIVITYITEM">
	<xsl:element name="tr">
		<xsl:attribute name="class">
			<xsl:choose>
				<xsl:when test="position() mod 2 = 0"><xsl:text>AltGridRow</xsl:text></xsl:when>
				<xsl:otherwise>NormGridRow</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<td class="char-name"><a href="http://us.battle.net/wow/en/character/{translate(../../REALMNAME,'%20','-')}/{NAME}/simple" target="_blank"><xsl:value-of select="NAME"/></a></td>
		<td class="activity-icon"><a href="http://www.wowhead.com/{translate(TYPE,$uppercase,$smallcase)}={NUMID}" target="_blank"><img src="{ACHIMAGE}" align="middle" border="0"/></a></td>
		<td class="activity-name"><a href="http://www.wowhead.com/{translate(TYPE,$uppercase,$smallcase)}={NUMID}" target="_blank"><xsl:value-of select="ACHOBJECTIVE"/></a></td>
		<td class="activity-type"><xsl:value-of select="TYPE"/></td>
		<td class="activity-time"><xsl:value-of select="ACHTIME"/></td>
	</xsl:element>
	</xsl:for-each>
</table>
<center><p style="font-size:60%"><a href="http://wowfeeds.wipeitau.com/">Axho WoW Feeds</a></p></center>

<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script>
<script type="text/javascript">
<![CDATA[
$(document).ready(function(){
 /* Add mouseover row highlights */
 reWireGrids();
 /* fix location link  */
 var tbl = $('table.guild-activity'),
  loc = tbl.find('td.activity-icon:first').find('img').attr('src').split('/')[2],
  orig = tbl.find('td.char-name:first').find('a').attr('href').split('/')[2];
 if (loc !== orig) {
  tbl.find('td.char-name').find('a').each(function(){
   this.href = this.href.replace(/us\.battle\.net/,loc);
  });
 }
});
]]>
</script>

</xsl:template>
</xsl:stylesheet>
