]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/consortium.xsl
ocaml 3.09 transition
[helm.git] / helm / mowgli / home / xsl / consortium.xsl
index 81327d1410fa4d28caadd3b7e13b5e6ff8070fc9..17420ee41964be38be857350e66e9ab325475b24 100644 (file)
@@ -5,17 +5,15 @@
 
 <xsl:import href="common.xsl"/>
 
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
 
 <xsl:template match="/">
  <html>
   <head>
    <title>Consortium</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:apply-templates/>
+    <xsl:apply-templates/>
   </body>
  </html>
 </xsl:template>
   <xsl:for-each select="site">
    <li>
     <a href="sites/{@file}.html">
-     <xsl:value-of select="@file"/>
+     <xsl:variable name="site" select="document(concat('../xml/sites/',@file,'.xml'))/site"/>
+    <xsl:choose>
+     <xsl:when test="$site/name">
+      <xsl:value-of select="$site/name"/>
+     </xsl:when>
+     <xsl:otherwise>
+      <xsl:value-of select="$site/subsite/name"/>
+     </xsl:otherwise>
+    </xsl:choose>
     </a>
    </li>
   </xsl:for-each>