<?xml version="1.0"?><!--  encoding="ISO-8859-1" -->
<!--!DOCTYPE xsl:stylesheet [
<!ENTITY % HTMLlat1 PUBLIC
	"-//W3C//ENTITIES Latin 1 for XHTML//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
%HTMLlat1;
<!ENTITY % HTMLspecial PUBLIC
	"-//W3C//ENTITIES Special for XHTML//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
%HTMLspecial;
]-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp   "&#160;">
<!ENTITY pound  "&#163;">
<!ENTITY copy   "&#169;">
<!ENTITY ecirc  "&#234;">
<!ENTITY ndash  "&#8211;">
<!ENTITY mdash  "&#8212;">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                xmlns:bhbc="http://www.boars-head.rowing.org.uk/XSLT/20011122"
                exclude-result-prefixes="bhbc">
<!--
                xmlns:xalan="http://xml.apache.org/xalan"
                xmlns="http://www.w3.org/1999/xhtml"
                exclude-result-prefixes="xalan bhbc"
-->
<xsl:output method="html" indent="yes"
            doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
            doctype-system="http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd" />
<!--xsl:output method="xml" indent="yes"
            doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
            doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /-->

<xsl:param name="srcfile" />
<xsl:param name="xslfile" />
<xsl:param name="destfile" />

<xsl:param name="site-protocol">
	<xsl:text>http://</xsl:text>
</xsl:param>
<xsl:param name="site-name">
	<xsl:text>www.boars-head.rowing.org.uk</xsl:text>
</xsl:param>
<xsl:param name="site-root">
	<xsl:text>/</xsl:text>
</xsl:param>

<xsl:variable name="site-structure" select="document('site-structure.xml')" />
<xsl:variable name="node-in-structure" select="$site-structure//*[@path=$destfile]" />

<xsl:variable name="path-in-structure">
	<xsl:apply-templates mode="structure-path" select="$node-in-structure" />
</xsl:variable>
<xsl:template match="*" mode="structure-path">
	<xsl:for-each select="ancestor::page | self::node()">
		<xsl:if test="position() > 1">
			<xsl:text> &gt; </xsl:text>
		</xsl:if>
		<xsl:choose>
			<xsl:when test="last()>position()">
				<xsl:call-template name="structure-link" />
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="structure-name" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:for-each>
</xsl:template>

<xsl:template name="structure-link">
	<xsl:param name="node" select="." />
	<xsl:apply-templates mode="structure-link" select="$node" />
</xsl:template>
<xsl:template match="*" mode="structure-link">
	<xsl:call-template name="site-link">
		<xsl:with-param name="site-ref">
			<xsl:choose>
				<xsl:when test="name()='page'">
					<xsl:value-of select="@path" />
				</xsl:when>
				<xsl:when test="name()='versioned-page'">
					<xsl:value-of select="page[1]/@path" />
				</xsl:when>
			</xsl:choose>
		</xsl:with-param>
		<xsl:with-param name="content">
			<xsl:call-template name="structure-name" />
		</xsl:with-param>
	</xsl:call-template>
</xsl:template>

<xsl:template name="structure-name">
	<xsl:param name="node" select="." />
	<xsl:if test="name($node/..)='versioned-page'">
		<xsl:value-of select="$node/../@name" />
		<xsl:text> : </xsl:text>
	</xsl:if>
	<xsl:value-of select="$node/@name" />
</xsl:template>

<xsl:template name="site-link">
	<xsl:param name="class" />
	<xsl:param name="site-ref" />
	<xsl:param name="content" />
	<a>
		<xsl:if test="$class">
			<xsl:attribute name="class">
		 		<xsl:value-of select="$class" />
			</xsl:attribute>
		</xsl:if>
		<xsl:attribute name="href">
			<xsl:value-of select="$site-root" />
	 		<xsl:value-of select="$site-ref" />
		</xsl:attribute>
		<xsl:value-of select="$content" />
	</a>
</xsl:template>


