<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
				xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
				xmlns:xhtml="http://www.w3.org/1999/xhtml">
	<xsl:output method="html" indent="yes" encoding="UTF-8"/>
	<xsl:template match="/">
		<html lang="en-GB">
		<head>
			<meta charset="UTF-8"/>
			<title>The London Spine Unit Sitemap</title>
			<link rel="stylesheet" href="https://londonspineunit.com/media/com_jlsitemap/css/sitemap.min.css"/>
		</head>
		<body>
		<div class="container">
			<h1>
				The London Spine Unit Sitemap			</h1>
			<p class="description">
				Sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> links			</p>
			<xsl:apply-templates/>
			<div class="center muted">
				The sitemap has been generated by JL Sitemap			</div>
							<div class="center muted">
					2020-08-30 15:03:23				</div>
					</div>
		</body>
		</html>
	</xsl:template>
	<xsl:template match="sitemap:urlset">
		<table>
			<thead>
			<tr>
				<th class="center" width="1%">#</th>
				<th>Link</th>
				<th>Change Frequency</th>
				<th>Priority</th>
				<th>Last Modified</th>
			</tr>
			</thead>
			<tbody>
			<xsl:for-each select="sitemap:url">
				<xsl:variable name="loc">
					<xsl:value-of select="sitemap:loc"/>
				</xsl:variable>
				<tr>
					<td>
						<xsl:value-of select="position()"/>
					</td>
					<td>
						<div>
							<a href="{$loc}">
								<xsl:value-of select="sitemap:loc"/>
							</a>
						</div>
						<xsl:if test="xhtml:link">
							<div class="alternates">
								<xsl:apply-templates select="xhtml:link"/>
							</div>
						</xsl:if>
					</td>
					<td>
						<xsl:value-of select="sitemap:changefreq"/>
					</td>
					<td>
						<xsl:value-of select="sitemap:priority"/>
					</td>
					<td class="nowrap">
						<xsl:value-of select="sitemap:lastmod"/>
					</td>
				</tr>
			</xsl:for-each>
			</tbody>
		</table>
	</xsl:template>
	<xsl:template match="xhtml:link">
		<xsl:variable name="altloc">
			<xsl:value-of select="@href"/>
		</xsl:variable>
		<xsl:if test="@hreflang">
			<a href="{$altloc}" class="alternate" target="_blank">
				<xsl:value-of select="@hreflang"/>
			</a>
		</xsl:if>
		<xsl:apply-templates/>
	</xsl:template>
</xsl:stylesheet>