]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/events.xsl
English errors fixed.
[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>Mowgli Events</h1>
22     <hr />
23     <h1>Events of Interest to MOWGLI ---
24         <a href="deadlines.html" target="_top">Sort by deadlines!</a></h1>
25     <dl>
26      <xsl:apply-templates select="events/event">
27       <xsl:sort select="when/begin" data-type="number"/>
28      </xsl:apply-templates>
29     </dl>
30     <xsl:call-template name="foot">
31      <xsl:with-param name="path_to_top" select="'.'"/>
32     </xsl:call-template>
33   </body>
34  </html>
35 </xsl:template>
36
37 <xsl:template match="event">
38  <dt>
39   <a href="{url}"><xsl:value-of select="name"/></a>
40  </dt>
41  <dd>
42   <xsl:if test="where">
43    <b><xsl:value-of select="where"/></b>
44    <xsl:text> </xsl:text>
45   </xsl:if>
46   <xsl:if test="when">
47    <b>
48     <xsl:call-template name="print_interval">
49      <xsl:with-param name="begin" select="when/begin/text()"/>
50      <xsl:with-param name="end" select="when/end/text()"/>
51     </xsl:call-template>
52    </b>
53    <br />
54   </xsl:if>
55   <xsl:if test="description">
56    <p><xsl:value-of select="description"/></p>
57   </xsl:if>
58   <xsl:if test="deadline">
59    <p>Deadlines:</p>
60    <ul>
61     <xsl:apply-templates select="deadline"/>
62    </ul>
63   </xsl:if>
64   <br />
65  </dd>
66 </xsl:template>
67
68 <xsl:template match="deadline">
69  <li>
70   <xsl:variable name="kind">
71    <xsl:call-template name="color_of_deadline_kind">
72     <xsl:with-param name="kind" select="@kind"/>
73    </xsl:call-template>
74   </xsl:variable>
75   <b>
76    <span style="color: {$kind}">
77     <xsl:call-template name="print_date">
78      <xsl:with-param name="date" select="date/text()"/>
79     </xsl:call-template>
80    </span>
81   </b>
82   <xsl:text> </xsl:text>
83   <xsl:value-of select="description"/>
84  </li>
85 </xsl:template>
86
87 </xsl:stylesheet>