<?xml version="1.0"?>
<xsl:stylesheet 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">

<html>
<head>
<!--
##############################################################################
# XSLT Stylesheet                                                            # 
# Copyright 2002 Ian Purdie    http://www.electronics-tutorials.com/         #
##############################################################################
# COPYRIGHT NOTICE                                                           #
# Copyright 2002 Ian C. Purdie  All Rights Reserved.                         #
#                                                                            #
# This XSLT Stylesheet may be used and modified free of charge by anyone so  #
# long as this copyright notice and the comments above remain intact. By     #
# using this this code you agree to indemnify Ian C. Purdie from any         #
# liability that might arise from it's use.                                  #  
#                                                                            #
# Selling this code without prior written consent is expressly forbidden.    #
# In other words, please ask first before you try and make money off of my   #
# code.                                                                      #
#                                                                            #
# Obtain permission before redistributing this code over the Internet or     #
# in any other medium.  In all cases copyright and header must remain intact.#
##############################################################################
// -->

<title>Electronics Tutorials Bookshelf</title>
<style type="text/css">
P {
text-align: left;color: black;font-size: x-small;font-weight: normal;font-style: normal;font-family: verdana,arial,helvetica,sans-serif;margin-left: 5%;margin-right: 5%;
}

</style>

</head>
<body bgcolor="#FFFFFF">

<xsl:apply-templates select="ProductInfo/Details">
<xsl:sort select="SalesRank"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
  
<xsl:template match="Details">

<table border="0" cellpadding="3" width="80%" >

<tr><td align="left" valign="center" rowspan="2"><img src="http://www.electronics-tutorials.com/amazon-big/logo-ET.gif" alt="In Association with Amazon" border="0" height="91" width="200"/>
</td>
<td align="left" valign="center" bgcolor="#8ca5ce"><b><font color="#000000">Electronics Tutorials</font></b></td>

<td align="left" valign="center" rowspan="2"><img src="http://g-images.amazon.com/images/G/01/associates/navbar2000/logo-no-border(1).gif" alt="In Association with Amazon" border="0" height="43" width="148"/></td>
</tr>
<tr>
<td align="left" valign="center" bgcolor="#8ca5ce"><b><font color="#ffffff">In
Association with...</font></b></td>
<td></td>
</tr>
</table>
<br />
<table width="99%" border="0" cellspacing="0" cellpadding="5">

<tr bgcolor="#ffffff"><td valign="top" style="text-align:left;color:black;font-size:xx-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><b>NOTE:</b> This page is <b>directly served from Amazon Web Services</b> by dynamic means. It is exclusively powered by <b style="color:red;">Amazon Web Services V3.0</b>
<br /><br />
This allows you to receive up to the minute pricing, discounts and a direct <b>"Buy from Amazon.com"</b> button which adds the item straight to your Amazon shopping cart at <b style="color:red;">Amazon's web site</b> not mine.
<br /><br />
You can also check your shopping cart or your account at any time from links provided below.

<br /><br />Thank you so much for using this new service and demonstrating your very practical support of this site, Ian C. Purdie, <b>VK2TIP</b>
<br /><br /><b style="color:red;">Scroll down for other Amazon International sites</b>
<br /><br />
</td></tr>

<tr bgcolor="#8ca5ce"><td valign="top">
<font color="#ffffff"><b class="sans">You clicked on this item...</b></font>
</td></tr>

</table>
<table border="0" width="99%" cellpadding="1" cellspacing="0" bgcolor="#8ca5ce" ><tr><td>
<table width="99%" border="0" cellpadding="4" cellspacing="0" bgcolor="#8ca5ce"><tr><td bgcolor="#ffffff" valign="top">
<table border="0" width="99%" cellpadding="4" cellspacing="20"><tr valign="top">
<td align="center" valign="center">
<img src="{ImageUrlMedium}"/>
</td>
<td align="left" valign="top" width="55%" height="260" style="text-align:left;color:black;font-size:small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">
<img src="http://g-images.amazon.com/images/G/01/icons/icon-books.gif" width="22" height="22" align="absmiddle" hspace="2" vspace="2" border="0" alt="Icon"/>
<xsl:value-of select="ProductName"/>
<br />
<b style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><xsl:apply-templates select="Authors"/></b>
<br /><b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">Publisher: </b><b style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><xsl:value-of select="Manufacturer"/></b>
<br /><b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">Availability: </b><b style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><xsl:value-of select="Availability"/></b>
<br /><b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">Edition: </b><b style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><xsl:value-of select="Media"/></b>
<br /><br />