<xsl:template name="pagenav-top">
	<xsl:call-template name="pagenav-link">
		<xsl:with-param name="name">
			<xsl:text>top</xsl:text>
		</xsl:with-param>
		<xsl:with-param name="content">
			<xsl:text>(Go to the top)</xsl:text>
		</xsl:with-param>
	</xsl:call-template>
</xsl:template>

<xsl:template name="pagenav-up">
	<xsl:param name="node" select="." />
	<xsl:call-template name="pagenav-link">
		<xsl:with-param name="name" select="$node/preceding::a[@name][not(@bhbc:nav-link='false' )][position()=1]/@name" />
		<xsl:with-param name="otherwise">
			<xsl:text>top</xsl:text>
		</xsl:with-param>
		<xsl:with-param name="content">
			<xsl:text>(Up)</xsl:text>
		</xsl:with-param>
	</xsl:call-template>
</xsl:template>

<xsl:template name="pagenav-down">
	<xsl:param name="node" select="." />
	<xsl:call-template name="pagenav-link">
		<xsl:with-param name="name" select="$node/following::a[@name][not(@bhbc:nav-link='false' )]/@name" />
		<xsl:with-param name="otherwise">
			<xsl:text>bottom</xsl:text>
		</xsl:with-param>
		<xsl:with-param name="content">
			<xsl:text>(Down)</xsl:text>
		</xsl:with-param>
	</xsl:call-template>
</xsl:template>

<xsl:template name="pagenav-link">
	<xsl:param name="name" />
	<xsl:param name="otherwise" />
	<xsl:param name="content" />
	<a class="pagenav">
		<xsl:attribute name="href">
			<xsl:text>#</xsl:text>
			<xsl:choose>
				<xsl:when test="$name">
					<xsl:value-of select="$name" />
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$otherwise" />
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:copy-of select="$content" />
	</a>
</xsl:template>

<xsl:template name="mailto-link">
	<xsl:param name="address" />
	<xsl:param name="friendly-name" />
	<a class="mailto">
		<xsl:attribute name="href">
			<xsl:text>mailto:</xsl:text>
			<xsl:value-of select="$address" />
		</xsl:attribute>
		<xsl:choose>
			<xsl:when test="$friendly-name">
				<xsl:value-of select="$friendly-name" />
				<xsl:text> &lt;</xsl:text>
				<xsl:value-of select="$address" />
				<xsl:text>&gt;</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$address" />
			</xsl:otherwise>
		</xsl:choose>
	</a>
</xsl:template>

<xsl:template name="banner">
	<div class="banner">
		<xsl:choose>
			<xsl:when test="boolean(//bhbc:banner)">
				<a>
					<xsl:apply-templates select="//bhbc:banner/a/@href" mode="bhbc-filter" />
					<img style="vertical-align:middle" border="0" width="468" height="60">
						<xsl:apply-templates select="//bhbc:banner/a/img/@src" mode="bhbc-filter" />
						<xsl:attribute name="alt"><xsl:value-of select="//bhbc:banner/a/img/@alt" /></xsl:attribute>
					</img>
				</a>
				<br />
				<a>
					<xsl:apply-templates select="//bhbc:banner/a/@href" mode="bhbc-filter" />
					<xsl:value-of select="//bhbc:banner/a/img/@alt" />
				</a>
			</xsl:when>
			<xsl:otherwise>
				<img style="vertical-align:middle" border="0" width="468" height="60" src="/fixtures/space.gif" alt="" />
				<br />&nbsp;
			</xsl:otherwise>
		</xsl:choose>
	</div>
</xsl:template>

