<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">

<html>
  <body>
    <h2>Video Catalog - Sort by Title</h2>
    
    <table border="1">
    <tr bgcolor="#9acd32">
      <th align="left">Title</th>
      <th align="left">Artist</th>
      <th align="left">Country</th>
      <th align="left">Company</th>
	  <th align="left">Price</th>
	  <th align="left">Year</th>
    </tr>
    
    <xsl:for-each select="catalog/cd">
	
	<!-- adding sort -->
	<xsl:sort select="title"/>

    <tr>

      <td><xsl:value-of select="title"/></td>
      <td><xsl:value-of select="artist"/></td>
      <td><xsl:value-of select="country"/></td>
      <td><xsl:value-of select="company"/></td>
	  <td><xsl:value-of select="price"/></td>
	  <td><xsl:value-of select="year"/></td>
    </tr>
    </xsl:for-each> 
    
    </table>
  </body>
  </html>
  
</xsl:template>
</xsl:stylesheet>