<?xml version='1.0' encoding='utf-8' ?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"><xsl:output method="html" indent="yes"/>

<xsl:template match="/">
  <html>
    <body>
      <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="products">
	<h1>Product Listing for: <xsl:value-of select="@region" /> region</h1>

	<!--Display the headings for each element as a table header -->
	<table border="1">
	<xsl:for-each select="product[1]/*" > 
		 <th><xsl:value-of select="name(.)"/></th>
	</xsl:for-each> 

	<!--Display the data for each element as a table row -->
	<xsl:for-each select="product">
	<xsl:sort select="prodid" order="ascending" />
	<tr>
		<xsl:for-each select="*" > 
		<td><xsl:value-of select="text()" /></td>
		</xsl:for-each>
	</tr>
	</xsl:for-each>
	</table>


</xsl:template>





</xsl:stylesheet>
<!-- Stylus Studio meta-information - (c)1998-2001 eXcelon Corp.
<metaInformation>
<scenarios ><scenario name="JenniCombineB" url="file://c:\XMLJournalQnA\Article2\version2\Q3\DemoB\JenniCombineB.xml" htmlbaseurl=""/><scenario name="UntitledScenario1" url="" htmlbaseurl=""/></scenarios>
</metaInformation>
-->

