]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/site.xsl
- added common stylesheet
[helm.git] / helm / mowgli / home / xsl / site.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="html"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title><xsl:value-of select="site/name"/></title>
14    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
15    <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
16   </head>
17   <body>
18    <xsl:apply-templates/>
19   </body>
20  </html>
21 </xsl:template>
22
23 <xsl:template match="site|subsite">
24  <xsl:choose>
25   <xsl:when test="subsite">
26    <p>This is an aggregate site, whose members are:</p>
27    <ul>
28     <xsl:for-each select="subsite">
29      <li>
30       <a href="#{generate-id()}">
31        <xsl:value-of select="name"/>
32       </a>
33      </li>
34     </xsl:for-each>
35    </ul>
36    <xsl:for-each select="subsite">
37     <hr />
38     <a name="{generate-id()}"/>
39     <xsl:apply-templates select="."/>
40    </xsl:for-each>
41   </xsl:when>
42   <xsl:otherwise>
43    <h1><xsl:value-of select="name"/></h1>
44    <h2><xsl:value-of select="country"/></h2>
45    <p><xsl:value-of select="address"/></p>
46    <p><a href="{url}">Visit the institution home page.</a></p>
47    <p>
48     <xsl:text>Site responsible: </xsl:text>
49     <a href="../people/{responsible/@file}.html">
50      <xsl:value-of select="responsible/@file"/>
51     </a>
52     <xsl:text>.</xsl:text>
53    </p>
54    <xsl:copy-of select="description/*"/>
55    <xsl:if test="project">
56     <h1>Projects developed by this site related to MOWGLI:</h1>
57    </xsl:if>
58    <xsl:apply-templates select="project"/>
59   </xsl:otherwise>
60  </xsl:choose>
61 </xsl:template>
62
63 <xsl:template match="project">
64  <h2>
65   <xsl:value-of select="name"/>
66   <xsl:if test="acronym">
67    <xsl:text> (</xsl:text>
68    <xsl:value-of select="acronym"/>
69    <xsl:text>)</xsl:text>
70   </xsl:if>
71  </h2>
72  <p><a href="{url}">Visit the project home page.</a></p>
73  <p>Members of the project also involved in MOWGLI:</p>
74  <ul>
75   <xsl:for-each select="member">
76    <li>
77     <a href="../people/{@file}.html">
78      <xsl:value-of select="@file"/>
79     </a>
80    </li>
81   </xsl:for-each>
82  </ul>
83  <xsl:copy-of select="description/*"/>
84 </xsl:template>
85
86 </xsl:stylesheet>