]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/events.xsl
- list of people
[helm.git] / helm / mowgli / home / xsl / events.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet version="1.0"
4                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <xsl:import href="common.xsl"/>
7
8 <xsl:output method="html"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title>Events</title>
14    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
15    <link rel="stylesheet" href="../style/mowgli.css" type="text/css"/>
16   </head>
17   <body>
18     <xsl:call-template name="head">
19      <xsl:with-param name="path_to_top" select="'.'"/>
20     </xsl:call-template>
21     <h1>Events</h1>
22     [Sorted by event date] [<a href="deadlines.html">Sorted by deadline</a>]
23     <br /><br />
24     <hr />
25     <dl>
26      <xsl:apply-templates select="events/event"/>
27     </dl>
28     <xsl:call-template name="foot">
29      <xsl:with-param name="path_to_top" select="'.'"/>
30     </xsl:call-template>
31   </body>
32  </html>
33 </xsl:template>
34
35 <xsl:template match="event">
36  <dt>
37   <a href="{url}"><xsl:value-of select="name"/></a>
38  </dt>
39  <dd>
40   <xsl:if test="where">
41    <b><xsl:value-of select="where"/></b>
42    <xsl:text> </xsl:text>
43   </xsl:if>
44   <xsl:if test="when">
45    <b>
46     <xsl:call-template name="print_interval">
47      <xsl:with-param name="begin" select="when/begin/text()"/>
48      <xsl:with-param name="end" select="when/end/text()"/>
49     </xsl:call-template>
50    </b>
51    <br />
52   </xsl:if>
53   <xsl:if test="description">
54    <p><xsl:value-of select="description"/></p>
55   </xsl:if>
56   <xsl:if test="deadline">
57    <p>Deadlines:</p>
58    <ul>
59     <xsl:apply-templates select="deadline"/>
60    </ul>
61   </xsl:if>
62   <br />
63  </dd>
64 </xsl:template>
65
66 <xsl:template match="deadline">
67  <li>
68   <xsl:variable name="kind">
69    <xsl:call-template name="color_of_deadline_kind">
70     <xsl:with-param name="kind" select="@kind"/>
71    </xsl:call-template>
72   </xsl:variable>
73   <b>
74    <span style="color: {$kind}">
75     <xsl:call-template name="print_date">
76      <xsl:with-param name="date" select="date/text()"/>
77     </xsl:call-template>
78    </span>
79   </b>
80   <xsl:text> </xsl:text>
81   <xsl:value-of select="description"/>
82  </li>
83 </xsl:template>
84
85 </xsl:stylesheet>