<?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="/control">
  <html>
    <head><title>Regional Product Listing</title></head>
    <body>
      <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>


<xsl:template match="get-data">
  <xsl:apply-templates select="document( unparsed-entity-uri( @ref ) )"/>
</xsl:template>


<xsl:template match="products">
	<h1>Product Listing for <xsl:value-of select="@region" /> region</h1>
	<table border="1">
	<xsl:for-each select="product">
	<xsl:sort select="name" order="ascending" />
	<tr>
		<td><xsl:value-of select="name" /></td>
		<td><xsl:value-of select="prodid" /></td>
		<td><xsl:value-of select="price" /></td>
		<td><xsl:value-of select="quantity" /></td>
	</tr>
	</xsl:for-each>
	</table>
</xsl:template>




</xsl:stylesheet>

