<?xml version="1.0" encoding="ISO-8859-1"?>
 <!-- We use the exclude-result-prefixes attribute to prevent the xml namespace from appearing in our output -->
<xsl:stylesheet 
 version="1.0" 
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
 xmlns:a="http://webservices.amazon.com/AWSECommerceService/2005-10-05"
 exclude-result-prefixes="a">
 <xsl:output method="html"/>
  <xsl:template match="/">
    <html>
      <body style="font-family:Arial, Helvetica, sans-serif">
        <h4 style="font-family: arial">YOUR WEB SEARCHES RESULTED IN FOLLOWING ON AMAZON.CO.UK</h4>
        <!-- Put the product data into a table. Left column contains the image, right column contains the product data -->
        <table border="0">
          <!-- Select all Item tags under ItemLookupResponse/Items -->
          <xsl:for-each select="a:ItemLookupResponse/a:Items/a:Item">
            <tr>
              <td>
             <img>  
				<xsl:attribute name="src">
                  <xsl:value-of select="a:MediumImage/a:URL" />
                  </xsl:attribute> 
                </img>  
              </td>
              <td valign="center" style="font-size: 100%; font-family: arial;">
                <!-- Set target=_blank so links open in new windows -->
                FIND MORE DETAILS AT: <a target="_blank">
                  <xsl:attribute name="href">
                    <!-- Get the detail page URL from Item tag selected -->
                    <xsl:value-of select="a:DetailPageURL" />
                  </xsl:attribute>
                  <!-- Get the title from the ItemAttributes tag under the item tag -->
                  <xsl:value-of select="a:ItemAttributes/a:Title" />
                </a>
                <!-- Insert the formatted price in italics and bold.-->
				<P>BOOK ISBN NUMBER: <b><xsl:value-of select="a:ItemAttributes/a:ISBN" /></b></P>
				<P>PUBLISHER: <b><xsl:value-of select="a:ItemAttributes/a:Publisher" /></b></P>
				<P>NEW FROM :<i><b><xsl:value-of select="a:OfferSummary/a:LowestNewPrice/a:FormattedPrice" /></b></i> </P>				  
                <P>LOWEST USED PRICES FROM GBP :<i><b><xsl:value-of select="a:OfferSummary/a:LowestUsedPrice/a:FormattedPrice" /></b></i> </P>
                <P>TOTAL USED FOUND :<i><b><xsl:value-of select="a:OfferSummary/a:TotalUsed" /></b></i> </P>

              </td>
            </tr>
          </xsl:for-each>
		 
		  </table>
		  
		  <table width="100%"><tr bgcolor="#9999FF"><P><b>EDITORIAL COMMENTS:</b> <xsl:value-of select="a:ItemLookupResponse/a:Items/a:Item/a:EditorialReviews/a:EditorialReview/a:Content" /></P> </tr></table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