<xsl:template name="menu">
	<xsl:variable name="child-nodes" select="$node-in-structure/page[not(@menu-link='false')] | $node-in-structure/versioned-page[not(@menu-link='false')]" />
	<xsl:variable name="count" select="count($child-nodes)" />
	<xsl:if test="$count > 0">
		<table class="menu" width="100%">
			<tr class="menu">
				<xsl:variable name="width">
					<xsl:value-of select="floor((101 - $count) div $count)" />
					<xsl:text>%</xsl:text>
				</xsl:variable>
				<xsl:for-each select="$child-nodes">
					<xsl:if test="position() > 1">
						<td class="menu" width="1%">|</td>
					</xsl:if>
					<td class="menu" width="{$width}">
						<xsl:call-template name="structure-link" />
					</td>
				</xsl:for-each>
			</tr>
		</table>
	</xsl:if>
</xsl:template>

<!-- FILTER TEMPLATES -->

<xsl:template match="bhbc:*" mode="bhbc-filter">
	<!-- by default bhbc: namespace nodes are converted into spans in the output -->
	<span>
		<xsl:attribute name="class">
			<xsl:value-of select="local-name()" />
		</xsl:attribute>
		<xsl:apply-templates select="@*|*|text()|processing-instruction()" mode="bhbc-filter" />
	</span>
</xsl:template>

<xsl:template match="@bhbc:*" mode="bhbc-filter">
	<!-- by default bhbc: namespace attributes are removed from the output -->
</xsl:template>


<xsl:template match="bhbc:banner" mode="bhbc-filter">
	<!-- banner is selected and inserted elsewhere -->
</xsl:template>

<xsl:template match="bhbc:page-versions" mode="bhbc-filter">
	<xsl:call-template name="page-versions" />
</xsl:template>
<xsl:template name="page-versions">
	<xsl:choose>
		<xsl:when test="name($node-in-structure)='versioned-page'">
			<xsl:apply-templates mode="page-versions" select="$node-in-structure" />
		</xsl:when>
		<xsl:when test="name($node-in-structure/..)='versioned-page'">
			<xsl:apply-templates mode="page-versions" select="$node-in-structure/.." />
		</xsl:when>
		<xsl:otherwise>
			<xsl:message>page-versions called on a non-versioned page</xsl:message>
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>

<xsl:template match="versioned-page" mode="page-versions">
	<ul>
		<xsl:for-each select="page[@path!=$node-in-structure/@path]"><!-- how to compare if two variables actually refer to the same node? -->
			<li>
				<xsl:call-template name="structure-link" />
			</li>
		</xsl:for-each>
		<xsl:if test="count(page[@path!=$node-in-structure/@path]) = 0">
			<li>Sorry, no pages to link to.</li>
		</xsl:if>
	</ul>
</xsl:template>

<xsl:template match="bhbc:page-links" mode="bhbc-filter">
	<xsl:variable name="exclude-list" select="concat(' ',@exclude-list,' ')" />
	<ul>
		<xsl:for-each select="//a[@name][not(@bhbc:toc-link='false')][not(contains($exclude-list,concat(' ',@name,' ')))]">
			<li>
				<xsl:value-of select="@bhbc:preamble" />
				<a>
					<xsl:if test="@class">
						<xsl:attribute name="class">
							<xsl:value-of select="@class" />
						</xsl:attribute>
					</xsl:if>
					<xsl:attribute name="href">
						<xsl:text>#</xsl:text><xsl:value-of select="@name" />
					</xsl:attribute>
					<xsl:choose>
						<xsl:when test="@bhbc:title">
		    				<xsl:value-of select="@bhbc:title" />
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="normalize-space(following::h1|following::h2|following::h3|following::h4|following::h5|following::h6)" />
						</xsl:otherwise>
					</xsl:choose>
				</a>
				<xsl:value-of select="@bhbc:postamble" />
			</li>
		</xsl:for-each>
	</ul>
</xsl:template>

<xsl:template match="bhbc:site-map" mode="bhbc-filter">
	<xsl:apply-templates mode="site-map" select="$site-structure" />
</xsl:template>

<xsl:template match="site" mode="site-map">
	<ul>
		<xsl:apply-templates mode="site-map" select="*" />
	</ul>
</xsl:template>

