<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
	<xsl:output method="html"/>
	<xsl:variable name="EXCLUDED" select="document('excluded_sct_ec.xml')/properties/entry"/>
	<xsl:variable name="SCT_EC_INDEX_HTML" select="document('../classes/EAPK_681095CD_CA2D_4ea1_82E7_591B34DE8F20.html')"/>
	<xsl:template match="/">
		<html>
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<title>
					<xsl:value-of select="index/text()"/>
				</title>
				<link href="../scripts/lraRendering.css" type="text/css" rel="stylesheet"/>
				<link href="../scripts/fonts-min.css" type="text/css" rel="stylesheet"/>
				<style>
					 
										
										   /*                                                          */
										   /* Styles for the remainder of the document.                */
										   /*                                                          */
										   BODY {
											 background-color: white;}
										   TD {
											 font-size: 10pt; 
											 font-family: verdana,helvetica;}
										 
				 </style>
				<script src="../scripts/ua.js"> </script>
				<script src="../scripts/ftiens4.js"> </script>
				<script src="../scripts/lratv.js"> </script>
			</head>
			<body class="yui-skin-sam">
				<div class="header">
					<table width="100%">
						<tr>
							<td/>
							<td rowspan="3" align="right">
								<img src="../images/combined_logos.png"/>
							</td>
						</tr>
						<tr>
							<td>
								<h1 class="pageHeader">Logical Record Architecture for Health and Social Care</h1>
							</td>
						</tr>
						<tr>
							<td>
								<h2>
									<xsl:value-of select="index/text()"/>
								</h2>
							</td>
						</tr>
					</table>
				</div>
				<table cellpadding="0" cellspacing="0" border="0">
					<tbody>
						<tr>
							<td bgcolor="white" valign="top">
								<table cellpadding="10" cellspacing="0" border="0" width="100%">
									<tr>
										<td>
											<div class="content">
												<h2>Semantic</h2>
												<xsl:apply-templates select="$SCT_EC_INDEX_HTML//ul[preceding-sibling::h2/text() = 'Semantic'][following-sibling::h2/text() = 'Literal']"/>
												<h2>Literal</h2>
												<xsl:apply-templates select="$SCT_EC_INDEX_HTML//ul[preceding-sibling::h2/text() = 'Literal']"/>
											</div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</tbody>
				</table>
				<div id="footer">
					<table width="100%">
						<tr>
							<!--td width="25">
                  									Page Generated:  
               </td>
							<td width="25">
								<a href="mailto:lra-admin@nhs.net?subject=ISSUEEAPK_681095CD_CA2D_4ea1_82E7_591B34DE8F20">Page Feedback</a>
							</td-->
							<td width="25">
                  									Release produced by 
                  <a href="http://www.cfh.nhs.uk/lra/">http://www.cfh.nhs.uk/lra/</a>
							</td>
							<td width="25" align="right">© Crown Copyright 2009-2011</td>
						</tr>
					</table>
				</div>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="ul">
		<ul>
			<xsl:for-each select="li">
				<xsl:if test="not($EXCLUDED/@key = substring-before(a/@href, '.html'))">
					<li>
						<a href="{concat('../classes/', a/@href)}" target="_blank">
							<xsl:copy-of select="a/h3"/>
						</a>
					</li>
				</xsl:if>
			</xsl:for-each>
		</ul>
	</xsl:template>
</xsl:stylesheet>
