Amazon Explorer v109 - XSL Code
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.1">
- <xsl:output method="html" encoding="UTF-8"/>
- <!-- Amazon XSL Explorer v109 January 25, 2004 -->
- <!-- Copyright 2002-2004 by Celtic One Design -->
- <!-- http://celtic-one-design.com/amazon-xsl109.htm -->
- <!-- All rights reserved -->
- <!-- Conditions of use: -->
- <!-- (1) This comment header is not to be removed -->
- <!-- (2) If you wish to remove the Copyright Notice / Byline
at the bottom of -->
- <!-- Amazon Explorer then permission is given as long as you
have a link -->
- <!-- to http://celtic-one-design.com/amazon-xsl109.htm
somewhere on all -->
- <!-- websites using Amazon Explorer. -->
- <!-- (3) Distribute freely -->
- <!-- (4) Subject to the conditions and terms of the GNU
General Public License -->
- <!-- as published by the Free Software Foundation; either
version 2 of the -->
- <!-- License, or (at your option) any later version. -->
- <!-- http://www.gnu.org/copyleft/gpl.html#SEC3 -->
- <!-- (5) This stylesheet is distributed in the hope that it
will be useful, -->
- <!-- but WITHOUT ANY WARRANTY; without even the implied
warranty of -->
- <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the -->
- <!-- GNU General Public License for more details. -->
- <!--User Defined Variables-->
- <xsl:variable name="title" select="'Amazon Explorer'"/>
- <xsl:variable name="bookmarktitle" select="'Support This
Site By
Using This Bookmark To Make Purchases At Amazon.com.'"/>
- <xsl:variable name="associate-id" select="'celticstones'"/>
- <xsl:variable name="image-url" select="'http://celtic-one-design.com/images/amz_images1/'"/>
- <xsl:variable name="target" select="'_top'"/>
- <xsl:variable name="AWSversion" select="'
http://xml-na.amznxslt.com/onca/xml3?'"/>
- <!-- Do Not Modify The Following Variables-->
- <xsl:variable name="TYPE" select="/ProductInfo/Request/Args/Arg[@name='type']/@value"/>
- <xsl:variable name="PAGE" select="/ProductInfo/Request/Args/Arg[@name='page']/@value"/>
- <xsl:variable name="MODE" select="/ProductInfo/Request/Args/Arg[@name='mode']/@value"/>
- <xsl:variable name="SORT" select="/ProductInfo/Request/Args/Arg[@name='sort']/@value"/>
- <xsl:variable name="TEMPLATE-URL" select="/ProductInfo/Request/Args/Arg[@name='f']/@value"/>
- <xsl:variable name="OFFER" select="/ProductInfo/Request/Args/Arg[@name='offer']/@value"/>
- <xsl:variable name="DEVELOPER-TAG"
select="'D33U9QUBB1LUSJ'"/>
- <xsl:variable name="LOCALE" select="/ProductInfo/Request/Args/Arg[@name='locale']/@value"/>
- <xsl:variable name="SearchType">
- <xsl:choose>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='BrowseNodeSearch']">
BrowseNodeSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='BrowseNodeSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='PowerSearch']">
PowerSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='PowerSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='AuthorSearch']">
AuthorSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='AuthorSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='ArtistSearch']">
ArtistSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='ArtistSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='ActorSearch']">
ActorSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='ActorSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='DirectorSearch']">
DirectorSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='DirectorSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='ManufacturerSearch']">
ManufacturerSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='ManufacturerSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='AsinSearch']">
AsinSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='AsinSearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='SimilaritySearch']">
SimilaritySearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='SimilaritySearch']/@value" /></xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='KeywordSearch']">
KeywordSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[
@name='KeywordSearch']/@value" /></xsl:when>
- </xsl:choose>
- </xsl:variable>
- <!-- Root -->
- <xsl:template match="/">
- <html>
- <head>
- <xsl:if test="count(ProductInfo/Details) != 0 and
(count(ProductInfo/Details/Availability) = 0 or
(count(ProductInfo/Details/NumberOfOfferings) = 0 and
$OFFER='ThirdPartyNew'))">
- <script language="JavaScript1.2" type="text/javascript">
- setTimeout('location.replace(document.location);', 200)
- </script>
- </xsl:if>
- <META http-equiv="Pragma" content="no-cache" />
- <META http-equiv="Expires" content="-1" />
- <style>
- <xsl:comment>
- body {
- font-family: verdana, sans-serif;
- padding: .25em .5em .25em .5em;
- color: black;
- background-color: white;
- }
-
- #header, .toolbar, #asinbox, #pricebox, .SearchBox, #ProductBox
{
- border: .25em solid #336699;
- background-color: white;
- color: black;
- }
- #marketplace {
- background-color: white;
- color: black;
- }
- #buybox, .reverse, .SearchBoxLabel, .label, .subject, .title
{
- background-color: #336699;
- color: white;
- }
- #header {
- width: 100%;
- border-spacing: .25em;
- font-size: x-small;
- }
-
- #footer {
- background-color: white;
- border: .25em solid #336699;
- font-size: xx-small;
- text-align: center;
- padding: .25em;
- }
-
- .toolbar {
- width: 100%;
- border-spacing: .25em;
- font-size: xx-small;
- text-align: center;
- }
-
- .toolbar select {
- margin: 0px;
- padding: 0px;
- }
- #asinbox {
- width: 100%;
- padding: 0px;
- font-size: x-small;
- }
-
- #buybox {
- float: right;
- width: 15em;
- margin: 0px;
- text-align: center;
- vertical-align: top;
- padding: .25em;
- }
- #pricebox {
- padding: .25em;
- height: 5ems;
- }
-
- #asin_detail {
- text-align: left;
- vertical-align: top;
- }
- #asin_detail img {
- margin-left: 1em;
- margin-right: 1em;
-
- border: 0px;
- }
- #asin_detail ul {
- list-style-type: disc;
- margin-top: 0px;
- margin-bottom: 0px;
- margin-left: 2em;
- }
-
- #sub_asin_detail {
- float: left;
- margin-right: .25em;
- text-align: left;
- vertical-align: top;
- }
-
- #tracks, #ProductDescription, #reviews, #similar,
#accessories,
#browselist, #marketplace {
- margin: 3em .5em 3em .5em;
- }
- #similar, #accessories, #browselist {
- text-align: center;
- }
- #tracks ol {
- margin-top: 0px;
- margin-bottom: 0px;
- margin-left: 2em;
- }
-
- #marketplace {
- width: 100%;
- border: 0px;
- font-size: x-small;
- }
-
- .SearchBox {
- width: 100%;
- border-spacing: .25em;
- font-size: xx-small;
- }
- .SearchBox h3 {
- letter-spacing: .5em;
- }
-
- .SearchBoxLabel {
- font-size: x-small;
- text-align: center;
- vertical-align: top;
- padding: .25em;
- }
- #ProductBox {
- padding: 0px;
- width: 100%;
- padding: .25em;
- font-size: xx-small;
- }
-
- #ProductBoxItem{
- width: 32%;
- height: 200px;
- float: left;
- text-align: center;
- vertical-align: top;
- padding: 0px;
- margin: 1em .25em 1em .25em;
- }
-
- .label {
- font-size: small;
- font-weight: bold;
- text-align: center;
- vertical-align: top;
- padding: .25em;
- }
- .subject {
- font-size: small;
- font-weight: bold;
- text-transform: capitalize;
- text-align: center;
- vertical-align: top;
- padding: .25em;
- margin: .25em;
- }
-
- .title {
- font-size: small;
- font-weight: bold;
- letter-spacing: .25em;
- text-align: center;
- vertical-align: top;
- padding: .25em;
- margin: .25em;
- }
-
- button, .buybutton, .searchbutton {
- color: white;
- background-color: #336699;
- cursor: hand;
- margin: .25em .25em .25em .25em;
- text-align: center;
- }
-
- .buybutton, .searchbutton {
- width: 100%;
- }
- .leftright {
- padding-left: 10%;
- padding-right: 10%;
- }
- h3 {
- margin: .25em;
- }
- hr {
- color: black;
- width: 90%;
- height: .25em;
- clear: all;
- }
- img {
- border: 0px;
- }
-
- form {
- margin-top: 0px;
- }
- </xsl:comment>
- </style>
- <title><xsl:value-of select="$title"/><xsl:text> - </xsl:text>
- <xsl:choose>
- <xsl:when test="/ProductInfo/Request/Args/Arg
[@name='BrowseNodeSearch']">
- <xsl:value-of select="ProductInfo/Details/Catalog"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="substring-after($SearchType,'=')"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
- </head>
- <body>
- <xsl:call-template name="Header" />
- <xsl:call-template name="Toolbar" />
- <br />
- <xsl:choose>
- <xsl:when test="count(ProductInfo/Details) = 0">
- <div align="center" class="label">
- <p>Unable to find exact matches for your search for<br />
<br /><b>"<xsl:value-of select="substring-after($SearchType,'=')"/>"
</b><br /><br />
- Please modify your search and try again.</p>
- </div>
- </xsl:when>
- <xsl:when test="/ProductInfo/Request/Args/Arg[@name='AsinSearch']">
- <xsl:apply-templates select="ProductInfo/Details" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="AWSSearch" />
- </xsl:otherwise>
- </xsl:choose>
- <br />
- <xsl:call-template name="SearchBox" />
- <xsl:call-template name="Footer" />
- </body>
- </html>
- </xsl:template>
- <!-- End Of Root -->
- <!-- Start of Templates -->
- <!--Details-->
- <xsl:template match="Details">
- <span class="label"><xsl:apply-templates
select="Catalog"/></span>
- <div id="asinbox">
- <!--DISPLAY RIGHT SIDE BUY BOX-->
- <div id="buybox">
- <b>Ready To Buy?</b>
- <div id="pricebox">
- <xsl:variable name="nOurPrice">
- <xsl:value-of select="translate(OurPrice,',$','')"/>
- </xsl:variable>
- <xsl:variable name="nListPrice">
- <xsl:value-of select="translate(ListPrice,',$','')"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="count(OurPrice) = 0 or ($LOCALE='us' and
substring(Availability,1,7) != 'Usually' and
substring(Availability,1,13) != 'In stock soon' and
substring(Availability,1,7) != 'Not yet' and
substring(Availability,1,13) != 'Special Order')"><p>
<b style="color:red;">Sorry!<br /> - <br />Not Available At
Amazon.com</b><br />
- <xsl:if test="(count(ThirdPartyProductInfo) != 0 and
$OFFER='ThirdPartyNew')">
- <b style="color:red;"> - <br />Check New At Amazon
Marketplace Section At The Bottom</b>
- </xsl:if>
- </p></xsl:when>
- <xsl:when test="substring(OurPrice,1,3) = 'Too'"><p><b
style="color:green;">PRICE: </b>
Our Unusually Low Price is so low that we can't show it on this
page. To see our price, add this
item to your cart. You can always remove it later.</p></xsl:when>
- <xsl:when test="($nOurPrice >= $nListPrice) or
not(number($nListPrice))"><p><b style="color:green;">
Our price: <xsl:value-of select="OurPrice"/></b><br /></p></xsl:when>
- <xsl:otherwise>
- <p><b style="color:black; text-decoration:line-through;">List
price: <xsl:value-of
select="ListPrice"/></b><br />
- <b style="color:red;">Our price: <xsl:value-of select="OurPrice"/></b><br
/>
- <b style="color:green;">THAT'S <xsl:value-of select="100 -
round(($nOurPrice div $nListPrice) * 100)"/>
<xsl:text>%</xsl:text> OFF!</b></p>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- <xsl:if test="count(OurPrice) != 0 and
(substring(Availability,1,7) = 'Usually' or
substring(Availability,1,13) = 'In stock soon' or
substring(Availability,1,7) = 'Not yet' or
substring(Availability,1,13) = 'Special Order')">
- <form method="POST" target="{$target}" 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="{$associate-id}"/>
- <input type="hidden" name="tag-value"
value="{$associate-id}"/>
- <input type="hidden" name="dev-tag-value"
value="{$DEVELOPER-TAG}"/>
- <input type="submit" name="submit.add-to-cart" value="Buy At
Amazon.com"
title="Buy From Amazon.com" class="buybutton" />
- </form>
- </xsl:if>
- <xsl:variable name="nonostring">'"</xsl:variable>
- <xsl:variable name="product_title"><xsl:value-of select=
"translate(ProductName, $nonostring, '')"/></xsl:variable>
- <button class="buybutton" onclick="window.external.AddFavorite('{@url}',
'{$product_title}');"
title="No Time? Bookmark it!">Bookmark It!</button>
- <button class="buybutton" onclick="top.window.location='{@url}'"
title="More Product Info From Amazon.com?">More Product
Info?</button>
- </div>
- <!--DISPLAY PRODUCT DETAILS -->
- <div id="asin_detail">
- <h3><xsl:value-of select="ProductName"/></h3>
- <div style="float: left; text-align: center;"><img src="{ImageUrlMedium}"
onload="if(this.width=='1')
this.src='http://g-images.amazon.com/images/G/01/books/icons/books-no-image.gif'"/><br
/>
- <a href="{ImageUrlLarge}" target="{$target}" title="Click
For Larger Image - If Available">
<img src="http://g-images.amazon.com/images/G/01/books/inside/zoom-in-button.gif"
/></a></div>
- <div id="sub_asin_detail">
- <xsl:apply-templates select="Authors | Artists | Starring |
Directors"/>
- <xsl:apply-templates select="Manufacturer"/>
- <xsl:apply-templates select="Availability"/>
- <br />
- <xsl:if test="(Catalog = 'DVD') or (Catalog = 'Video Games')
or
(Catalog = 'Video') or (Catalog = 'Software') or
(Catalog = 'Music') or (Catalog = 'Book')">
- <xsl:apply-templates select="Media"/>
- </xsl:if>
- <xsl:apply-templates select="NumMedia"/>
- <xsl:apply-templates select="NumberOfPages"/>
- <xsl:apply-templates select="RunningTime"/>
- <xsl:apply-templates select="NumberOfIssues"/>
- <xsl:apply-templates select="IssuesPerYear"/>
- <xsl:apply-templates select="SubscriptionLength"/>
- <xsl:apply-templates select="ReadingLevel"/>
- <xsl:apply-templates select="MpaaRating"/>
- <xsl:apply-templates select="EsrbRating"/>
- <xsl:apply-templates select="AgeGroup"/>
- <xsl:apply-templates select="TheatricalReleaseDate"/>
- <xsl:apply-templates select="ReleaseDate"/>
- <xsl:apply-templates select="SalesRank"/>
- <xsl:apply-templates select="Isbn"/>
- <xsl:apply-templates select="DeweyNumber"/>
- <xsl:apply-templates select="Mpn"/>
- <xsl:apply-templates select="Upc"/>
- <xsl:apply-templates select="Platforms"/>
- <xsl:apply-templates select="Features"/>
- </div></div>
- <br clear="all" />
- <!-- DISPLAY SOUNDTRACKS -->
- <xsl:apply-templates select="Tracks" />
- <!-- DISPLAY REVIEWS -->
- <xsl:apply-templates select="ProductDescription" />
- <xsl:apply-templates select="Reviews/AvgCustomerRating"/>
- <!-- DISPLAY ACCESSORIES / SIMILAR ITEMS IMAGES -->
- <xsl:apply-templates select="Accessories"/>
- <xsl:apply-templates select="SimilarProducts"/>
- <!-- DISPLAY BROWSENODE LIST -->
- <xsl:apply-templates select="BrowseList"/>
- <!-- DISPLAY Amazon Marketplace -->
- <xsl:apply-templates select="ThirdPartyProductInfo"/>
- <div class="title"><xsl:value-of select="$title" /></div>
- </div>
- </xsl:template>
- <!--END OF DETAIL TEMPLATE-->
- <!--Process all non ASIN Searches-->
- <xsl:template name="AWSSearch">
- <div id="ProductBox">
- <div class="subject">
- <xsl:choose>
- <xsl:when test="/ProductInfo/Request/Args/Arg[
@name='BrowseNodeSearch']">
- <xsl:value-of select="$MODE"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="substring-after($SearchType,'=')"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- <xsl:for-each select="ProductInfo/Details">
- <xsl:sort select="(count(ThirdPartyProductInfo) != 0 and
$OFFER='ThirdPartyNew') or substring(Availability,1,7) =
'Usually' or
substring(Availability,1,13) ='In stock soon' or
substring(Availability,1,7)='Not yet' or
substring(Availability,1,13)='Special Order'"
order="descending"/>
- <xsl:sort select="number(translate(SalesRank,',',''))"
data-type="number" order="ascending"/>
- <xsl:call-template name="Cell"><xsl:with-param name="t"
select="'_self'"/>
</xsl:call-template>
- <xsl:if test="position() mod 3 = 0 or position() = last()">
<br clear="all" /></xsl:if>
- </xsl:for-each>
- <div class="title"><xsl:value-of select="$title" /></div>
- </div>
- </xsl:template>
- <xsl:template name="Cell">
- <xsl:param name="t"/>
- <xsl:if test="(count(ThirdPartyProductInfo) != 0 and
$OFFER='ThirdPartyNew') or
substring(Availability,1,7) = 'Usually' or
substring(Availability,1,13) ='In stock soon' or
substring(Availability,1,7)='Not yet' or
substring(Availability,1,13)='Special Order'">
- <xsl:variable name="product_title" select="ProductName"/>
- <xsl:variable name="product_title2">
- <xsl:choose>
- <xsl:when test="substring-before(translate(ProductName,':(','**'),'*')
= ''">
- <xsl:value-of select="$product_title"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="substring-before(translate(ProductName,':(','**'),'*')"/>
</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div id="ProductBoxItem">
- <a target="{$t}" href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}&AsinSearch={Asin}&type=heavy
&offer={$OFFER}&locale={$LOCALE}
&f={$TEMPLATE-URL}">
<img title="{$product_title}" src="{ImageUrlMedium}" onload="if(this.width=='1')
this.src='http://g-images.amazon.com/images/G/01/books/icons/books-no-image.gif'"/></a>
- <br />
- <xsl:if test="count(OurPrice) != 0">
- Buy New: <font color="#990000"><xsl:value-of
select="OurPrice"/></font><br />
- </xsl:if>
- <a target="{$t}"
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}&AsinSearch={Asin}
&type=heavy&offer={$OFFER}&locale={$LOCALE}
&f={$TEMPLATE-URL}" title="{$product_title}">
<xsl:value-of select="substring($product_title2,1,60)"
disable-output-escaping="yes" /></a>
- </div>
- </xsl:if>
- </xsl:template>
- <!--Header of Page-->
- <xsl:template name="Header">
- <table id="header">
- <tr><td align="center" width="60%">
- <div class="title"><xsl:value-of select="$title" /></div>
- </td>
- <td rowspan="2">
- <a
href="http://www.amazon.com/exec/obidos/redirect-home/{$associate-id}">
- <img
onclick="window.external.AddFavorite('http://www.amazon.com/exec/obidos/
redirect-home/{$associate-id}','Amazon.com');"
src="http://g-images.amazon.com/images/
G/01/associates/navbar2000/logo-no-border(1).gif"
title="{$bookmarktitle}" height="43" width="148"/></a>
- <img src="{$image-url}amazon-webservices3.jpg"/>
- </td></tr>
- <tr><td align="center"><div class="title">In Association
with ...</div></td>
- </tr></table>
- </xsl:template>
- <!--Footer of Page-->
- <xsl:template name="Footer">
- <div id="footer">
- <font color="red">
- <b>Amazon.com prices are subject to change.</b></font>
- <br />
- Amazon XSL Explorer v109 © 2002 - 2004 by <a href="http://celtic-one-design.com/amazon-xsl109.htm"
target="_top">CelticOneDesign</a>
- <!--XSLT Tracking Code = (Remove) -->
- <script language="JavaScript"
src="http://celtic-one-design.com/js/tracker.js"></script>
- </div>
- </xsl:template>
- <!--SearchBox-->
- <xsl:template name="SearchBox">
- <form name="myform" onsubmit="return false">
- <table cols="4" class="SearchBox">
- <tr><td align="center" colspan="4">
- <h3>Amazon Products Search</h3>
- </td></tr>
- <tr><td width="30%" align="center">
- <div class="SearchBoxLabel">Search Type<br />
- <select name="advSearch">
- <option value="KeywordSearch" selected="">Keyword
Search</option>
- <option value="ActorSearch">Actor Search</option>
- <option value="DirectorSearch">Director Search</option>
- <option value="ArtistSearch">Band/Artist Search</option>
- <option value="AuthorSearch">Author Search</option>
- <option value="AsinSearch">ISBN Search</option>
- <option value="UpcSearch">UPC Search (CDs Only)</option>
- <option value="ManufacturerSearch">Manufacturer</option>
- </select></div></td>
- <td width="30%" align="center">
- <div class="SearchBoxLabel">Search Term<br />
- <input maxLength="256" name="searchterm" size="20"
/></div></td>
- <td width="30%" align="center">
- <div class="SearchBoxLabel">Product Type<br />
- <select name="mode">
- <option value="books" selected="">Books</option>
- <option value="magazines">... Magazines</option>
- <option value="video">All Movies</option>
- <option value="dvd">... DVD Only</option>
- <option value="vhs">... VHS Only</option>
- <option value="music">Music</option>
- <option value="electronics">Electronics</option>
- <option value="pc-hardware">... Computers</option>
- <option value="software">... ... Software</option>
- <option value="photo">... Camera & Photo</option>
- <option value="toys">Toys & Games</option>
- <option value="videogames">... Video Games</option>
- <option value="garden">Outdoor Living</option>
- <option value="kitchen">Kitchen & Housewares</option>
- <option value="tools">Tools & Hardware</option>
- <option value="baby">Baby</option>
- </select></div></td>
- <td width="10%" align="center">
- <input title="Click To Search" class="searchbutton"
onclick="window.location.href='{$AWSversion}t={$associate-id}
&dev-t={$DEVELOPER-TAG}&' + myform.advSearch.value + '='
+ myform.searchterm.value +
'&page=1&mode='+ myform.mode.value + '&type=heavy
&offer={$OFFER}&locale={$LOCALE}&sort=+salesrank
&f={$TEMPLATE-URL}'; return false" type="button"
value="Search" />
- </td></tr>
- </table>
- </form>
- </xsl:template>
- <xsl:template name="Toolbar">
- <table class="toolbar">
- <tr valign="middle">
- <td width="40%" align="left">
- <a
href="http://www.amazon.com/exec/obidos/redirect?tag={$associate-id}
&path=shopping-basket" target="{$target}" title="View Your
Amazon.com Cart">View Cart</a>
- <xsl:text> | </xsl:text>
- <a
href="http://www.amazon.com/exec/obidos/redirect?tag={$associate-id}
&path=account-access-login" target="{$target}">View your
Amazon Account</a>
- </td>
- <td align="center">
- <xsl:variable name="stub" select="concat($AWSversion,
't=',$associate-id,
'&dev-t=',$DEVELOPER-TAG,'&page=1&type=',$TYPE,
'&offer=', $OFFER,'&locale=',$LOCALE,
'&sort=+salesrank&f=',$TEMPLATE-URL,'&BrowseNodeSearch=')"
/>
- <select name="search"
onChange="location=this.options[this.selectedIndex].value">
- <option selected="" value="">Browse Amazon</option>
- <option value="{$stub}53&mode=books">Books</option>
- <option
value="{$stub}599872&mode=magazines">...Magazines</option>
- <option value="{$stub}404272&mode=video">All
Movies</option>
- <option value="{$stub}130&mode=dvd">...DVD</option>
- <option value="{$stub}404272&mode=vhs">...VHS</option>
- <option value="{$stub}301668&mode=music">Music</option>
- <option
value="{$stub}172282&mode=electronics">Electronics</option>
- <option
value="{$stub}565118&mode=pc-hardware">...Computers</option>
- <option value="{$stub}491286&mode=software">...
...Software</option>
- <option value="{$stub}502394&mode=photo">...Camera &
Photo</option>
- <option value="{$stub}491290&mode=toys">Toys &
Games</option>
- <option value="{$stub}471280&mode=videogames">...Video
Games</option>
- <option
value="{$stub}468250&mode=garden">Outdoor</option>
- <option value="{$stub}491864&mode=kitchen">Kitchen &
Housewares</option>
- <option value="{$stub}468240&mode=tools">Tools &
Hardware</option>
- <option value="{$stub}542456&mode=baby">Baby</option>
- </select>
- </td>
- <td width="40%" align="right">
- <xsl:apply-templates select="/ProductInfo/TotalPages" />
- </td></tr></table>
- </xsl:template>
- <!--Total Pages-->
- <xsl:template match="TotalPages">
- <xsl:if test="$PAGE != 1">
- <a href="{$AWSversion}t={$associate-id}
&dev-t={$DEVELOPER-TAG}&{$SearchType}&page={$PAGE
-1}
&mode={$MODE}&type={$TYPE}&sort={$SORT}
&offer={$OFFER}&locale={$LOCALE}&f={$TEMPLATE-URL}"><<
Previous</a>
- <xsl:text> - </xsl:text>
- </xsl:if>
- PAGE <xsl:value-of select="$PAGE"/> OF <xsl:value-of
select="." />
- <xsl:if test="$PAGE != .">
- <xsl:text> - </xsl:text>
- <a
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}
&{$SearchType}&page={$PAGE +1}&mode={$MODE}
&type={$TYPE}&sort={$SORT}&offer={$OFFER}
&locale={$LOCALE}&f={$TEMPLATE-URL}">Next >></a>
- </xsl:if>
- </xsl:template>
- <xsl:template match="NumMedia">
- <xsl:if test="count(.) != 0 and . > 1">
- <b>Number in set: </b><xsl:value-of select="."/><br />
- </xsl:if>
- </xsl:template>
- <xsl:template match="NumberOfPages">
- <b>Number Of Pages: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="DeweyNumber">
- <b>Dewey Number: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="RunningTime">
- <b>Running Time: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="NumberOfIssues">
- <b>Number Of Issues: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="IssuesPerYear">
- <b>Issues Per Year: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="SubscriptionLength">
- <b>Subscription Length: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="ReadingLevel">
- <b>Reading Level: </b><xsl:value-of select="."/><br />
- </xsl:template>
-
- <xsl:template match="SalesRank">
- <b>Amazon Sales Rank: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="MpaaRating">
- <b>Rating: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="EsrbRating">
- <b>ESRB Rating: </b><a
href="http://www.amazon.com/exec/obidos/redirect?tag={$associate-id}
&path=tg/feature/-/71576" title="ESRB: Understanding Video
Game Ratings" target="{$target}">
- <xsl:value-of select="."/></a><br />
- </xsl:template>
- <xsl:template match="AgeGroup">
- <b>Age Group: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="Isbn">
- <b>ISBN: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="Upc">
- <b>UPC: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="Mpn">
- <b>Manufacturer's Part Number: </b><xsl:value-of
select="."/><br />
- </xsl:template>
- <xsl:template match="Media">
- <b>Media: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="Catalog">
- <xsl:text> - </xsl:text>Amazon <xsl:value-of select="."/>
Catalog<xsl:text> - </xsl:text>
- </xsl:template>
- <xsl:template match="ReleaseDate">
- <b>Release Date: </b><xsl:value-of select="."/><br />
- </xsl:template>
- <xsl:template match="TheatricalReleaseDate">
- <b>Theatrical Release Date: </b><xsl:value-of
select="."/><br />
- </xsl:template>
- <xsl:template match="Availability">
- <b>Availability: </b><xsl:value-of select="."/>
- <xsl:if test="(substring(.,1,13)='Special Order')">. Please
note that special order titles occasionally go out of
stock.<xsl:text> </xsl:text>
- <xsl:if test="../Catalog = 'Book'">These hard-to-find titles
are not discounted and are subject to
<a
href="http://www.amazon.com/exec/obidos/redirect?tag={$associate-id}
&path=tg/browse/-/510066/" target="{$target}">an additional
charge of $1.99 per item</a> due to the extra cost of ordering
them.<xsl:text> </xsl:text></xsl:if>
- Amazon.com will notify you within 2-4 weeks if they have
trouble obtaining this title.</xsl:if>
- <xsl:if test="(substring(.,1,7)='Not yet')">. You may order
it now and we will ship it to you when it arrives.</xsl:if>
- <br />
- </xsl:template>
- <xsl:template match="Platforms">
- <br /><b>Platforms: </b>
- <ul>
- <xsl:for-each select="Platform"><li><xsl:value-of
select="."/></li></xsl:for-each>
- </ul>
- </xsl:template>
- <xsl:template match="Tracks">
- <div id="tracks">
- <h3>Tracks</h3>
- <ol>
- <xsl:for-each select="Track"><li><xsl:value-of
select="."/></li></xsl:for-each>
- </ol>
- </div>
- </xsl:template>
- <xsl:template match="Accessories">
- <div id="accessories">
- <h3>Accessories</h3><hr />
- <xsl:for-each select="Accessory">
- <a
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}&AsinSearch={current()}&type=heavy
&offer={$OFFER}&locale={$LOCALE}&f={$TEMPLATE-URL}">
- <img title="Click to View More Information For This
Accessory"
src="http://images.amazon.com/images/P/{current()}.01.MZZZZZZZ.jpg"
/></a>
- </xsl:for-each>
- <hr />
- </div>
- </xsl:template>
- <xsl:template match="SimilarProducts">
- <div id="similar">
- <h3>Similar Items</h3>
- <hr />
- <xsl:for-each select="Product">
- <a
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}&AsinSearch={current()}
&type=heavy&offer={$OFFER}&locale={$LOCALE}
&f={$TEMPLATE-URL}">
- <img title="Click to Explore This Similar Item"
src="http://images.amazon.com/images/P/{current()}.01.MZZZZZZZ.jpg"
/></a>
- </xsl:for-each>
- <hr />
- <b><a
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}&SimilaritySearch={../Asin}&offer={$OFFER}
&locale={$LOCALE}&type={$TYPE}&sort=+salesrank
&f={$TEMPLATE-URL}">Explore Similar Items?</a></b>
- </div>
- </xsl:template>
- <xsl:template match="Features">
- <br /><b>Features:</b>
- <ul>
- <xsl:for-each select="Feature"><li><xsl:value-of
select="."/></li></xsl:for-each>
- </ul>
- </xsl:template>
- <xsl:template match="BrowseList">
- <xsl:variable
name="nonostring">'":&#()</xsl:variable>
- <xsl:if test="../Catalog = 'Book'">
- <div id="browselist">
- <h3>Related Subjects</h3>
- <hr />
- <xsl:for-each select="BrowseNode"><xsl:for-each
select="BrowseName">
- <xsl:variable name="subject">
- <xsl:value-of select="translate(current(), $nonostring,
'')"/>
- </xsl:variable>
- <a
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}&PowerSearch=subject:{$subject}
&page=1&mode=books&type={$TYPE}&offer={$OFFER}
&locale={$LOCALE}&sort=+salesrank&f={$TEMPLATE-URL}">
- <xsl:value-of select="."/></a><br />
- </xsl:for-each></xsl:for-each>
- <hr />
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template match="ThirdPartyProductInfo">
- <div id="marketplace">
- <h3>New From Amazon Marketplace</h3>
- <div class="reverse" style="float: left; width:
80%;"><b>Seller Information</b></div>
- <div class="reverse" style="float: left; width: 20%;"><b>|
Price</b></div>
- <xsl:for-each select="ThirdPartyProductDetails">
- <br clear="all" />
- <hr />
- <div style="float: left; width: 80%;">
- <b>Seller: </b><a
href="http://www.amazon.com/exec/obidos/redirect?tag=
{$associate-id}&path=http://s1.amazon.com/exec/
varzea/ts/user-glance/{./SellerId}" target="{$target}">
<xsl:value-of select="./SellerNickname"/></a><br />
- <b>Seller Rating: </b>
- <xsl:call-template name="Stars">
- <xsl:with-param name="average"
select="./SellerRating"/></xsl:call-template>
- <br />
- <b>Availablity: </b><xsl:value-of
select="./ExchangeAvailability"/> -
<xsl:value-of select="./ShipComments"/> - Ships from
<xsl:value-of select="./SellerState"/>,
<xsl:value-of select="./SellerCountry"/>
- <br />
- <b>Comments: </b><xsl:value-of select="./ConditionType"
disable-output-escaping="yes" /><br />
- </div>
- <div style="float: left; width: 20%; text-align: center;">
- <b style="color: red;"><xsl:value-of
select="./OfferingPrice"/></b><br />
- <form method="POST" target="{$target}"
action="{concat('http://www.amazon.com/o/dt
/assoc/handle-buy-box=',/ProductInfo/Details/Asin)}">
- <input type="hidden"
name="{concat('exchange.',./ExchangeId,'.',/
ProductInfo/Details/Asin,'.',./SellerId)}" value="1"/>
- <input type="hidden" name="tag_value"
value="{$associate-id}"/>
- <input type="hidden" name="tag-value"
value="{$associate-id}"/>
- <input type="hidden" name="dev-tag-value"
value="{$DEVELOPER-TAG}"/>
- <input type="submit" name="submit.add-to-cart" value="Buy
Now"
title="Buy From Amazon.com" class="buybutton" />
- </form>
- <br clear="all" />
- </div>
- </xsl:for-each>
- <br clear="all" />
- <hr />
- </div>
- </xsl:template>
- <xsl:template match="Authors | Artists | Starring |
Directors">
- <xsl:choose>
- <xsl:when test="name() = 'Authors'"><b>By: </b>
- <xsl:for-each select="Author">
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="search" select="'AuthorSearch'"/>
- <xsl:with-param name="mode" select="'books'"/>
- </xsl:call-template>
- </xsl:for-each></xsl:when>
- <xsl:when test="name() = 'Artists'"><b>Artist: </b>
- <xsl:for-each select="Artist">
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="search" select="'ArtistSearch'"/>
- <xsl:with-param name="mode" select="'music'"/>
- </xsl:call-template>
- </xsl:for-each></xsl:when>
- <xsl:when test="name() = 'Starring'"><b>Starring: </b>
- <xsl:for-each select="Actor">
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="search" select="'ActorSearch'"/>
- <xsl:with-param name="mode" select="'video'"/>
- </xsl:call-template>
- </xsl:for-each></xsl:when>
- <xsl:when test="name() = 'Directors'"><b>Director: </b>
- <xsl:for-each select="Director">
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="search" select="'DirectorSearch'"/>
- <xsl:with-param name="mode" select="'video'"/>
- </xsl:call-template>
- </xsl:for-each></xsl:when>
- </xsl:choose><br />
- </xsl:template>
- <xsl:template match="Manufacturer">
- <xsl:choose>
- <xsl:when test="../Catalog = 'Music'"><b>Label: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'music'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Electronics'"><b>Manufacturer:
</b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'electronics'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Book'"><b>Publisher: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'books'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Magazine'"><b>Publisher: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'magazine'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="(../Catalog= 'DVD') or (../Catalog =
'Video')"><b>Studio: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'video'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Software'"><b>By: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'software'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Personal
Computer'"><b>Manufacturer: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'pc-hardware'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Home
Improvement'"><b>Manufacturer: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'tools'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Toy'"><b>Manufacturer: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'toys'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Video Games'"><b>By: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'videogames'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Baby
Product'"><b>Manufacturer: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'baby'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog= 'Kitchen'"><b>Manufacturer: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'kitchen'"/>
- </xsl:call-template></xsl:when>
- <xsl:when test="../Catalog = 'Lawn &
Patio'"><b>Manufacturer: </b>
- <xsl:call-template name="aws-search">
- <xsl:with-param name="searchstring" select="."/>
- <xsl:with-param name="mode" select="'garden'"/>
- </xsl:call-template></xsl:when>
- <xsl:otherwise><b>By: </b><xsl:value-of
select="."/></xsl:otherwise>
- </xsl:choose><br />
- </xsl:template>
- <xsl:template name="aws-search">
- <xsl:param name="searchstring"/>
- <xsl:param name="search" select="'ManufacturerSearch'"/>
- <xsl:param name="mode"/>
- <a
href="{$AWSversion}t={$associate-id}&dev-t={$DEVELOPER-TAG}
&{$search}={$searchstring}&page=1
&mode={$mode}&type={$TYPE}
&offer={$OFFER}&locale={$LOCALE}
&sort=+salesrank&f={$TEMPLATE-URL}">
- <xsl:value-of select="($searchstring)"/></a>
- <xsl:if test="position() != last() and not(position() =
last()-1)">, </xsl:if>
- <xsl:if test="position() = last()-1"> and </xsl:if>
- </xsl:template>
- <xsl:template match="ProductDescription">
- <div id="ProductDescription">
- <h3>Amazon Product Review</h3>
- <div class="leftright">
- <xsl:value-of select="." disable-output-escaping="yes" />
- </div></div>
- </xsl:template>
- <xsl:template match="AvgCustomerRating">
- <xsl:if test=". > 0">
- <div id="reviews">
- <h3>Customer Reviews</h3>
- <b>Average customer rating: </b>
- <xsl:call-template name="Stars">
- <xsl:with-param name="average" select="."/>
- </xsl:call-template><br />
- <xsl:apply-templates select="../TotalCustomerReviews"/>
- <xsl:apply-templates select="../CustomerReview">
- <xsl:sort select="Rating" order="descending"/>
- </xsl:apply-templates>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template match="TotalCustomerReviews">
- <xsl:if test=". > 0">
- <b>Total Customer Reviews: </b>
- <xsl:value-of select="." />
- <br /><br />
- </xsl:if>
- </xsl:template>
- <xsl:template match="CustomerReview">
- <div class="leftright">
- <b><xsl:value-of select="Date"/><xsl:text
disable-output-escaping="yes"> </xsl:text></b>
- <xsl:call-template name="Stars">
- <xsl:with-param name="average" select="Rating"/>
- </xsl:call-template>
- <b><xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:value-of select="Summary"/></b><br />
- </div>
- <div class="leftright">
- <xsl:value-of select="Comment" disable-output-escaping="yes"
/>
- <br /><br />
- </div>
- </xsl:template>
- <xsl:template name="Stars">
- <xsl:param name="average" select="5"/>
- <xsl:variable name="thisurl"
select="'http://g-images.amazon.com/
images/G/01/detail/stars-'"/>
- <xsl:choose>
- <xsl:when test="$average > 4.75"><img src=
"{$thisurl}5-0.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 4.25"><img src=
"{$thisurl}4-5.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 3.75"><img src=
"{$thisurl}4-0.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 3.25"><img src=
"{$thisurl}3-5.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 2.75"><img src=
"{$thisurl}3-0.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 2.25"><img src=
"{$thisurl}2-5.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 1.75"><img src=
"{$thisurl}2-0.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > 1.25"><img src=
"{$thisurl}1-5.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > .75"><img src=
"{$thisurl}1-0.gif" title="{$average}"/></xsl:when>
- <xsl:when test="$average > .25"><img src=
"{$thisurl}0-5.gif" title="{$average}"/></xsl:when>
- <xsl:otherwise><img src="{$image-url}stars-0-5.gif"
title="{$average}"/>
</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
|