<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table border="1">
<tr>
<th>TITLE</th>
<th>TYPE</th>
</tr>
<xsl:for-each select="collection/book[title=contains(title,'The')]">
<xsl:sort select="title"/>
<xsl:choose>
<xsl:when test="type=Paperback">
<tr>
<td bgcolor="red"><xsl:value-of select="title" /></td>
<td bgcolor="red"><xsl:value-of select="type" /></td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td bgcolor="blue"><xsl:value-of select="title" /></td>
<td bgcolor="blue"><xsl:value-of select="type" /></td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>