<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="html"/>
	<xsl:template match="Diagnostics">
		<html>
			<head>
				<title>DiGIR Diagnostics</title>
			</head>
			<body bgcolor="#FFFFFF" text="#000000">
			<p>This document contains a literal translation of the DiGIR diagnostic codes contained in the source 
			XML file, digir_errors.xml.  This file is used to generate this document and the PHP code DiGIR_errorconst.php</p>
				<xsl:apply-templates select="levels"/>
				<xsl:apply-templates select="codes"/>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="levels">
		<h1>Diagnostic Levels</h1>
		<table border="1" cellpadding="2">
			<tbody>
				<tr>
					<th>Level</th>
					<th>Description</th>
				</tr>
				<xsl:apply-templates/>
			</tbody>
		</table>
	</xsl:template>
	<xsl:template match="levels/level">
		<tr>
			<td>
				<xsl:value-of select="@severity"/>
			</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="codes">
		<h1>Diagnostic Codes</h1>
		<table border="1" cellpadding="2">
			<tbody>
				<tr>
					<th>Value</th>
					<th>Level</th>
					<th>Description</th>
				</tr>
				<xsl:apply-templates/>
			</tbody>
		</table>
	</xsl:template>
	<xsl:template match="codes/code">
		<tr>
			<td>
				<xsl:value-of select="@value"/>
			</td>
			<td>
				<xsl:value-of select="@level"/>
			</td>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
