]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-packages_index.xsl
Fixed broken links to IST images.
[helm.git] / helm / mowgli / home / xsl / work-packages_index.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>Work Packages</title>
14    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
15    <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
16   </head>
17   <body>
18    <blockquote>
19     <xsl:call-template name="head">
20      <xsl:with-param name="path_to_top" select="'..'"/>
21     </xsl:call-template>
22     <xsl:apply-templates/>
23     <xsl:call-template name="foot">
24      <xsl:with-param name="path_to_top" select="'..'"/>
25     </xsl:call-template>
26    </blockquote>
27   </body>
28  </html>
29 </xsl:template>
30
31 <xsl:template match="work-packages">
32  <h1>Work Packages</h1>
33  <table border="1">
34   <thead>
35    <tr>
36     <td>Work Package:</td>
37     <td>Tasks:</td>
38     <td>Deliverables:</td>
39    </tr>
40   </thead>
41   <tbody>
42    <xsl:apply-templates select="work-package"/>
43   </tbody>
44  </table>
45  <xsl:copy-of select="description/*"/>
46 </xsl:template>
47
48 <xsl:template match="work-package">
49  <xsl:variable name="work-package"
50                select="document(concat('../xml/work-packages/',@file,'.xml'))/work-package"/>
51  <tr>
52   <td valign="top">
53    <xsl:value-of select="$work-package/@number"/>.
54    <a href="{@file}.html">
55     <xsl:value-of select="$work-package/name"/>
56    </a>
57   </td>
58   <td valign="top">
59    <xsl:choose>
60     <xsl:when test="$work-package/description/tasks">
61      <xsl:apply-templates select="$work-package/description/tasks">
62       <xsl:with-param name="url" select="concat(@file,'.html')"/>
63      </xsl:apply-templates>
64     </xsl:when>
65     <xsl:otherwise>&#x00A0;</xsl:otherwise>
66    </xsl:choose>
67   </td>
68   <td valign="top">
69    <xsl:if test="$work-package/deliverable">
70     <ul>
71      <xsl:for-each select="$work-package/deliverable[@file]">
72       <xsl:apply-templates select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable">
73        <xsl:with-param name="url" select="concat('../deliverables/',@file,'.html')"/>
74       </xsl:apply-templates>
75      </xsl:for-each>
76     </ul>
77    </xsl:if>
78   </td>
79  </tr>
80 </xsl:template>
81
82 <xsl:template match="tasks">
83  <xsl:param name="url"/>
84  <ul>
85   <xsl:apply-templates>
86    <xsl:with-param name="url" select="$url"/>
87   </xsl:apply-templates>
88  </ul>
89 </xsl:template>
90
91 <xsl:template match="deliverable">
92  <xsl:param name="url"/>
93  <li>
94   <a href="{$url}">
95    <xsl:value-of select="@id"/>
96    <xsl:text> </xsl:text>
97    <xsl:value-of select="name"/>
98   </a>
99  </li>
100 </xsl:template>
101
102 <xsl:template match="task">
103  <xsl:param name="url"/>
104  <li>
105   <a href="{$url}#{@id}">
106    <xsl:value-of select="@id"/>
107    <xsl:text> </xsl:text>
108    <xsl:value-of select="name"/>
109   </a>
110  </li>
111 </xsl:template>
112
113 </xsl:stylesheet>