<?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="/">
	<div class="minical_content_box"><div class="minical_month">
	<a><xsl:attribute name="href"><xsl:value-of select="month/url"/></xsl:attribute>
	<xsl:value-of select="month/title"/>
	</a><br /><xsl:value-of select="month/label" /> </div>
	<table class="minical_month" width="100%" summary="mini-calendar">
	<thead>
	<tr class="minical_weekdays"><th>S</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th></tr>
	</thead><tbody>
	<xsl:for-each select="month/week">
	<tr>
		<xsl:for-each select="day">
			<xsl:choose>
			<xsl:when test="( string-length ( number ) &gt; 0 )">
			<xsl:choose>
				<xsl:when test="( string(today) )" >
					<td align="center" class="minical_today">
					<xsl:choose>
						<xsl:when test="( @hasevents &gt; 0 )" >
							<a><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>
							<xsl:attribute name="class">minical_hasevents</xsl:attribute>
							<xsl:value-of select="number" />
							</a>
						</xsl:when>
						<xsl:otherwise>
							<a>
							<xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>
							<xsl:attribute name="style">text-decoration: none;</xsl:attribute>
							<xsl:value-of select="number" />
							</a>
						</xsl:otherwise>
					</xsl:choose>
					</td>

				</xsl:when>
				<xsl:otherwise>
					<td align="center">
					<xsl:choose>
						<xsl:when test="( @hasevents &gt; 0 )" >
							<a><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>
							<xsl:attribute name="class">minical_hasevents</xsl:attribute>
							<xsl:value-of select="number" />
							</a>
						</xsl:when>
						<xsl:otherwise>
							<a><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>
							<xsl:attribute name="style">text-decoration: none;</xsl:attribute>
							<xsl:value-of select="number" />
							</a>
						</xsl:otherwise>
					</xsl:choose>
					</td>
				</xsl:otherwise>
			</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<td align="center"></td>
			</xsl:otherwise>
		</xsl:choose>
		</xsl:for-each>
		</tr>
	</xsl:for-each>
	</tbody>
	</table>
	</div>
</xsl:template>
</xsl:stylesheet>
