]> matita.cs.unibo.it Git - helm.git/commitdiff
Many improvements:
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 15 Feb 2002 14:37:10 +0000 (14:37 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 15 Feb 2002 14:37:10 +0000 (14:37 +0000)
1) a print_interval template has been put in common.xsl
2) events are now sorted by starting date
3) colors are used to differentiate between submissions, notifications,
   and so on. Is this an improvement? ;-|

helm/mowgli/home/xml/other-events.xml
helm/mowgli/home/xsl/common.xsl
helm/mowgli/home/xsl/deadlines.xsl
helm/mowgli/home/xsl/events.xsl

index 32562144a940b42160f72b05befc60e7545610b6..bb08528709ad2cb862a211bcb271f16c6017e31c 100644 (file)
@@ -7,8 +7,12 @@
  <!ELEMENT url (#PCDATA)>
  <!ELEMENT description (#PCDATA)>
  <!ELEMENT where (#PCDATA)>
- <!ELEMENT when (#PCDATA)>
+ <!ELEMENT when (begin,end)>
+ <!ELEMENT begin (#PCDATA)>
+ <!ELEMENT end (#PCDATA)>
  <!ELEMENT deadline (description,date)>
+ <!ATTLIST deadline
+           kind (submission|notification|registration|camera-ready) #REQUIRED>
  <!ELEMENT date (#PCDATA)>
 ]>
 
   <url>http://www.risc.uni-linz.ac.at/institute/conferences/MKM2001</url>
   <description>Special Issue for Annalas of Mathematics and Artificial
    Intelligence to appear in Fall 2002</description>
-  <deadline>
+  <deadline kind="notification">
    <description>Notification of acceptance for the special issue on
      Annals of Mathematics and Artificial Intelligence.</description>
    <date>20020228</date>
   </deadline>
-  <deadline>
+  <deadline kind="camera-ready">
    <description>Final version of papers for the special issue.</description>
    <date>20020531</date>
   </deadline>
   <url>http://www.mathsoftware.org</url>
   <description>Satellite conference of ICM</description>
   <where>Beijing</where>
-  <when>August 17-19, 2002</when>
+  <when>
+   <begin>20020817</begin>
+   <end>20020819</end>
+  </when>
  </event>
 
  <event>
   <name>MathML 2002</name>
   <url>http://www.mathmlconference.org</url>
   <where>Chicago</where>
-  <when>June 28-30, 2002</when>
-  <deadline>
+  <when>
+   <begin>20020628</begin>
+   <end>20020630</end>
+  </when>
+  <deadline kind="submission">
    <description>Abstracts for papers and panel proposals due</description>
    <date>20020218</date>
   </deadline>
-  <deadline>
+  <deadline kind="notification">
    <description>Notification of acceptance for papers and panels</description>
    <date>20020311</date>
   </deadline>
-  <deadline>
+  <deadline kind="submission">
    <description>Poster abstracts and demo proposals due</description>
    <date>20020315</date>
   </deadline>
-  <deadline>
+  <deadline kind="notification">
    <description>Notification of acceptance for posters and demos</description>
    <date>20020329</date>
   </deadline>
-  <deadline>
+  <deadline kind="registration">
    <description>Last day for early registration</description>
    <date>20020517</date>
   </deadline>
-  <deadline>
+  <deadline kind="camera-ready">
    <description>Deadline for full papers for JSC special issue</description>
    <date>20020626</date>
   </deadline>
   <name>6th International Conference on Electronic Publishing (ELPUB 2002)</name>
   <url>http://www.tu-chemnitz.de/elpub02/</url>
   <where>Karlovy Vary, Czech Republic</where>
-  <when>November 6-9, 2002</when>
-  <deadline>
+  <when>
+   <begin>20021106</begin>
+   <end>20021109</end>
+  </when>
+  <deadline kind="submission">
    <description>Abstracts due</description>
    <date>20020215</date>
   </deadline>
-  <deadline>
+  <deadline kind="submission">
    <description>Full papers due</description>
    <date>20020228</date>
   </deadline>
   <name>TPHOLS 2002</name>
   <url>http://shemesh.larc.nasa.gov/tphols2002</url>
   <where>Hampton (Virginia)</where>
-  <when>August 20-23, 2002</when>
-  <deadline>
+  <when>
+   <begin>20020820</begin>
+   <end>20020823</end>
+  </when>
+  <deadline kind="submission">
    <description>Category A papers due</description>
    <date>20020222</date>
   </deadline>
-  <deadline>
+  <deadline kind="notification">
    <description>Category A notification of acceptance</description>
    <date>20020422</date>
   </deadline>
-  <deadline>
+  <deadline kind="submission">
    <description>Category B papers due</description>
    <date>20020517</date>
   </deadline>
-  <deadline>
+  <deadline kind="submission">
    <description>Category A camera-ready copy due</description>
    <date>20020524</date>
   </deadline>
-  <deadline>
+  <deadline kind="notification">
    <description>Category B notification of acceptance</description>
    <date>20020617</date>
   </deadline>
-  <deadline>
+  <deadline kind="camera-ready">
    <description>Category B camera-ready copy due</description>
    <date>20020705</date>
   </deadline>
   <url>http://semanticweb2002.aifb.uni-karlsruhe.de</url>
   <description>Workshop associato a WWW2002</description>
   <where>Hawaii</where>
-  <when>May 7th, 2002</when>
-  <deadline>
+  <when>
+   <begin>20020507</begin>
+   <end>20020507</end>
+  </when>
+  <deadline kind="submission">
    <description>Paper submission</description>
    <date>20020301</date>
   </deadline>
-  <deadline>
+  <deadline kind="notification">
    <description>Notification of acceptance</description>
    <date>20020401</date>
   </deadline>
-  <deadline>
+  <deadline kind="camera-ready">
    <description>Deadline for final contributions</description>
    <date>20020415</date>
   </deadline>
   <name>Extreme 2002</name>
   <url>http://www.extrememarkup.com</url>
   <where>Montreal Canada</where>
-  <when>August 6-9, 2002</when>
-  <deadline>
+  <when>
+   <begin>20020806</begin>
+   <end>20020809</end>
+  </when>
+  <deadline kind="submission">
    <description>Paper Submission</description>
    <date>20020303</date>
   </deadline>
-  <deadline>
+  <deadline kind="notification">
    <description>Speakers Notified</description>
    <date>20020513</date>
   </deadline>
-  <deadline>
+  <deadline kind="camera-ready">
    <description>Revised Papers Due</description>
    <date>20020611</date>
   </deadline>
   <name>35 Years of Automath</name>
   <url>http://www.cee.hw.ac.uk/~fairouz/automath2002/</url>
   <where>Edinburgh</where>
-  <when>April 10-13, 2002</when>
-  <deadline>
+  <when>
+   <begin>20020410</begin>
+   <end>20020413</end>
+  </when>
+  <deadline kind="submission">
    <description>Submission deadline of papers in special issue of an international journal.</description>
    <date>20020510</date>
   </deadline>
-  <deadline>
+  <deadline kind="submission">
    <description>Submission deadline of special edited book celebrating de Bruijn's 85th anniversary.</description>
    <date>20020710</date>
   </deadline>
index caa6cf85cd0b69c3fb7d19ff8331da625cff5917..f6036094ecdc0bd315a8690e0a457e92551f1452 100644 (file)
  </xsl:choose>
 </xsl:template>
 
+<xsl:template name="print_interval">
+ <xsl:param name="begin"/>
+ <xsl:param name="end"/>
+ <xsl:variable name="byear" select="substring($begin,1,4)"/>
+ <xsl:variable name="bmonth" select="substring($begin,5,2)"/>
+ <xsl:variable name="bday" select="substring($begin,7,2)"/>
+ <xsl:variable name="eyear" select="substring($end,1,4)"/>
+ <xsl:variable name="emonth" select="substring($end,5,2)"/>
+ <xsl:variable name="eday" select="substring($end,7,2)"/>
+ <xsl:choose>
+  <xsl:when test="$byear != $eyear">
+   <xsl:call-template name="print_date">
+    <xsl:with-param name="date" select="$begin"/>
+   </xsl:call-template>
+   <xsl:call-template name="print_date">
+    <xsl:text> - </xsl:text>
+    <xsl:with-param name="date" select="$end"/>
+   </xsl:call-template>
+  </xsl:when>
+  <xsl:when test="$bmonth != $emonth">
+   <xsl:call-template name="print_month">
+    <xsl:with-param name="month" select="$bmonth"/>
+   </xsl:call-template>
+   <xsl:text> </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$bday"/>
+   </xsl:call-template>
+   <xsl:text> - </xsl:text>
+   <xsl:call-template name="print_month">
+    <xsl:with-param name="month" select="$emonth"/>
+   </xsl:call-template>
+   <xsl:text> </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$eday"/>
+   </xsl:call-template>
+   <xsl:text>, </xsl:text>
+   <xsl:value-of select="$byear"/>
+  </xsl:when>
+  <xsl:when test="$bday != $eday">
+   <xsl:call-template name="print_month">
+    <xsl:with-param name="month" select="$bmonth"/>
+   </xsl:call-template>
+   <xsl:text> </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$bday"/>
+   </xsl:call-template>
+   <xsl:text> - </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$eday"/>
+   </xsl:call-template>
+   <xsl:text>, </xsl:text>
+   <xsl:value-of select="$byear"/>
+  </xsl:when>
+  <xsl:otherwise>
+   <xsl:call-template name="print_date">
+    <xsl:with-param name="date" select="$begin"/>
+   </xsl:call-template>
+  </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="color_of_deadline_kind">
+ <xsl:param name="kind"/>
+ <xsl:choose>
+  <xsl:when test="$kind = 'submission'">
+   <xsl:text>red</xsl:text>
+  </xsl:when>
+  <xsl:when test="$kind = 'notification'">
+   <xsl:text>green</xsl:text>
+  </xsl:when>
+  <xsl:when test="$kind = 'registration'">
+   <xsl:text>blue</xsl:text>
+  </xsl:when>
+  <xsl:when test="$kind = 'camera-ready'">
+   <xsl:text>maroon</xsl:text>
+  </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
 </xsl:stylesheet>
index 3c38cda7cc74b6602b531374554104d3b58297a6..95debcab0ce3c0af12b0e4d9a4ea64cfa1a23a29 100644 (file)
 <xsl:template match="deadline">
  <li>
   <b>
-   <xsl:call-template name="print_date">
-    <xsl:with-param name="date" select="date/text()"/>
-   </xsl:call-template>
+   <xsl:variable name="kind">
+    <xsl:call-template name="color_of_deadline_kind">
+     <xsl:with-param name="kind" select="@kind"/>
+    </xsl:call-template>
+   </xsl:variable>
+   <span style="color: {$kind}">
+    <xsl:call-template name="print_date">
+     <xsl:with-param name="date" select="date/text()"/>
+    </xsl:call-template>
+   </span>
   </b>
   <xsl:text> </xsl:text>
   <xsl:value-of select="description"/>
   <xsl:text> </xsl:text>
-  <a href="{../url}"><xsl:value-of select="../name"/></a>
+  <a href="{../url}" target="_top"><xsl:value-of select="../name"/></a>
  </li>
 </xsl:template>
 
index 1278fb87c07ee3b4d81861e6e1bec4b3076c9c90..66f1b7fa224bb99555221234656d22bec1c98832 100644 (file)
     <h1>Mowgli Events</h1>
     <hr />
     <h1>Events Of Interest to MOWGLI ---
-        <a href="deadlines.html">Sort by deadlines!</a></h1>
+        <a href="deadlines.html" target="_top">Sort by deadlines!</a></h1>
     <dl>
-     <xsl:apply-templates/>
+     <xsl:apply-templates select="events/event">
+      <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:text> </xsl:text>
   </xsl:if>
   <xsl:if test="when">
-   <b><xsl:value-of select="when"/></b>
+   <b>
+    <xsl:call-template name="print_interval">
+     <xsl:with-param name="begin" select="when/begin/text()"/>
+     <xsl:with-param name="end" select="when/end/text()"/>
+    </xsl:call-template>
+   </b>
    <br />
   </xsl:if>
   <xsl:if test="description">
 
 <xsl:template match="deadline">
  <li>
-  <b>
-   <xsl:call-template name="print_date">
-    <xsl:with-param name="date" select="date/text()"/>
+  <xsl:variable name="kind">
+   <xsl:call-template name="color_of_deadline_kind">
+    <xsl:with-param name="kind" select="@kind"/>
    </xsl:call-template>
+  </xsl:variable>
+  <b>
+   <span style="color: {$kind}">
+    <xsl:call-template name="print_date">
+     <xsl:with-param name="date" select="date/text()"/>
+    </xsl:call-template>
+   </span>
   </b>
   <xsl:text> </xsl:text>
   <xsl:value-of select="description"/>