]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/consortium.xsl
Several bug-fixes:
[helm.git] / helm / mowgli / home / xsl / consortium.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet version="1.0"
4                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <xsl:import href="common.xsl"/>
7
8 <xsl:output method="xml"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title>Consortium</title>
14   </head>
15   <body>
16     <xsl:apply-templates/>
17   </body>
18  </html>
19 </xsl:template>
20
21 <xsl:template match="consortium">
22  <h1>The Consortium</h1>
23  <p>
24   <xsl:text>The Consortium is made of </xsl:text>
25   <xsl:value-of select="count(site)"/>
26   <xsl:text> sites:</xsl:text>
27  </p>
28  <ul>
29   <xsl:for-each select="site">
30    <li>
31     <a href="sites/{@file}.html">
32      <xsl:variable name="site" select="document(concat('../xml/sites/',@file,'.xml'))/site"/>
33     <xsl:choose>
34      <xsl:when test="$site/name">
35       <xsl:value-of select="$site/name"/>
36      </xsl:when>
37      <xsl:otherwise>
38       <xsl:value-of select="$site/subsite/name"/>
39      </xsl:otherwise>
40     </xsl:choose>
41     </a>
42    </li>
43   </xsl:for-each>
44  </ul>
45  <xsl:copy-of select="description/*"/>
46 </xsl:template>
47
48 </xsl:stylesheet>