<xsl:import href="common.xsl"/>
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
+
+<xsl:param name="events-class" select="''"/>
+<xsl:param name="today" select="''"/>
<xsl:template match="/">
<html>
<head>
- <title>Events Sorted by Deadlines</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 Sorted by Deadlines</xsl:text>
+ </title>
</head>
<body>
- <xsl:call-template name="head">
- <xsl:with-param name="path_to_top" select="'.'"/>
- </xsl:call-template>
- <h1>Mowgli Events Sorted by Deadlines</h1>
+ <h1>
+ <xsl:value-of select="$events-class"/>
+ <xsl:text> Events</xsl:text>
+ </h1>
+ <xsl:variable name="url">
+ <xsl:choose>
+ <xsl:when test="$events-class='Other'">other-events.html</xsl:when>
+ <xsl:otherwise>mowgli-events.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ [<a href="{$url}">Sorted by event date</a>] [Sorted by deadline]
+ <br /><br />
<hr />
- <h1>Events of Interest to MOWGLI Sorted by Deadlines ---
- <a href="events.html">Sort by events date!</a></h1>
<ul>
- <xsl:apply-templates select="events/event/deadline">
+ <xsl:apply-templates select="events/event/deadline[date >= $today]">
<xsl:sort select="date" data-type="number"/>
</xsl:apply-templates>
</ul>
- <xsl:call-template name="foot">
- <xsl:with-param name="path_to_top" select="'.'"/>
- </xsl:call-template>
+ <hr />
+ <h1>Past Events</h1>
+ <ul>
+ <xsl:apply-templates select="events/event/deadline[date < $today]">
+ <xsl:sort select="date" data-type="number" order="descending"/>
+ </xsl:apply-templates>
+ </ul>
</body>
</html>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
+