<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">
		<html>
			<body>
				<h1>All Products:</h1>
			
				<h2>Books:</h2>
				<table border="1">
					<tr bgcolor="#9acd32">
						<th>Title</th>
						<th>Rating</th>
						<th>Price</th>
					</tr>
					<xsl:for-each select="//book">


				

					<tr>
							<td>
								<xsl:value-of select="title"/>
							</td>	


							<td>

<xsl:if test="price>10">
								<xsl:value-of select="rating"/>	</xsl:if>							
							</td>											
							<td>
								<xsl:value-of select="price"/>								
							</td>										
						</tr>
					</xsl:for-each>
				</table>	
				
				<br/>	

				<h2>Software:</h2>
				<table border="1">
					<tr bgcolor="#9acd32">
						<th>Title</th>
						<th>Price</th>
					</tr>
					<xsl:for-each select="//program">
						<tr>
							<td>
								<xsl:value-of select="title"/>
							</td>			
							<td>
								<xsl:value-of select="price"/>								
							</td>										
						</tr>
					</xsl:for-each>
				</table>								
												
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
