<xsl:import href="common.xsl"/>
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
+
+<xsl:param name="events-class" select="''"/>
+<xsl:param name="today"/>
<xsl:template match="/">
<html>
<head>
- <title>Events</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="../style/mowgli.css" type="text/css"/>
+ <title>
+ <xsl:value-of select="$events-class"/>
+ <xsl:text> Events</xsl:text>
+ </title>
</head>
<body>
- <xsl:call-template name="head">
- <xsl:with-param name="path_to_top" select="'.'"/>
- </xsl:call-template>
- <h1>Events</h1>
- [Sorted by event date] [<a href="deadlines.html">Sorted by deadline</a>]
- <br /><br />
+ <h1>
+ <xsl:value-of select="$events-class"/>
+ <xsl:text> Events</xsl:text>
+ </h1>
+ <xsl:if test="$events-class = 'Other'">
+ [Sorted by event date] [<a href="deadlines.html">Sorted by deadline</a>]
+ <br /><br />
+ <hr />
+ </xsl:if>
+ <dl>
+ <xsl:apply-templates select="events/event[when/begin >= $today]">
+ <xsl:sort select="when/begin" data-type="number"/>
+ </xsl:apply-templates>
+ </dl>
<hr />
+ <h1>Past Events</h1>
<dl>
- <xsl:apply-templates select="events/event"/>
+ <xsl:apply-templates select="events/event[when/begin < $today]">
+ <xsl:sort select="when/begin" data-type="number"/>
+ </xsl:apply-templates>
</dl>
- <xsl:call-template name="foot">
- <xsl:with-param name="path_to_top" select="'.'"/>
- </xsl:call-template>
</body>
</html>
</xsl:template>