<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  exclude-result-prefixes="xhtml">
<xsl:output omit-xml-declaration="yes" method="xml"/>

<xsl:template match="rsp">
			<table id="event_list">
				<thead>
					<tr><th scope="col">date</th><th scope="col">event</th></tr>
				</thead>
				<tbody>
				<xsl:apply-templates select="event">
				</xsl:apply-templates>
				</tbody>
			</table>
</xsl:template>

<xsl:template match="event">
	<tr>
		<td>
			<xsl:value-of select="@start_date" />
			<xsl:if test="@end_date != ''">
				<xsl:if test="@end_date != @start_date">
					<xsl:if test="@end_date != '0000-00-00'">
						<xsl:text> - </xsl:text>
						<xsl:value-of select="@end_date" />
					</xsl:if>
				</xsl:if>
			</xsl:if>
		</td>
		<th scope="row"><a>
		<xsl:attribute name="href">http://upcoming.yahoo.com/event/<xsl:value-of select="@id" />/</xsl:attribute>
		<xsl:value-of select="@name" />
		</a></th>
	</tr>
</xsl:template>

<xsl:template match="text()"/>

</xsl:stylesheet>