]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-package.xsl
Fixed broken links to IST images.
[helm.git] / helm / mowgli / home / xsl / work-package.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>
14     <xsl:text>Work Package </xsl:text>
15     <xsl:value-of select="work-package/@number"/>
16     <xsl:text>: </xsl:text>
17     <xsl:value-of select="work-package/name"/>
18    </title>
19    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
20    <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
21   </head>
22   <body>
23    <blockquote>
24     <xsl:call-template name="head">
25      <xsl:with-param name="path_to_top" select="'..'"/>
26     </xsl:call-template>
27     <xsl:apply-templates/>
28     <xsl:call-template name="foot">
29      <xsl:with-param name="path_to_top" select="'..'"/>
30     </xsl:call-template>
31    </blockquote>
32   </body>
33  </html>
34 </xsl:template>
35
36 <xsl:template match="work-package">
37  <h1>
38   <xsl:text>Work Package </xsl:text>
39   <xsl:value-of select="number"/>
40   <xsl:text>: </xsl:text>
41   <xsl:value-of select="name"/>
42  </h1>
43  <h2>Begin: <xsl:value-of select="begin"/></h2>
44  <h2>End: <xsl:value-of select="end"/></h2>
45  <table>
46   <tr>
47    <xsl:for-each select="person-month">
48     <td><xsl:value-of select="@participant"/></td>
49    </xsl:for-each>
50   </tr>
51   <tr>
52    <xsl:for-each select="person-month">
53     <td><xsl:value-of select="@number"/></td>
54    </xsl:for-each>
55   </tr>
56  </table>
57  <h2>Objectives:</h2>
58  <xsl:copy-of select="objectives/*"/>
59  <h2>Description:</h2>
60  <xsl:apply-templates select="description/*"/>
61  <h2>Deliverables:</h2>
62  <ul>
63   <xsl:for-each select="deliverable">
64    <li>
65     <xsl:choose>
66      <xsl:when test="@file">
67       <a href="../deliverables/{@file}.html">
68        <xsl:variable name="deliverable"
69                      select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable"/>
70        <xsl:value-of select="$deliverable/@id"/>
71        <xsl:text> </xsl:text>
72        <xsl:value-of select="$deliverable/name"/>
73       </a>
74      </xsl:when>
75      <xsl:otherwise>
76       <xsl:value-of select="."/>
77      </xsl:otherwise>
78     </xsl:choose>
79    </li>
80   </xsl:for-each>
81  </ul>
82  <h2>Milestones and Expected Results:</h2>
83  <xsl:copy-of select="milestones/*"/>
84 </xsl:template>
85
86 <xsl:template match="tasks">
87  <dl>
88   <xsl:apply-templates/>
89  </dl>
90 </xsl:template>
91
92 <xsl:template match="task">
93  <dt>
94   <a name="{@id}"/>
95   <xsl:value-of select="@id"/>
96   <xsl:text> </xsl:text>
97   <xsl:value-of select="name"/>
98  </dt>
99  <dd>
100   <xsl:copy-of select="*"/>
101  </dd>
102 </xsl:template>
103
104 <xsl:template name="p|ul|dl">
105  <xsl:copy-of select="."/>
106 </xsl:template>
107
108 </xsl:stylesheet>