<xsl:template match="versioned-page[not(@map-link='false')]" mode="site-map">
	<xsl:apply-templates mode="site-map" select="page[1]" />
</xsl:template>

<xsl:template match="page[not(@map-link='false')]" mode="site-map">
	<li>
		<xsl:call-template name="structure-link" />
		<xsl:if test="*[not(@map-link='false')]">
			<ul>
				<xsl:apply-templates mode="site-map" select="*" />
			</ul>
		</xsl:if>
	</li>
</xsl:template>


<xsl:template match="a[@name][not(@bhbc:nav-link='false' )]" mode="bhbc-filter">
	<p>
		<a>
			<xsl:apply-templates select="@*" mode="bhbc-filter" />
		</a>
		<xsl:call-template name="pagenav-top" />
		<xsl:text> </xsl:text>
		<xsl:call-template name="pagenav-up" />
		<xsl:text> </xsl:text>
		<xsl:call-template name="pagenav-down" />
	</p>
</xsl:template>

<xsl:template match="a[not(./@id)]/@name" mode="bhbc-filter"><!-- for XHTML 1.0 spec -->
	<xsl:attribute name="name">
		<xsl:value-of select="." />
	</xsl:attribute>
	<xsl:attribute name="id">
		<xsl:value-of select="." />
	</xsl:attribute>
</xsl:template>

<xsl:template match="a/@href[starts-with(.,'/')]" mode="bhbc-filter">
	<xsl:attribute name="href">
		<xsl:value-of select="$site-root" />
		<xsl:value-of select="substring-after(.,'/')" />
	</xsl:attribute>
</xsl:template>

<xsl:template match="link/@href[starts-with(.,'/')]" mode="bhbc-filter">
	<xsl:attribute name="href">
		<xsl:value-of select="$site-root" />
		<xsl:value-of select="substring-after(.,'/')" />
	</xsl:attribute>
</xsl:template>

<xsl:template match="img/@src[starts-with(.,'/')]" mode="bhbc-filter">
	<xsl:attribute name="src">
		<xsl:value-of select="$site-root" />
		<xsl:value-of select="substring-after(.,'/')" />
	</xsl:attribute>
</xsl:template>

<xsl:template match="a[starts-with(./@href,'mailto:')]" mode="bhbc-filter">
	<xsl:call-template name="mailto-link">
		<xsl:with-param name="address" select="substring-after(./@href,'mailto:')" />
		<xsl:with-param name="friendly-name" select="." />
	</xsl:call-template>
</xsl:template>

<xsl:template match="a/@href[contains(.,'&amp;')]" mode="bhbc-filter">
	<xsl:message>Bodging a URL containing an ampersand...</xsl:message>
	<xsl:attribute name="href">
		<xsl:call-template name="amp-to-amp-entity" />
	</xsl:attribute>
</xsl:template>
<xsl:template name="amp-to-amp-entity">
	<xsl:param name="text" select="." />
	<xsl:choose>
		<xsl:when test="contains($text,'&amp;')">
			<xsl:value-of select="substring-before($text,'&amp;')" />
			<xsl:text>&amp;amp;</xsl:text>
			<xsl:call-template name="amp-to-amp-entity">
				<xsl:with-param name="text" select="substring-after($text,'&amp;')" />
			</xsl:call-template>
		</xsl:when>
		<xsl:otherwise>
			<xsl:value-of select="$text" />
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>


<!-- in order to remove xmlns:bhbc namespace nodes while copying from the source the following is required -->
<xsl:template mode="bhbc-filter" match="*">
	<xsl:element name="{name()}" namespace="{namespace-uri()}">
		<xsl:apply-templates mode="bhbc-filter" select="@*|*|text()|processing-instruction()|comment()" />
	</xsl:element>
</xsl:template>

<xsl:template mode="bhbc-filter" match="@*">
	<xsl:attribute name="{name()}" namespace="{namespace-uri()}">
		<xsl:value-of select="." />
	</xsl:attribute>
