]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-package.xsl
Deliverables are now described in XML.
[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:apply-templates/>
26     <xsl:call-template name="foot"/>
27    </blockquote>
28   </body>
29  </html>
30 </xsl:template>
31
32 <xsl:template match="work-package">
33  <h1>
34   <xsl:text>Work Package </xsl:text>
35   <xsl:value-of select="number"/>
36   <xsl:text>: </xsl:text>
37   <xsl:value-of select="name"/>
38  </h1>
39  <h2>Begin: <xsl:value-of select="begin"/></h2>
40  <h2>End: <xsl:value-of select="end"/></h2>
41  <table>
42   <tr>
43    <xsl:for-each select="person-month">
44     <td><xsl:value-of select="@participant"/></td>
45    </xsl:for-each>
46   </tr>
47   <tr>
48    <xsl:for-each select="person-month">
49     <td><xsl:value-of select="@number"/></td>
50    </xsl:for-each>
51   </tr>
52  </table>
53  <h2>Objectives:</h2>
54  <xsl:copy-of select="objectives/*"/>
55  <h2>Description:</h2>
56  <xsl:apply-templates select="description/*"/>
57  <h2>Deliverables:</h2>
58  <ul>
59   <xsl:for-each select="deliverable">
60    <li>
61     <xsl:choose>
62      <xsl:when test="@file">
63       <a href="../deliverables/{@file}.html">
64        <xsl:variable name="deliverable"
65                      select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable"/>
66        <xsl:value-of select="$deliverable/@id"/>
67        <xsl:text> </xsl:text>
68        <xsl:value-of select="$deliverable/name"/>
69       </a>
70      </xsl:when>
71      <xsl:otherwise>
72       <xsl:value-of select="."/>
73      </xsl:otherwise>
74     </xsl:choose>
75    </li>
76   </xsl:for-each>
77  </ul>
78  <h2>Milestones and Expected Results:</h2>
79  <xsl:copy-of select="milestones/*"/>
80 </xsl:template>
81
82 <xsl:template match="tasks">
83  <dl>
84   <xsl:apply-templates/>
85  </dl>
86 </xsl:template>
87
88 <xsl:template match="task">
89  <dt>
90   <a name="{@id}"/>
91   <xsl:value-of select="@id"/>
92   <xsl:text> </xsl:text>
93   <xsl:value-of select="name"/>
94  </dt>
95  <dd>
96   <xsl:copy-of select="*"/>
97  </dd>
98 </xsl:template>
99
100 <xsl:template name="p|ul|dl">
101  <xsl:copy-of select="."/>
102 </xsl:template>
103
104 </xsl:stylesheet>