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