<table border="0">

<tr><td align="left" valign="center" colspan="2"><a href="http://www.amazon.com/exec/obidos/redirect?tag=ianpurdie150-20&amp;path=shopping-basket" target="_blank"><img src="http://www.electronics-tutorials.com/amazon-big/view-cart.gif" width="80" height="22" border="0" alt="view your amazon shopping cart" /></a><a href="http://www.amazon.com/exec/obidos/redirect?tag=ianpurdie150-20&amp;path=account-access-login" target="_blank"><img src="http://www.electronics-tutorials.com/amazon-big/your-account.gif" width="102" height="22" border="0" alt="view your amazon account" /></a><br /><br /></td></tr>

</table>

<td width="23%" bgcolor="#8ca5ce">
<table bgcolor="#ffffff" width="98%" height="260">
<tr><td bgcolor="#8ca5ce" align="center" valign="top" style="text-align:center;color:white;font-size:small;font-weight:bold;font-family:arial,helvetica,sans-serif,verdana;">
READY TO BUY?
</td></tr>
<tr><td bgcolor="#ffffff" align="center" valign="top" style="text-align:center;color:black;font-size:xx-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">
amazon.com prices subject to change
</td></tr>
<tr><td align="center" valign="top">
<xsl:call-template name="OurPrice">
<xsl:with-param name="OurPrice" 
select="substring(OurPrice, 2)"/>
<xsl:with-param name="ListPrice" 
select="substring(ListPrice, 2)"/>
</xsl:call-template>
</td></tr>
<tr><td align="center" valign="center">
<xsl:call-template name="BuyButton">
<xsl:with-param name="Asin" 
select="Asin"/>
</xsl:call-template>
</td></tr>
</table>
</td>
<table>

<tr><td align="center" valign="center" style="text-align:left;color:#CC6600;font-size:small;font-weight:bold;font-family:arial,helvetica,sans-serif;">
Customers who shopped for <b style="color:black">"<xsl:value-of select="ProductName"/>"</b> also shopped for 
<a
href="http://xml-na.amznxslt.com/onca/xml3?&amp;dev-t=D2U5FEMVH12ISD&amp;t=ianpurdie102-20&amp;SimilaritySearch={Asin}&amp;mode=books&amp;type=heavy&amp;page=1&amp;sort=+salesrank&amp;f=http://www.electronics-tutorials.com/amazon-big/asin-search.xsl" target="_blank">these similar books</a>.
<br /><br />
</td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:arial,helvetica,sans-serif;">
Other titles written by <b style="color:black">"<xsl:value-of select="Authors/Author"/>"</b> are 
<a
href="http://xml-na.amznxslt.com/onca/xml3?&amp;dev-t=D2U5FEMVH12ISD&amp;t=ianpurdie102-20&amp;AuthorSearch={Authors/Author}&amp;mode=books&amp;type=heavy&amp;page=1&amp;sort=+salesrank&amp;f=http://www.electronics-tutorials.com/amazon-big/asin-search.xsl" target="_blank">these books</a>.<br/>
<br />
</td></tr>

<tr><td style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">
CUSTOMER REVIEWS
</td></tr>
<tr><td style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;margin-left:5%;margin-right:5%;">
<xsl:apply-templates select="Reviews/AvgCustomerRating"/>
<xsl:apply-templates select="Reviews/CustomerReview">
<xsl:sort select="Rating" order="descending"/>
</xsl:apply-templates>
</td></tr>

<tr><td align="center" valign="center">
<xsl:call-template name="BuyButton">
<xsl:with-param name="Asin" 
select="Asin"/>
</xsl:call-template>
</td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:green;font-size:small;font-weight:bold;font-family:arial,helvetica,sans-serif;">NOT FROM THE USA?<br /><br /></td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">
We cannot guarantee availability at international Amazon stores.<br /><br />
</td></tr>


