]> matita.cs.unibo.it Git - helm.git/commitdiff
* Notion of future and past events/deadlines introduced.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 22 Feb 2002 16:59:20 +0000 (16:59 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 22 Feb 2002 16:59:20 +0000 (16:59 +0000)
* Approaching deadlines added to the front page. Should we keep them?
* The stylesheet mess done by Luca has been fixed (i.e. removed) ;-)

helm/mowgli/home/html/Makefile
helm/mowgli/home/templates/home.html.bot
helm/mowgli/home/templates/home.html.top
helm/mowgli/home/xml/other-events.xml
helm/mowgli/home/xsl/approaching-deadlines.xsl
helm/mowgli/home/xsl/deadlines.xsl
helm/mowgli/home/xsl/events.xsl
helm/mowgli/home/xsl/sort-events-by-beginning.xsl [deleted file]
helm/mowgli/home/xsl/sort-events-by-deadline.xsl [deleted file]

index 01d9d262dd07a7e8922b6776d66c815ea0b176db..ed182475076b8568a200db46bcc352299c020a09 100644 (file)
@@ -126,13 +126,11 @@ home.html: $(TEMPLATESROOT)/home.html.top $(TEMPLATESROOT)/home.html.bot \
           $(XMLROOT)/other-events.xml \
           $(XMLROOT)/mowgli-events.xml \
           $(XSLROOT)/latest-news.xsl \
-          $(XSLROOT)/sort-events-by-beginning.xsl \
           $(XSLROOT)/approaching-deadlines.xsl
        cat $(TEMPLATESROOT)/home.html.top >$@
        $(XSLTP) $(XSLROOT)/latest-news.xsl $(XMLROOT)/news.xml >>$@
-#      cat $(TEMPLATESROOT)/home.html.mid >>$@
-#      $(XSLTP) $(XSLROOT)/sort-events-by-beginning.xsl $(XMLROOT)/other-events.xml | $(XSLTP) $(XSLROOT)/approaching-deadlines.xsl - >>$@
-#      cat $(TEMPLATESROOT)/home.html.bot >>$@
+       echo "</dl>" >> $@
+       $(XSLTP) --param today `date +%Y%m%d` $(XSLROOT)/approaching-deadlines.xsl $(XMLROOT)/other-events.xml >>$@
        sed s/\@DATE\@/"`date`"/ $(TEMPLATESROOT)/home.html.bot >>$@
 
 index.html: $(TEMPLATESROOT)/index.html
@@ -185,18 +183,16 @@ news.html: $(XMLROOT)/news.xml \
        $(XSLTP) -o $@ $(XSLROOT)/news.xsl $<
 
 other-events.html: $(XMLROOT)/other-events.xml \
-          $(XSLROOT)/sort-events-by-beginning.xsl \
           $(XSLROOT)/events.xsl
-       $(XSLTP) $(XSLROOT)/sort-events-by-beginning.xsl $< | $(XSLTP) --param events-class "'Other'" -o $@ $(XSLROOT)/events.xsl -
+       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'Other'" -o $@ $(XSLROOT)/events.xsl $<
 
 mowgli-events.html: $(XMLROOT)/mowgli-events.xml \
-          $(XSLROOT)/sort-events-by-beginning.xsl \
           $(XSLROOT)/events.xsl
-       $(XSLTP) $(XSLROOT)/sort-events-by-beginning.xsl $< | $(XSLTP) --param events-class "'MOWGLI'" -o $@ $(XSLROOT)/events.xsl -
+       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'MOWGLI'" -o $@ $(XSLROOT)/events.xsl $<
 
 deadlines.html: $(XMLROOT)/other-events.xml \
           $(XSLROOT)/deadlines.xsl
-       $(XSLTP) --param events-class "'Other'" -o $@ $(XSLROOT)/deadlines.xsl $<
+       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'Other'" -o $@ $(XSLROOT)/deadlines.xsl $<
 
 deliverables/%.html: $(XMLROOT)/deliverables/%.xml \
               $(XSLROOT)/deliverable.xsl
index a3f9715fb3e59282feec2c56dec8ae70415b7d99..cd530bc0cd4a349cfd1bcfb3ec908c839e0b8a88 100644 (file)
@@ -1,5 +1,3 @@
-      <!-- </ul> -->
-
       </div>
 
       </td>
index a7a7c20184faabc9dc7f2c06b8300d08d89d641a..1955270d12f75e52cf1f5e7cc0874fca1fd7fab7 100644 (file)
 
       </td>
 
-      <!--
-      <br /><br />
-      <hr width="100%"/>
-      -->
-
       <td>
         &nbsp;&nbsp;&nbsp;&nbsp;
       </td>
