<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="images"/>
<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="//title"/>
</title>
</head>
<body bgcolor="#ffffff">
<center>
<br/>
<br/>
<strong><xsl:value-of select="//title"/></strong>
<xsl:apply-templates select="//publicationStmt"/>
<br/>
<br/>
<xsl:value-of select="//author"/>
<br/>
</center>
<blockquote>
<xsl:value-of select="//sourceDesc"/>
</blockquote>

<xsl:for-each select="//div1" >
<xsl:apply-templates/>
</xsl:for-each>

</body>
</html>
</xsl:template>

<xsl:template match="teiHeader">

</xsl:template>

<xsl:template match="xref">
<a><xsl:attribute name="href"><xsl:value-of select="@from"/></xsl:attribute><xsl:apply-templates/></a>
</xsl:template>

<xsl:template match="records">
<table cellspacing="10">
<xsl:apply-templates/>
</table>
</xsl:template>

<xsl:template match="columns">
<tr><xsl:apply-templates/></tr>
</xsl:template>

<xsl:template match="colTitle">
<td nowrap="" valign="top"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute><font size="-1"><xsl:apply-templates/></font></td>
</xsl:template>

<xsl:template match="record">
<tr><xsl:apply-templates select="number | bmaccnumber | weight"/>
<xsl:choose>
<xsl:when test="thickness">
<td  nowrap="" align="right" valign="top"><font size="-1" face="">
<xsl:apply-templates select="length"/>/
<xsl:apply-templates select="width"/>/
<xsl:apply-templates select="thickness"/>
</font>
</td>
</xsl:when>
<xsl:otherwise>
<td  nowrap="" align="right" valign="top"><font size="-1" face=""><xsl:apply-templates select="length"/>/<xsl:apply-templates select="width"/></font></td>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="object.type | descr"/></tr>
<xsl:apply-templates select="images"/>
</xsl:template>

<xsl:template match="number">
<td valign="top"><font size="1" face=""><strong><xsl:value-of select="."/></strong></font></td>
</xsl:template>

<xsl:template match="bmaccnumber">
<td valign="top" nowrap=""><font size="-1" face=""><xsl:value-of select="."/></font></td>
</xsl:template>

<xsl:template match="weight">
<td valign="top" align="right"><font size="-1" face=""><xsl:value-of select="."/> </font></td>
</xsl:template>

<xsl:template match="length">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="width">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="thickness">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="diameter">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="object.type">
<xsl:if test=" ( . != 'Coin' ) and ( . != 'Worked Silver' ) ">
<td nowrap="" valign="top"><font size="-1" face=""><xsl:value-of select="."/></font></td>
</xsl:if>
</xsl:template>

<xsl:template match="descr">
<td><font size="-1" face=""><xsl:apply-templates/></font></td>
</xsl:template>

<xsl:template match="images">
<xsl:if test="$images='no'">
<tr>
<td><font color="#ffffff">spacer</font></td>
<td colspan="99" valign="top" nowrap=""><font size="-1"><xsl:apply-templates/></font><br/><br/></td>
</tr>
</xsl:if>

<xsl:if test="$images='yes'">
<tr>
<td><font color="#ffffff">spacer</font></td>
<td colspan="99" valign="top" nowrap=""><font size="-1"><xsl:apply-templates/></font></td>
</tr>
<tr>
<td><font color="#ffffff">spacer</font></td>
<td colspan="99" valign="top" nowrap=""><font size="-1"><img border="1" src="images/jpegtenth/5cm.gif"/></font><br/><br/></td>
</tr>
<tr>
<td><font color="#ffffff">spacer</font></td>
<td colspan="99" valign="top" nowrap=""><font size="-1">(c)2002 The British Museum</font><br/><br/></td>
</tr>
</xsl:if>

</xsl:template>

<xsl:template match="hi[@rend='italic']">
<i><xsl:apply-templates/></i>
</xsl:template>

<xsl:template match="image">
<xsl:if test="$images='yes'">
<img src="images/jpegtenth/{@file}.jpeg"/>
</xsl:if>
<xsl:if test="$images='no'">
<a href="images/jpegquarter/{@file}.html"><xsl:value-of select="@caption"/></a>
</xsl:if>
</xsl:template>

<xsl:template match="head">
<br/>
<br/>
<br/>
<center><strong><xsl:value-of select="text()"/></strong></center>
<br/>
</xsl:template>

<xsl:template match="hi">
<i><xsl:value-of select="text()"/></i>
</xsl:template>

<xsl:template match="table">
<table><xsl:apply-templates/></table>
</xsl:template>

<xsl:template match="row">
<tr><xsl:apply-templates/></tr>
</xsl:template>

<xsl:template match="cell">
<td valign="top"><font size="-1" face=""><xsl:apply-templates/></font></td>
</xsl:template>

<xsl:template match="lb">
<br/>
</xsl:template>

<xsl:template match="p">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="publicationStmt">
<xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>
