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