</xsl:template>

<xsl:template mode="bhbc-filter" match="text()|processing-instruction()|comment()">
	<xsl:copy />
</xsl:template>

<!--xsl:template match="@*|*|text()|processing-instruction()|comment()" mode="bhbc-filter">
	<xsl:copy>
		<xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()" mode="bhbc-filter" />
	</xsl:copy>
</xsl:template-->

<xsl:template match="/">
	<xsl:choose>
		<xsl:when test="name($node-in-structure)='page'">
		    <xsl:apply-templates select="*" mode="page" />
		</xsl:when>
		<xsl:when test="name($node-in-structure)='versioned-page'">
		    <xsl:call-template name="forward" />
		</xsl:when>
	</xsl:choose>
</xsl:template>

<xsl:template name="forward">

<html>

<head>
	<title>
		<xsl:value-of select="$path-in-structure" />
	</title>

	<meta name="description" content="Boar's Head Boat Club" />
	<meta name="keywords" content="Boar's Head Boat Club Cambridge London BHBC rowing" />

	<link rel="StyleSheet" type="text/css" href="/layout.css" media="screen,print" />
	<link rel="StyleSheet" type="text/css" href="/BHBC.css" title="BHBC Colours" media="screen" />
	<link rel="Alternate StyleSheet" type="text/css" href="/QCBC.css" title="QCBC Colours" media="screen" />
	<link rel="Alternate StyleSheet" type="text/css" href="/printable.css" title="Printable (Black On White)" media="print,screen" />
	<script type="text/javascript" language="JavaScript1.2" src="/StyleSheetCookie.js">
		<xsl:comment> StyleSheetCookie script </xsl:comment>
	</script>

	<xsl:comment> Page specific head elements </xsl:comment>
	<meta name="robots" content="NOINDEX" />
	<xsl:variable name="refresh-url" select="concat( $site-root, $node-in-structure/page[1]/@path )" />
	<script language="JavaScript1.2" type="text/javascript">
<xsl:comment>
l = new String( location );
location.replace( '<xsl:value-of select="$refresh-url" />' + ( ( l.indexOf( '#') != -1 ) ? l.substring( l.indexOf( '#'), l.length ) : '' ) );
</xsl:comment>
	</script>
	<noscript>
		<meta http-equiv="refresh">
			<xsl:attribute name="content">
				<xsl:text>0;url=</xsl:text>
				<xsl:value-of select="$refresh-url" />
			</xsl:attribute>
		</meta>
	</noscript>
</head>

<body bgcolor="black" text="#FFDA3F" link="#FFDA3F" vlink="#008000" alink="#FFDA3F">

	<p>
		There are a number of versions of this page. You should be automatically taken to the
		latest version of this page in the next few seconds. If not, follow one of the links below.
		<xsl:call-template name="page-versions" />
	</p>

</body>

</html>

</xsl:template>

<xsl:template match="html" mode="page">

<html>

<head>
	<title>
		<xsl:value-of select="$path-in-structure" />
	</title>

	<meta name="description" content="Boar's Head Boat Club" />
	<meta name="keywords" content="Boar's Head Boat Club Cambridge London BHBC rowing" />

	<link rel="StyleSheet" type="text/css" href="/layout.css" media="screen,print" />
	<link rel="StyleSheet" type="text/css" href="/BHBC.css" title="BHBC Colours" media="screen" />
	<link rel="Alternate StyleSheet" type="text/css" href="/QCBC.css" title="QCBC Colours" media="screen" />
	<link rel="Alternate StyleSheet" type="text/css" href="/printable.css" title="Printable (Black On White)" media="print,screen" />
	<script type="text/javascript" language="JavaScript1.2" src="/StyleSheetCookie.js">
		<xsl:comment> StyleSheetCookie script </xsl:comment>
	</script>

	<xsl:comment> Page specific head elements </xsl:comment>
	<xsl:apply-templates select="head/*" mode="bhbc-filter" />
</head>

