]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/common.xsl
ocaml 3.09 transition
[helm.git] / helm / mowgli / home / xsl / common.xsl
index f6036094ecdc0bd315a8690e0a457e92551f1452..9381c2d20e07fe6e3a0566b766e6f9e96d3e9ee8 100644 (file)
@@ -3,6 +3,8 @@
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
+<xsl:param name="current-date" select="'???'"/>
+
 <xsl:template name="head">
   <xsl:param name="path_to_top" select="'.'"/>
   <br />
     <tr>
       <td align="left" valign="top">
         <div class="small">
-          This pages are hosted by the
+          This page is hosted by the
           <a href="http:/www.cs.unibo.it">Department of Computer Science</a>,
           <a href="http://www.unibo.it">University of Bologna</a>.
+         <br />
+         Last updated <b><xsl:value-of select="$current-date"/></b>.
         </div>
       </td>
       <td align="right" valign="top">
 
 <xsl:template name="person-name">
   <xsl:param name="file" select="''"/>
+  <xsl:param name="form" select="'full'"/>
   <xsl:variable name="person" select="document(concat('../xml/people/',$file,'.xml'))/person"/>
-  <xsl:if test="$person/qualification">
+  <xsl:if test="$person/qualification and $form = 'full'">
    <xsl:value-of select="$person/qualification"/>
    <xsl:value-of select="' '"/>
   </xsl:if>
-  <xsl:value-of select="$person/name"/>
+  <xsl:choose>
+   <xsl:when test="$form = 'full'">
+    <xsl:value-of select="$person/name"/>
+   </xsl:when>
+   <xsl:otherwise>
+    <!-- Bug: just the first name is abbreviated. The others are ignored. -->
+    <xsl:value-of select="substring($person/name,1,1)"/>
+    <xsl:text>.</xsl:text>
+   </xsl:otherwise>
+  </xsl:choose>
   <xsl:value-of select="' '"/>
   <xsl:value-of select="$person/surname"/>
 </xsl:template>