<?xml version="1.0"?>
<html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
	<head>
		<title>Movies to watch</title>
	</head>
	<body>
		<h2>Movies to watch</h2>
		<table summary="to watch list" border="0">
			<tr>
				<td><b>Title</b></td>
				<td><b>Year</b></td>
				<td><b>Rating</b></td>
				<td><b>Director</b></td>
			</tr>
			<xsl:for-each select="/towatch/movie">
				<xsl:sort select="rating" order="descending" data-type="number" />
				<tr>
					<xsl:if test="(position() mod 2 = 1)">
						<xsl:attribute name="bgcolor">#EEEEFF</xsl:attribute>
					</xsl:if>
					<td><a>
                                          <xsl:attribute name="style">
                                             border-style: none;
                                          </xsl:attribute>
                                          <xsl:attribute name="href">
                                             http://www.imdb.com/title/tt<xsl:value-of select="id"/>/
                                          </xsl:attribute>
                                          <xsl:value-of select="title" />
                                        </a></td>
					<td><xsl:value-of select="year" /></td>
					<td align="center"><xsl:value-of select="rating" /></td>
					<td><xsl:value-of select="director" /></td>
				</tr>
			</xsl:for-each>
		</table>
	</body>
</html>
