<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:researchnotes="http://www.pasteur.fr/ResearchNotes">

	<xsl:template match="/">

		<html>

			<body>

				<p align="left">

					<xsl:apply-templates select="//researchnotes:project"/>

				</p>

			</body>

		</html>

	</xsl:template>


	<xsl:template match="researchnotes:project">

		<xsl:variable name="TASK_SUMMARY">

			<xsl:value-of select="descendant::researchnotes:task[(@status='ongoing' or @status='planned') and (@priority='critical' or @priority='blocker')]/@summary"/>

		</xsl:variable>

		<xsl:if test="$TASK_SUMMARY!=''">

			<b>

				<xsl:value-of select="@name"/>:</b>

			<br/>

			<xsl:apply-templates select="descendant::researchnotes:task[(@status='ongoing' or @status='planned') and (@priority='critical' or @priority='blocker')]"/>

		</xsl:if>

	</xsl:template>

	<xsl:template match="researchnotes:task">

		<xsl:variable name="PRIORITY">

			<xsl:value-of select="@priority"/>

		</xsl:variable>

		<xsl:if test="$PRIORITY='critical'">

			<xsl:variable name="TAG_ID">

				<xsl:value-of select="@ipad_id"/>

			</xsl:variable>

			<xsl:variable name="LINK">

				<xsl:value-of select="concat('../ViewContent.do?id2=',$TAG_ID)"/>

			</xsl:variable>

			<a href="{$LINK}">

				<xsl:value-of select="@summary"/>

			</a>

			<br/>

		</xsl:if>

		<xsl:if test="$PRIORITY='blocker'">

			<xsl:variable name="TAG_ID">

				<xsl:value-of select="@ipad_id"/>

			</xsl:variable>

			<xsl:variable name="LINK">

				<xsl:value-of select="concat('../ViewContent.do?id2=',$TAG_ID)"/>

			</xsl:variable>

			<font style="color: #cc0000">!!!</font>

			<a href="{$LINK}">

				<xsl:value-of select="@summary"/>

			</a>

			<br/>

		</xsl:if>

	</xsl:template>

</xsl:stylesheet>