<body bgcolor="black" text="#FFDA3F" link="#FFDA3F" vlink="#008000" alink="#FFDA3F">
<a name="top" />

<table width="100%">
	<tr>
		<td>
			<a href="/index.html"><img border="0" src="/fixtures/boars-head-middle.gif" style="vertical-align:middle" width="65" height="65" alt="Boar's Head (Click for entrance)" /></a>&nbsp;&nbsp;
		</td>
		<td align="center">
			<xsl:call-template name="banner" />
		</td>
		<td align="right">
			&nbsp;&nbsp;<a>
				<xsl:attribute name="href">
					<xsl:call-template name="amp-to-amp-entity">
						<xsl:with-param name="text">http://www.top100.rowing.org.uk/cgi-bin/top100/rankem.cgi?action=in&amp;id=boarshead</xsl:with-param>
					</xsl:call-template>
				</xsl:attribute>
				<img src="/fixtures/top100.gif" style="vertical-align:middle" border="0" width="65" height="65" alt="Visit the Top 100 Rowing Sites List" />
			</a>
		</td>
	</tr>
</table>

<table class="path" width="100%">
	<tr>
		<td>
 	 		<span class="intro">You are in</span>
 	 		<xsl:text> &gt; </xsl:text>
 	 		<xsl:copy-of select="$path-in-structure" />
		</td>
	</tr>
</table>

<xsl:call-template name="menu" />

<table class="content" width="100%">
	<col width="2%" />
	<col width="96%" />
	<col width="2%" />
	<tr>
		<td style="vertical-align:top">&nbsp;</td>
		<td style="vertical-align:top">

<div class="content">

	<xsl:variable name="h-list">h1 h2 h3 h4 h4 h5 h6</xsl:variable>
	<xsl:if test="not(contains(concat(' ',$h-list,' '),concat(' ',name(body/*[1]),' ')))">
		<h2>
			<xsl:call-template name="structure-name">
				<xsl:with-param name="node" select="$node-in-structure" />
			</xsl:call-template>
		</h2>
	</xsl:if>

	<xsl:apply-templates mode="bhbc-filter" select="body/*" />

	<p>
		<a name="bottom" />
		<xsl:call-template name="pagenav-top" />
		<xsl:text> </xsl:text>
		<xsl:call-template name="pagenav-link">
			<xsl:with-param name="name" select="//following::a[@name][not(@bhbc:nav-link='false' )][position()=last()]/@name" />
			<xsl:with-param name="otherwise">
				<xsl:text>top</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="content">
				<xsl:text>(Up)</xsl:text>
			</xsl:with-param>
		</xsl:call-template>
	</p>

	<table class="info" width="100%" cellpadding="6" cellspacing="0"><tr><td>

<!--
<xsl:variable name="print-and-style-links">
	<p>
		<img src="/fixtures/choose-style.gif" alt="style" align="absmiddle" style="vertical-align:absmiddle" border="0" />
		View the site in
		<a href="javascript:changeCurrentStyleTo(\'BHBC Colours\');saveCurrentStyle()">BHBC colours</a>
		or
		<a href="javascript:changeCurrentStyleTo(\'QCBC Colours\');saveCurrentStyle()">QCBC colours</a>.
	</p>
	<p>
		<img src="/fixtures/print.gif" alt="print" align="absmiddle" style="vertical-align:absmiddle" border="0" />
		View a
		<a href="javascript:togglePrintable()">print-friendly version</a>
		of this page.
	</p>
</xsl:variable>