<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><img src="http://www.electronics-tutorials.com/amazon-big/flag_gb.jpg" width="35" height="23" border="0" alt="Amazon UK" /> UK Users Click Here: <a href="http://www.amazon.co.uk/exec/obidos/ASIN/{Isbn}/electronicstutor10-21" target="_blank"> <xsl:value-of select="ProductName"/>.</a>
</td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><img src="http://www.electronics-tutorials.com/amazon-big/flag_ca.jpg" width="35" height="23" border="0" alt="Amazon ca" /> Canadian Users Click Here: <a href="http://www.amazon.ca/exec/obidos/ASIN/{Isbn}/electronicstu-20" target="_blank"> <xsl:value-of select="ProductName"/>.</a>
</td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><img src="http://www.electronics-tutorials.com/amazon-big/flag_fr.jpg" width="35" height="23" border="0" alt="Amazon UK" /> Achetez ici de Amazon en France: <a href="http://www.amazon.fr/exec/obidos/ASIN/{Isbn}/electronicstut0e" target="_blank"> <xsl:value-of select="ProductName"/>.</a>
</td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><img src="http://www.electronics-tutorials.com/amazon-big/flag_de.jpg" width="35" height="23" border="0" alt="Amazon UK" /> Kaufen Sie hier von Amazon.de: <a href="http://www.amazon.de/exec/obidos/ASIN/{Isbn}/electronicstut09" target="_blank"> <xsl:value-of select="ProductName"/>.</a>
</td></tr>

<tr><td align="center" valign="center" style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><img src="http://www.electronics-tutorials.com/amazon-big/flag_jp.jpg" width="35" height="23" border="0" alt="Amazon UK" /> Japan Users Click Here: <a href="http://www.amazon.co.jp/exec/obidos/ASIN/{Isbn}/electronicstu-22" target="_blank"> <xsl:value-of select="ProductName"/>.</a><br /><br />
</td></tr>

<tr><td align="center" valign="center" style="text-align:center;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;"><xsl:apply-templates select="BrowseList"/>
</td></tr>

<tr><td align="center" valign="center" style="text-align:center;color:#CC6600;font-size:small;font-weight:bold;font-family:arial,helvetica,sans-serif;">
Customers who shopped for <b style="color:black">"<xsl:value-of select="ProductName"/>"</b> also shopped for 
<a
href="http://xml-na.amznxslt.com/onca/xml3?&amp;dev-t=D2U5FEMVH12ISD&amp;t=ianpurdie102-20&amp;SimilaritySearch={Asin}&amp;mode=books&amp;type=heavy&amp;page=1&amp;sort=+salesrank&amp;f=http://www.electronics-tutorials.com/amazon-big/asin-search.xsl" target="_blank">these similar books</a>.
<br /><br />
</td></tr>

<tr><td align="center" valign="center"></td></tr>

<tr><td align="left" valign="center" style="text-align:left;color:black;font-size:xx-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;">
<b>"<xsl:value-of select="ProductName"/>"</b><br />ISBN - <b><xsl:value-of select="Asin"/></b>
</td></tr>

</table>
</td></tr>
</table>
</td></tr>

<tr><td align="center" valign="center" bgcolor="#8ca5ce"><b><font color="#ffffff">Electronics Tutorials Book Shelf</font></b>
</td></tr>
<tr><td align="center" valign="center" bgcolor="#8ca5ce" style="text-align:center;color:black;font-size:xx-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">Developed using "<a href="http://www.electronics-tutorials.com/web-services/web-services-with-xslt.htm" target="_top">XML Web Services with XSLT</a>"
</td></tr>
<tr><td></td></tr>
</table>
</td></tr>
</table>
</xsl:template>

