3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:import href="common.xsl"/>
8 <xsl:output method="xml"/>
10 <xsl:template match="/">
13 <title>Work Packages</title>
16 <xsl:apply-templates/>
21 <xsl:template match="work-packages">
22 <h1>Work Packages</h1>
26 <td>Work Package:</td>
28 <td>Deliverables:</td>
32 <xsl:apply-templates select="work-package"/>
35 <xsl:copy-of select="description/*"/>
38 <xsl:template match="work-package">
39 <xsl:variable name="work-package"
40 select="document(concat('../xml/work-packages/',@file,'.xml'))/work-package"/>
43 <xsl:value-of select="$work-package/@number"/>.
44 <a href="{@file}.html">
45 <xsl:value-of select="$work-package/name"/>
50 <xsl:when test="$work-package/description/tasks">
51 <xsl:apply-templates select="$work-package/description/tasks">
52 <xsl:with-param name="url" select="concat(@file,'.html')"/>
53 </xsl:apply-templates>
55 <xsl:otherwise> </xsl:otherwise>
59 <xsl:if test="$work-package/deliverable">
61 <xsl:for-each select="$work-package/deliverable[@file]">
62 <xsl:apply-templates select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable">
63 <xsl:with-param name="url" select="concat('../deliverables/',@file,'.html')"/>
64 </xsl:apply-templates>
72 <xsl:template match="tasks">
73 <xsl:param name="url"/>
76 <xsl:with-param name="url" select="$url"/>
77 </xsl:apply-templates>
81 <xsl:template match="deliverable">
82 <xsl:param name="url"/>
85 <xsl:value-of select="@id"/>
86 <xsl:text> </xsl:text>
87 <xsl:value-of select="name"/>
92 <xsl:template match="task">
93 <xsl:param name="url"/>
95 <a href="{$url}#{@id}">
96 <xsl:value-of select="@id"/>
97 <xsl:text> </xsl:text>
98 <xsl:value-of select="name"/>