index 18f2cbea4bbe0cf53b6e3e8226e5c5eee23eeb93..2a7a00ae5f4f5702a232da7409cd635da6362a90 100644 (file)
@@ -2,7 +2,7 @@
 
 <!DOCTYPE events [
  <!ELEMENT events (event*)>
- <!ELEMENT event (name,url,description?,where?,when?,deadline*)>
+ <!ELEMENT event (name,url,description?,where?,when,deadline*)>
  <!ELEMENT name (#PCDATA)>
  <!ELEMENT url (#PCDATA)>
  <!ELEMENT description (#PCDATA)>
 <events>
  <event>
   <name>MKM 2001</name>
+  <where>RISC, A-4232 Schloss Hagenberg</where>
+  <when>
+   <begin>20010924</begin>
+   <end>20010926</end>
+  </when>
   <url>http://www.risc.uni-linz.ac.at/institute/conferences/MKM2001</url>
-  <description>Special Issue for Annals of Mathematics and Artificial
+  <description>First International Workshop on Mathematical Knowledge
+   Management. Special Issue for Annals of Mathematics and Artificial
    Intelligence to appear in Fall 2002</description>
   <deadline kind="notification">
    <description>Notification of acceptance for the special issue on
index bb1a41d5c2f628b164dd6d74591c7aa5c0e08c76..ced2defa88822b23bcbf6bdeb1f6c893c1f08616 100644 (file)
@@ -8,12 +8,16 @@
 
 <xsl:output method="html"/>
 
+<xsl:param name="today"/>
+
 <xsl:template match="/">
-  <xsl:variable name="deadlines" select="events/event[position() &lt; 4]/deadline"/>
-  <xsl:apply-templates select="$deadlines">
-    <xsl:sort select="date" data-type="number"/>
-  </xsl:apply-templates>
+  <h3>Approaching Deadlines:</h3>
+  <xsl:for-each select="events/event/deadline[date &gt;= $today]">
+   <xsl:sort select="date" data-type="number"/>
+   <xsl:if test="position() &lt; 4">
+    <xsl:apply-templates select="."/>
+   </xsl:if>
+  </xsl:for-each>
 </xsl:template>
 
 </xsl:stylesheet>
-
index 0d08e65c10d37f1ae75e28871ed8d160579d114a..030c64480c026512d2adec9b9b64e7005613f49b 100644 (file)
@@ -8,6 +8,7 @@
 <xsl:output method="html"/>
 
 <xsl:param name="events-class" select="''"/>
+<xsl:param name="today" select="''"/>
 
 <xsl:template match="/">
  <html>
     <br /><br />
     <hr />
     <ul>
-     <xsl:apply-templates select="events/event/deadline">
+     <xsl:apply-templates select="events/event/deadline[date &gt;= $today]">
       <xsl:sort select="date" data-type="number"/>
      </xsl:apply-templates>
     </ul>
+    <hr />
+    <h1>Past Events</h1>
+    <ul>
+     <xsl:apply-templates select="events/event/deadline[date &lt; $today]">
+      <xsl:sort select="date" data-type="number" order="descending"/>
+     </xsl:apply-templates>
+    </ul>
     <xsl:call-template name="foot">
      <xsl:with-param name="path_to_top" select="'.'"/>
     </xsl:call-template>
index ea608efffc634a56828e0c7417f0e40ea484efa3..8ca0df467e98e3306ace23e2251067f1cb441089 100644 (file)
@@ -8,6 +8,7 @@
 <xsl:output method="html"/>
 
 <xsl:param name="events-class" select="''"/>
+<xsl:param name="today"/>
 
 <xsl:template match="/">
  <html>
      <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="'.'"/>
diff --git a/helm/mowgli/home/xsl/sort-events-by-beginning.xsl b/helm/mowgli/home/xsl/sort-events-by-beginning.xsl
deleted file mode 100644 (file)
index 7d019d9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0"
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output method="xml"/>
-
-<xsl:template match="events">
- <events>
-  <xsl:apply-templates select="event">
-    <xsl:sort select="when/begin" data-type="number"/>
-  </xsl:apply-templates>
- </events>
-</xsl:template>
-
-<xsl:template match="event">
- <xsl:copy-of select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/helm/mowgli/home/xsl/sort-events-by-deadline.xsl b/helm/mowgli/home/xsl/sort-events-by-deadline.xsl
deleted file mode 100644 (file)
index 237e0b9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0"
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output method="xml"/>
-
-<xsl:template match="events">
- <events>
-  <xsl:apply-templates select="event">
-   <xsl:sort select="deadline/date" data-type="number"/>
-  </xsl:apply-templates>
- </events>
-</xsl:template>
-
-<xsl:template match="event">
- <xsl:copy-of select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
-