<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">



<xsl:output method="html" indent="yes"/>



<xsl:param name="LIST"/>



<xsl:param name="STORE">

	<xsl:text>chapters</xsl:text>

</xsl:param>



<xsl:variable name="STORELINK">

	<xsl:choose>

		<xsl:when test="$STORE = 'chapters'">

			<xsl:text>http://www.chapters.ca/books/details/default.asp?ISBN=</xsl:text>

		</xsl:when>

		<xsl:when test="$STORE = 'amazon'">

			<xsl:text>http://www.amazon.com/exec/obidos/ASIN/</xsl:text>

		</xsl:when>

	</xsl:choose>

</xsl:variable>



<xsl:template match="works">

	

	<html>

		<head>

			<title>Tiptree Award</title>

		</head>

		<body>

			<xsl:for-each select="work[@list=$LIST]">

				<p>

					<a href="{concat($STORELINK,isbn)}">

						<xsl:value-of select="title"/>

					</a>

				</p>

				<xsl:apply-templates select="author"/>

				<xsl:apply-templates select="editor"/>

			</xsl:for-each>

		</body>

	</html>

	

</xsl:template>



<xsl:template match="author|editor">

	<blockquote>

		<xsl:if test="name() = 'editor'">

			<xsl:text>Edited by </xsl:text>

		</xsl:if>

		<xsl:apply-templates />

	</blockquote>

</xsl:template>



</xsl:stylesheet>



