<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
	<head><title>Books to Enlighten Your Love Life</title></head>
	<body bgcolor="white">
	<xsl:apply-templates /> 
	</body>
</html>
</xsl:template>

<xsl:template match="library">
	<center><h1><font color="purple" face="Arial, Helvetica, sans-serif">Books to Enlighten Your Love Life</font></h1></center>


	<xsl:for-each select="/library/booklist/book">
	<center>
	<table width="580" border="0" cellpadding="8" cellspacing="2" bgcolor="lavender" rules="none">
				<tr><td><xsl:apply-templates select="coverimage"/></td>
				
				
				</tr>
		<tr>
		<td width="560" bgcolor="purple">
			<font face="Arial, Helvetica, sans-serif" size="3" color="white"><b><xsl:value-of select="title" /></b></font>
		</td>
		</tr>
		<tr>
		<td width="200">
                      	by <font face="Arial, Helvetica, sans-serif" size="2"><xsl:value-of select="author" /></font>
		</td>
		</tr>
		<tr> 
		<td colspan="2" width="540" bgcolor="lightyellow">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><xsl:value-of select="blurb" /></font>
		</td>
		</tr>
		<tr>
		<td colspan="2" width="540" bgcolor="white">
			<font face="Arial, Helvetica, sans-serif" size="2" color="black"><xsl:value-of select="pubyear" />,
		<xsl:value-of select="publisher" />, ISBN: <xsl:value-of select="isbn" /></font>
		</td>
		</tr>
		<tr>
		<td colspan="2" width="540" bgcolor="lightyellow">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><xsl:value-of select="pages" /> pages, 
			<xsl:value-of select="price" />
			
			</font>
		</td>
		</tr>
		
		
		
	</table>
	</center>
	<br></br>
	</xsl:for-each>
</xsl:template>

<!--       "coverimage" template         -->

<xsl:template match="coverimage">
  <img>
    <xsl:attribute name="src">
      <xsl:value-of select="./@filename"/>
    </xsl:attribute>
    <xsl:attribute name="width">
      <xsl:value-of select="./@x"/>
    </xsl:attribute>
    <xsl:attribute name="height">
      <xsl:value-of select="./@y"/>
    </xsl:attribute>
  </img>
</xsl:template>

</xsl:stylesheet>
