]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/site.xsl
Bug fixed: the top directory has a different (relative) path depending on
[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    <blockquote>
19     <xsl:call-template name="head">
20      <xsl:with-param name="path_to_top" select="'..'"/>
21     </xsl:call-template>
22     <xsl:apply-templates/>
23     <xsl:call-template name="foot"/>
24    </blockquote>
25   </body>
26  </html>
27 </xsl:template>
28
29 <xsl:template match="site|subsite">
30  <xsl:choose>
31   <xsl:when test="subsite">
32    <p>This is an aggregate site, whose members are:</p>
33    <ul>
34     <xsl:for-each select="subsite">
35      <li>
36       <a href="#{generate-id()}">
37        <xsl:value-of select="name"/>
38       </a>
39      </li>
40     </xsl:for-each>
41    </ul>
42    <xsl:for-each select="subsite">
43     <hr />
44     <a name="{generate-id()}"/>
45     <xsl:apply-templates select="."/>
46    </xsl:for-each>
47   </xsl:when>
48   <xsl:otherwise>
49    <h1><xsl:value-of select="name"/></h1>
50    <h2><xsl:value-of select="country"/></h2>
51    <p><xsl:value-of select="address"/></p>
52    <p><a href="{url}">Visit the institution home page.</a></p>
53    <p>
54     <xsl:text>Site responsible: </xsl:text>
55     <a href="../people/{responsible/@file}.html">
56      <xsl:call-template name="person-name">
57       <xsl:with-param name="file" select="responsible/@file"/>
58      </xsl:call-template>
59     </a>
60     <xsl:text>.</xsl:text>
61    </p>
62    <xsl:copy-of select="description/*"/>
63    <xsl:if test="project">
64     <h1>Projects developed by this site related to MOWGLI:</h1>
65    </xsl:if>
66    <xsl:apply-templates select="project"/>
67   </xsl:otherwise>
68  </xsl:choose>
69 </xsl:template>
70
71 <xsl:template match="project">
72  <h2>
73   <xsl:value-of select="name"/>
74   <xsl:if test="acronym">
75    <xsl:text> (</xsl:text>
76    <xsl:value-of select="acronym"/>
77    <xsl:text>)</xsl:text>
78   </xsl:if>
79  </h2>
80  <p><a href="{url}">Visit the project home page.</a></p>
81  <p>Members of the project also involved in MOWGLI:</p>
82  <ul>
83   <xsl:for-each select="member">
84    <li>
85     <a href="../people/{@file}.html">
86      <xsl:call-template name="person-name">
87       <xsl:with-param name="file" select="@file"/>
88      </xsl:call-template>
89     </a>
90    </li>
91   </xsl:for-each>
92  </ul>
93  <xsl:copy-of select="description/*"/>
94 </xsl:template>
95
96 </xsl:stylesheet>