<xsl:template name="OurPrice">
<xsl:param name="OurPrice"  select="'1.00'"/>
<xsl:param name="ListPrice" select="'1.00'"/>
<xsl:choose>
<xsl:when test="$OurPrice = $ListPrice">
<b style="text-align:left;color:#FF0000;font-size:x-small;font-weight:normal;font-family:arial,verdana,helvetica,sans-serif;"><b>Our price: </b><xsl:text>$</xsl:text>
<xsl:value-of select="$OurPrice"/></b>
</xsl:when>
<xsl:otherwise>
<b style="text-align:left;color:black;font-size:small;font-weight:bold;font-family:arial,verdana,helvetica,sans-serif;text-decoration:line-through;"><b>List price:</b> <xsl:text>$</xsl:text>
<xsl:value-of select="$ListPrice"/></b>
<br /><br />
<b style="text-align:left;color:#FF0000;font-size:small;font-weight:bold;font-family:arial,helvetica,sans-serif,verdanna;">Our price: <xsl:text>$</xsl:text>
<xsl:value-of select="$OurPrice"/></b>
<br /><br />
<b style="text-align:left;color:green;font-size:small;font-weight:bold;font-family:arial,helvetica,sans-serif,verdana;">THAT'S
<xsl:value-of select="100 - round(($OurPrice div $ListPrice) * 100)"/>
<xsl:text>%</xsl:text>
OFF!
</b><br /><br />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="Authors">
<xsl:choose>
<xsl:when test="count(Author)&gt; 2">
<b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">By: </b>
<xsl:for-each select="Author">
<xsl:choose>
<xsl:when test="not(position() = last())">
<xsl:value-of select="."/>
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>and </xsl:text>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:when test="count(Author) = 2">
<b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">By: </b>
<xsl:value-of select="Author[1]"/>
<xsl:text> and </xsl:text>
<xsl:value-of select="Author[2]"/>
</xsl:when>
<xsl:otherwise>
<b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">By: </b>
<xsl:value-of select="Author"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template name="BuyButton">
<xsl:param name="Asin"/>
<form method="POST"
action="{concat('http://www.amazon.com/o/dt/assoc/handle-buy-box=',$Asin)}">
<input type="hidden" name="{concat('asin.', $Asin)}" value="1"/>
<input type="hidden" name="tag_value" value="ianpurdie101-20"/>
<input type="hidden" name="tag-value" value="ianpurdie101-20"/>
<input type="hidden" name="dev-tag-value" value="D2U5FEMVH12ISD"/>
<input type="image"  value="Add this to your Amazon Shopping Cart" name="submit.add-to-cart" src="http://www.electronics-tutorials.com/amazon-big/buy-from-amazon.gif" align="center" alt="Buy from Amazon" border="0" width="170" height="20"/><br /><br /><b style="text-align:center;color:red;font-size:xx-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;">you can always remove it from your Amazon Shopping Cart at a later date...</b> 
</form>
</xsl:template>


<xsl:template match="AvgCustomerRating">
<tr>
<td colspan="2">
<b style="text-align:center;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;">Average customer rating: </b>
<xsl:call-template name="Stars">
<xsl:with-param name="average" select="."/>
</xsl:call-template>
</td>
</tr>
</xsl:template>
<xsl:template match="CustomerReview">
<tr>
<td colspan="2">
<xsl:call-template name="Stars">
<xsl:with-param name="average" select="Rating"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<b style="text-align:left;color:black;font-size:x-small;font-weight:bold;font-family:verdana,arial,helvetica,sans-serif;"><xsl:value-of select="Summary"/></b>
<br />
<p style="text-align:left;color:black;font-size:x-small;font-weight:normal;font-family:verdana,arial,helvetica,sans-serif;margin-left:5%;margin-right:5%;"><xsl:value-of select="Comment" disable-output-escaping="yes"/>
<br /><br />
</p>
</td>
</tr>
</xsl:template>
<xsl:template name="Stars">
<xsl:param name="average" select="5"/>
<xsl:choose>
<xsl:when test="$average &gt; 4.75">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-5-0.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 4.25">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-4-5.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 3.75">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-4-0.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 3.25">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-3-5.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 2.75">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-3-0.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 2.25">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-2-5.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 1.75">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-2-0.gif"/>
</xsl:when>
<xsl:when test="$average &gt; 1.25">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-1-5.gif"/>
</xsl:when>
<xsl:when test="$average &gt; .75">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-1-0.gif"/>
</xsl:when>
<xsl:when test="$average &gt; .25">
<img src="http://g-images.amazon.com/images/G/01/detail/stars-0-5.gif"/>
</xsl:when>
<xsl:otherwise>
<img src="http://g-images.amazon.com/images/G/01/detail/stars-0-0.gif"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Browse Subject Template -->
<xsl:template match="BrowseList">
<xsl:if test="../Catalog = 'Book'">
<b>Browse the Top 10 Bestselling at Amazon.com by related subject:</b><br /><br />
<xsl:for-each select="BrowseNode">
<xsl:for-each select="BrowseName">
<a href="http://xml-na.amznxslt.com/onca/xml3?&amp;t=ianpurdie155-20&amp;dev-t=D2U5FEMVH12ISD&amp;PowerSearch=subject:{current()}&amp;mode=books&amp;type=heavy&amp;page=1&amp;sort=+salesrank&amp;f=http://www.electronics-tutorials.com/amazon-big/asin-search.xsl" target="_blank">
<xsl:value-of select="."/></a><br />
</xsl:for-each>
</xsl:for-each>
<br />
</xsl:if>
</xsl:template>

</xsl:stylesheet>