<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">

<html> 
<head><TITLE>STYLESHEET EXAMPLE</TITLE>
<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" valign="top">
      <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>
  
 <p class="text"> Total Products:<xsl:value-of select="count(catalog/product)" />  </p> 
  </body>
  </html>

</xsl:template>
</xsl:stylesheet>
