3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:import href="common.xsl"/>
8 <xsl:output method="xml"/>
10 <xsl:param name="events-class" select="''"/>
11 <xsl:param name="today" select="''"/>
13 <xsl:template match="/">
17 <xsl:value-of select="$events-class"/>
18 <xsl:text> Events Sorted by Deadlines</xsl:text>
23 <xsl:value-of select="$events-class"/>
24 <xsl:text> Events</xsl:text>
26 <xsl:variable name="url">
28 <xsl:when test="$events-class='Other'">other-events.html</xsl:when>
29 <xsl:otherwise>mowgli-events.html</xsl:otherwise>
32 [<a href="{$url}">Sorted by event date</a>] [Sorted by deadline]
36 <xsl:apply-templates select="events/event/deadline[date >= $today]">
37 <xsl:sort select="date" data-type="number"/>
38 </xsl:apply-templates>
43 <xsl:apply-templates select="events/event/deadline[date < $today]">
44 <xsl:sort select="date" data-type="number" order="descending"/>
45 </xsl:apply-templates>
51 <xsl:template match="deadline">
54 <xsl:variable name="kind">
55 <xsl:call-template name="color_of_deadline_kind">
56 <xsl:with-param name="kind" select="@kind"/>
59 <span style="color: {$kind}">
60 <xsl:call-template name="print_date">
61 <xsl:with-param name="date" select="date/text()"/>
65 <xsl:text> </xsl:text>
66 <xsl:value-of select="description"/>
67 <xsl:text> </xsl:text>
68 <a href="{../url}" target="_top"><xsl:value-of select="../name"/></a>