]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/events.xsl
ocaml 3.09 transition
[helm.git] / helm / mowgli / home / xsl / events.xsl
index ea608efffc634a56828e0c7417f0e40ea484efa3..8b8ed5aa0ffbba5df9d06ce1e5fc4d612f06449b 100644 (file)
@@ -5,9 +5,10 @@
 
 <xsl:import href="common.xsl"/>
 
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
 
 <xsl:param name="events-class" select="''"/>
+<xsl:param name="today"/>
 
 <xsl:template match="/">
  <html>
     <xsl:value-of select="$events-class"/>
     <xsl:text> Events</xsl:text>
    </title>
-   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-   <link rel="stylesheet" href="../style/mowgli.css" type="text/css"/>
   </head>
   <body>
-    <xsl:call-template name="head">
-     <xsl:with-param name="path_to_top" select="'.'"/>
-    </xsl:call-template>
     <h1>
      <xsl:value-of select="$events-class"/>
      <xsl:text> Events</xsl:text>
      <hr />
     </xsl:if>
     <dl>
-     <xsl:apply-templates select="events/event"/>
+     <xsl:apply-templates select="events/event[when/begin &gt;= $today]">
+      <xsl:sort select="when/begin" data-type="number"/>
+     </xsl:apply-templates>
+    </dl>
+    <hr />
+    <h1>Past Events</h1>
+    <dl>
+     <xsl:apply-templates select="events/event[when/begin &lt; $today]">
+      <xsl:sort select="when/begin" data-type="number"/>
+     </xsl:apply-templates>
     </dl>
-    <xsl:call-template name="foot">
-     <xsl:with-param name="path_to_top" select="'.'"/>
-    </xsl:call-template>
   </body>
  </html>
 </xsl:template>