<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="html"/>
	<xsl:variable name="regexFinder.root" select="//regexFinder"/>
	<xsl:variable name="regexFinder.baseDir" select="$regexFinder.root/@basedir"/>
	<xsl:template match="/">
		<div id="regexFinder-report">
			<table class="section-table" cellSpacing="0" cellPadding="2" width="95%" border="0">
				<tr>
					<td class="sectionheader" colSpan="3">TODO's report (<xsl:value-of select="$regexFinder.baseDir"/>)</td>
				</tr>
			</table>
			<br/>
			<table class="section-table" cellSpacing="0" cellPadding="2" width="95%" border="1">
				<tr>
					<td>
						<b>
							<xsl:text>Filename</xsl:text>
						</b>
					</td>
					<td>
						<b>
							<xsl:text>Line</xsl:text>
						</b>
					</td>
					<td>
						<b>
							<xsl:text>Text</xsl:text>
						</b>
					</td>
				</tr>
				<xsl:apply-templates select="$regexFinder.root//match"/>
			</table>
			<br/>
			<table class="section-table" cellSpacing="0" cellPadding="2" width="95%" border="0">
				<tr>
					<td class="sectionheader">
						<b>
							<xsl:text>Total number of TODO's:</xsl:text> <xsl:value-of select="count($regexFinder.root//match)"/>
						</b>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>
	<xsl:template match="match">
		<tr>
			<td class="section-data">
				<xsl:value-of select="./fileName"/>
			</td>
			<td class="section-data">
				<xsl:value-of select="./lineNumber"/>
			</td>
			<td class="section-data">
				<xsl:value-of select="./lineData"/>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