<script language="JavaScript1.2"><xsl:comment><![CDATA[
if (document.styleSheets)
{
	document.write(']]><xsl:apply-templates select="xalan:nodeset($print-and-style-links)" mode="write-xml" /><![CDATA[');
}
//]]></xsl:comment></script>
-->

	<p>
		<!-- all this because align="absmiddle" is not HTML4... -->
		<img src="/fixtures/choose-style.gif" alt="style" style="vertical-align:middle;margin-top:-0.5ex;margin-bottom:0.5ex" border="0" />
		View the site in
		<a href="javascript:changeCurrentStyleTo('BHBC Colours');saveCurrentStyle()" title="(requires cookies, CSS and JavaScript + DOM support)">BHBC colours</a>
		or
		<a href="javascript:changeCurrentStyleTo('QCBC Colours');saveCurrentStyle()" title="(requires cookies, CSS and JavaScript + DOM support)">QCBC colours</a>.
	</p>
	<p>
		<img src="/fixtures/print.gif" alt="print" style="vertical-align:middle;margin-top:-0.5ex;margin-bottom:0.5ex" border="0" />
		View a
		<a href="javascript:togglePrintable()" title="(requires CSS and JavaScript + DOM support)">print-friendly version</a>
		of this page.
	</p>

	<p>
		<xsl:text>Generated from </xsl:text>
		<xsl:call-template name="site-link">
			<xsl:with-param name="site-ref" select="$srcfile" />
			<xsl:with-param name="content" select="$srcfile" />
		</xsl:call-template>
		<xsl:text> using </xsl:text>
		<xsl:call-template name="site-link">
			<xsl:with-param name="site-ref" select="$xslfile" />
			<xsl:with-param name="content" select="$xslfile" />
		</xsl:call-template>
		<xsl:text>. </xsl:text>
		<xsl:call-template name="site-link">
			<xsl:with-param name="site-ref">page-generation.html</xsl:with-param>
			<xsl:with-param name="content">(More details.)</xsl:with-param>
		</xsl:call-template>
	</p>

	<p>
		<a href="http://validator.w3.org/check/referer">
			<img style="border:0;width:88px;height:31px" src="http://validator.w3.org/images/vh401.gif" alt="Valid HTML 4.01!" />
		</a>
		&nbsp;
		<a href="http://jigsaw.w3.org/css-validator/check/referer">
			<img style="border:0;width:88px;height:31px" src="http://validator.w3.org/images/vcss.gif" alt="Valid CSS!" />
		</a>
	</p>

	<p>
		<xsl:text>Location: </xsl:text>
		<a>
			<xsl:variable name="canonical-url">
				<xsl:value-of select="$site-protocol" />
				<xsl:value-of select="$site-name" />
				<xsl:value-of select="$site-root" />
				<xsl:value-of select="$destfile" />
			</xsl:variable>
			<xsl:attribute name="href">
				<xsl:value-of select="$canonical-url" />
			</xsl:attribute>
			<xsl:value-of select="$canonical-url" />
		</a>
	</p>

	</td></tr></table>

</div>

		</td>
		<td style="vertical-align:top">&nbsp;</td>
	</tr>
</table>

</body>
</html>

</xsl:template>

<!--
<xsl:template match="text()" mode="write-xml"><xsl:value-of select="translate(.,'&#10;',' ')" /></xsl:template>
<xsl:template match="@*" mode="write-xml"><xsl:text> </xsl:text><xsl:value-of select="name(.)" />="<xsl:value-of select="." />"</xsl:template>
<xsl:template match="*" mode="write-xml">&lt;<xsl:value-of select="name(.)" /> <xsl:apply-templates select="@*" mode="write-xml" /> /&gt;</xsl:template>
<xsl:template match="*[text() and not(comment() or processing-instruction() or *)]" mode="write-xml">&lt;<xsl:value-of select="name(.)" /><xsl:apply-templates select="@*" mode="write-xml" />&gt;<xsl:value-of select="." />&lt;/<xsl:value-of select="name(.)" />&gt;</xsl:template>
<xsl:template match="*[*]" mode="write-xml">&lt;<xsl:value-of select="name(.)" /><xsl:apply-templates select="@*" mode="write-xml" />&gt; <xsl:apply-templates mode="write-xml" /> &lt;/<xsl:value-of select="name(.)" />&gt;</xsl:template>
-->

</xsl:stylesheet>
