<xsl:import href="common.xsl"/>
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
<xsl:template match="/">
<html>
<head>
<title>Work Packages</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
</head>
<body>
- <xsl:apply-templates/>
+ <xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="work-packages">
<h1>Work Packages</h1>
- <ol>
- <xsl:apply-templates/>
- </ol>
+ <table border="1">
+ <thead>
+ <tr>
+ <td>Work Package:</td>
+ <td>Tasks:</td>
+ <td>Deliverables:</td>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:apply-templates select="work-package"/>
+ </tbody>
+ </table>
+ <xsl:copy-of select="description/*"/>
</xsl:template>
<xsl:template match="work-package">
<xsl:variable name="work-package"
select="document(concat('../xml/work-packages/',@file,'.xml'))/work-package"/>
- <li value="{$work-package/@number + 1}">
- <a href="{@file}.html">
- <xsl:value-of select="@file"/>
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="$work-package/@number"/>.
+ <a href="{@file}.html">
+ <xsl:value-of select="$work-package/name"/>
+ </a>
+ </td>
+ <td valign="top">
+ <xsl:choose>
+ <xsl:when test="$work-package/description/tasks">
+ <xsl:apply-templates select="$work-package/description/tasks">
+ <xsl:with-param name="url" select="concat(@file,'.html')"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td valign="top">
+ <xsl:if test="$work-package/deliverable">
+ <ul>
+ <xsl:for-each select="$work-package/deliverable[@file]">
+ <xsl:apply-templates select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable">
+ <xsl:with-param name="url" select="concat('../deliverables/',@file,'.html')"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="tasks">
+ <xsl:param name="url"/>
+ <ul>
+ <xsl:apply-templates>
+ <xsl:with-param name="url" select="$url"/>
+ </xsl:apply-templates>
+ </ul>
+</xsl:template>
+
+<xsl:template match="deliverable">
+ <xsl:param name="url"/>
+ <li>
+ <a href="{$url}">
+ <xsl:value-of select="@id"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name"/>
+ </a>
+ </li>
+</xsl:template>
+
+<xsl:template match="task">
+ <xsl:param name="url"/>
+ <li>
+ <a href="{$url}#{@id}">
+ <xsl:value-of select="@id"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name"/>
</a>
</li>
</xsl:template>