]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-package.xsl
Tactic update
[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="xml"/>
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   </head>
20   <body>
21     <xsl:apply-templates/>
22   </body>
23  </html>
24 </xsl:template>
25
26 <xsl:template match="work-package">
27  <h1>
28   <xsl:text>Work Package </xsl:text>
29   <xsl:value-of select="number"/>
30   <xsl:text>: </xsl:text>
31   <xsl:value-of select="name"/>
32  </h1>
33  <h2>
34    Begin: <xsl:value-of select="begin"/> &#x0A0;&#x0A0;&#x0A0;
35    End: <xsl:value-of select="end"/>
36  </h2>
37  <h2>
38   <xsl:text>Work Package Leader: </xsl:text>
39   <a href="../people/{leader/@file}.html">
40    <xsl:call-template name="person-name">
41     <xsl:with-param name="file" select="leader/@file"/>
42    </xsl:call-template>
43   </a>
44  </h2>
45  <h2>Contribution of Each Site (in Man Monthes):</h2>
46  <span style="margin-left: 1cm">
47  <table>
48   <tr>
49    <xsl:for-each select="person-month">
50     <td>
51      <a href="../sites/{@participant}.html">
52       <xsl:value-of select="@participant"/>
53      </a>
54     </td>
55    </xsl:for-each>
56   </tr>
57   <tr>
58    <xsl:for-each select="person-month">
59     <td align="center"><xsl:value-of select="@number"/></td>
60    </xsl:for-each>
61   </tr>
62  </table>
63  </span>
64  <h2>Objectives:</h2>
65  <xsl:copy-of select="objectives/*"/>
66  <h2>Description:</h2>
67  <xsl:apply-templates select="description/*"/>
68  <h2>Deliverables:</h2>
69  <ul>
70   <xsl:for-each select="deliverable">
71    <li>
72     <xsl:choose>
73      <xsl:when test="@file">
74       <a href="../deliverables/{@file}.html">
75        <xsl:variable name="deliverable"
76                      select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable"/>
77        <xsl:value-of select="$deliverable/@id"/>
78        <xsl:text> </xsl:text>
79        <xsl:value-of select="$deliverable/name"/>
80       </a>
81      </xsl:when>
82      <xsl:otherwise>
83       <xsl:value-of select="."/>
84      </xsl:otherwise>
85     </xsl:choose>
86    </li>
87   </xsl:for-each>
88  </ul>
89  <h2>Milestones and Expected Results:</h2>
90  <xsl:copy-of select="milestones/*"/>
91 </xsl:template>
92
93 <xsl:template match="tasks">
94  <dl>
95   <xsl:apply-templates/>
96  </dl>
97 </xsl:template>
98
99 <xsl:template match="task">
100  <dt>
101   <a name="{@id}"/>
102   <xsl:value-of select="@id"/>
103   <xsl:text> </xsl:text>
104   <xsl:value-of select="name"/>
105  </dt>
106  <dd>
107   <xsl:copy-of select="*"/>
108  </dd>
109 </xsl:template>
110
111 <xsl:template name="p|ul|dl">
112  <xsl:copy-of select="."/>
113 </xsl:template>
114
115 </xsl:stylesheet>