<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

	<html>
	<head>
	<STYLE>
		h1 {COLOR: red; FONT-FAMILY: Arial; FONT-SIZE: 14pt;}
		h2 {COLOR: darkblue; FONT-FAMILY: Arial; FONT-SIZE: 12pt;}
		.subhead {COLOR: darkblue; FONT-FAMILY: Arial; FONT-SIZE: 12pt;}
		.text {COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 12pt;}
		th {COLOR: white; FONT-FAMILY: Arial; background-color:
		darkblue;}
		td {COLOR: blue; FONT-FAMILY: Arial}
		tr { background-color: beige; }
		body { background-color: beige; }
	</STYLE>
	</head>
	<body>
	<h1>Product Listing</h1>
	
	<table border="1">
	<tr>
		<th>ID</th>
		<th>Name</th>
		<th>Price</th>
		<th>Quantity</th>
	</tr>
	<xsl:for-each select="catalog/product">
	<xsl:sort select="name"/>
	<tr>
		<td><xsl:value-of select="prodid"/></td>
		<td><xsl:value-of select="name"/></td>
		<td><xsl:value-of select="price"/></td>
		<td><xsl:value-of select="quantity"/></td>
	</tr>
	</xsl:for-each>
	</table>
	Total products:
	<xsl:value-of select="count(//product)"/>
	</body>
	</html>
</xsl:template>
</xsl:stylesheet>



