The Custom Template
We use the following XSLT template to generate the requirements and incidents sections of the report:
Requirements Section
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:template match="/RequirementData">
<ul>
<xsl:for-each select="Requirement">
<li>
<xsl:if test="IsSummary = 'True'">
<b>
<xsl:value-of select="Name"/>
</b>
</xsl:if>
<xsl:if test="IsSummary = 'False'">
<xsl:value-of select="Name"/> -
[RQ:<xsl:value-of select="RequirementId"/>]
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
Incidents Section
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:template match="/IncidentData">
<ul>
<xsl:for-each select="Incident">
<li><xsl:value-of select="Name"/> -
[IN:<xsl:value-of select="IncidentId"/>]</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
The Finished Product
The final report looks like this:
We have attached a copy of the actual report to this KB article as well.