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"/>
13 <xsl:template match="/">
17 <xsl:value-of select="$events-class"/>
18 <xsl:text> Events</xsl:text>
23 <xsl:value-of select="$events-class"/>
24 <xsl:text> Events</xsl:text>
26 <xsl:if test="$events-class = 'Other'">
27 [Sorted by event date] [<a href="deadlines.html">Sorted by deadline</a>]
32 <xsl:apply-templates select="events/event[when/begin >= $today]">
33 <xsl:sort select="when/begin" data-type="number"/>
34 </xsl:apply-templates>
39 <xsl:apply-templates select="events/event[when/begin < $today]">
40 <xsl:sort select="when/begin" data-type="number"/>
41 </xsl:apply-templates>
47 <xsl:template match="event">
49 <a href="{url}"><xsl:value-of select="name"/></a>
53 <b><xsl:value-of select="where"/></b>
54 <xsl:text> </xsl:text>
58 <xsl:call-template name="print_interval">
59 <xsl:with-param name="begin" select="when/begin/text()"/>
60 <xsl:with-param name="end" select="when/end/text()"/>
65 <xsl:if test="description">
66 <p><xsl:value-of select="description"/></p>
68 <xsl:if test="deadline">
71 <xsl:apply-templates select="deadline"/>
78 <xsl:template match="deadline">
80 <xsl:variable name="kind">
81 <xsl:call-template name="color_of_deadline_kind">
82 <xsl:with-param name="kind" select="@kind"/>
86 <span style="color: {$kind}">
87 <xsl:call-template name="print_date">
88 <xsl:with-param name="date" select="date/text()"/>
92 <xsl:text> </xsl:text>
93 <xsl:value-of select="description"/>