]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-package.xsl
- more uniform layout
[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       <xsl:variable name="deliverable"
64                     select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable"/>
65       <a name="{$deliverable/@id}"/>
66       <xsl:value-of select="$deliverable/@id"/>
67       <xsl:text> </xsl:text>
68       <xsl:value-of select="$deliverable/name"/>
69      </xsl:when>
70      <xsl:otherwise>
71       <xsl:value-of select="."/>
72      </xsl:otherwise>
73     </xsl:choose>
74    </li>
75   </xsl:for-each>
76  </ul>
77  <h2>Milestones and Expected Results:</h2>
78  <xsl:copy-of select="milestones/*"/>
79 </xsl:template>
80
81 <xsl:template match="tasks">
82  <dl>
83   <xsl:apply-templates/>
84  </dl>
85 </xsl:template>
86
87 <xsl:template match="task">
88  <dt>
89   <a name="{@id}"/>
90   <xsl:value-of select="@id"/>
91   <xsl:text> </xsl:text>
92   <xsl:value-of select="name"/>
93  </dt>
94  <dd>
95   <xsl:copy-of select="*"/>
96  </dd>
97 </xsl:template>
98
99 <xsl:template name="p|ul|dl">
100  <xsl:copy-of select="."/>
101 </xsl:template>
102
103 </xsl:stylesheet>