select="<font color="blue">concat(substring-before($image, '.jpg'), 'PC_.jpg')</font>" /></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="<font color="blue">$height div 2"</font> /></xsl:attribute>
<xsl:attribute name="width" ><xsl:value-of select="<font color="blue">$width div 2</font>" /></xsl:attribute>
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="https://www.w3.org/1999/XSL/Transform" xmlns:aws="https://webservices.amazon.com/AWSECommerceService/2006-03-08" exclude-result-prefixes="aws" version="1.0">
<xsl:output method="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<xsl:template match="/">
<xsl:apply-templates select="aws:ItemLookupResponse/aws:Items/aws:Item" />
</xsl:template>
<xsl:template match="aws:Item">
<xsl:variable name="detail" select="aws:DetailPageURL" />
<xsl:variable name="image" select="aws:LargeImage/aws:URL" />
<xsl:variable name="width" select="aws:LargeImage/aws:Width" />
<xsl:variable name="height" select="aws:LargeImage/aws:Height" />
<xsl:variable name="title" select="aws:ItemAttributes/aws:Title" />
<html lang="ja">
<head>
</head>
<body>
<a>
<xsl:attribute name="href" ><xsl:value-of select="$detail" /></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<img>
<xsl:attribute name="src" >
<xsl:value-of
select="<font color="blue">concat(substring-before($image, '.jpg'), 'PC_.jpg')</font>" /></xsl:attribute>
<xsl:attribute
name="height"><xsl:value-of select="<font color="blue">$height div 2"</font> /></xsl:attribute>
<xsl:attribute
name="width" ><xsl:value-of select="<font color="blue">$width div 2</font>" /></xsl:attribute>
<xsl:attribute name="alt" ><xsl:value-of select="$title" /></xsl:attribute>
<xsl:attribute name="title" ><xsl:value-of select="$title" /></xsl:attribute>
<xsl:attribute name="border">0</xsl:attribute>
</img>
</a>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
select="<font color="blue">concat(substring-before($image, '.jpg'), 'PC_.jpg')</font>" /></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="<font color="blue">$height div 2"</font> /></xsl:attribute>
<xsl:attribute name="width" ><xsl:value-of select="<font color="blue">$width div 2</font>" /></xsl:attribute>
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="https://www.w3.org/1999/XSL/Transform" xmlns:aws="https://webservices.amazon.com/AWSECommerceService/2006-03-08" exclude-result-prefixes="aws" version="1.0">
<xsl:output method="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<xsl:template match="/">
<xsl:apply-templates select="aws:ItemLookupResponse/aws:Items/aws:Item" />
</xsl:template>
<xsl:template match="aws:Item">
<xsl:variable name="detail" select="aws:DetailPageURL" />
<xsl:variable name="image" select="aws:LargeImage/aws:URL" />
<xsl:variable name="width" select="aws:LargeImage/aws:Width" />
<xsl:variable name="height" select="aws:LargeImage/aws:Height" />
<xsl:variable name="title" select="aws:ItemAttributes/aws:Title" />
<html lang="ja">
<head>
</head>
<body>
<a>
<xsl:attribute name="href" ><xsl:value-of select="$detail" /></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<img>
<xsl:attribute name="src" >
<xsl:value-of
select="<font color="blue">concat(substring-before($image, '.jpg'), 'PC_.jpg')</font>" /></xsl:attribute>
<xsl:attribute
name="height"><xsl:value-of select="<font color="blue">$height div 2"</font> /></xsl:attribute>
<xsl:attribute
name="width" ><xsl:value-of select="<font color="blue">$width div 2</font>" /></xsl:attribute>
<xsl:attribute name="alt" ><xsl:value-of select="$title" /></xsl:attribute>
<xsl:attribute name="title" ><xsl:value-of select="$title" /></xsl:attribute>
<xsl:attribute name="border">0</xsl:attribute>
</img>
</a>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
function AmazonLink(e) {
if (!canFormat) return;
var associate_id = '<font color="blue">twinklexxx</font>'; // 自分のアソシエイト ID に変更
var xslt = '<font color="blue">https://aws.twinkle.cc/amazon.xsl</font>'; // 自分の XSLT のアドレスに変更
var access_key = '<font color="blue">152ZP71KPB47XM09CS02</font>'; // 自分の Web サービス Access Key ID に変更
var str = getSelected(e);
var asin = prompt('Enter Amazon ASIN','');
var country = prompt('Enter Country (us or jp)', 'us');
if (asin != null && country != null) {
if (str == '') {
if(country == 'jp') {
code = '-22';
} else if(country == 'us') {
code = '-20';
}
setSelection(e, '<iframe src="https://xml-' + country + '.amznxslt.com/onca/xml?Service=AWSECommerceService&ItemId=' + asin + '&AssociateTag=' + associate_id + code + '&AWSAccessKeyId=' + access_key + '&Operation=ItemLookup&IdType=ASIN&ContentType=text%2Fhtml&Version=2006-03-08&Page=1&ResponseGroup=ItemAttributes,Images,Offers&Style=' + xslt + '" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" height="175"></iframe>\n');
} else {
setSelection(e, '<iframe src="https://xml-' + country + '.amznxslt.com/onca/xml?Service=AWSECommerceService&ItemId=' + asin + '&AssociateTag=' + associate_id + code + '&AWSAccessKeyId=' + access_key + '&Operation=ItemLookup&IdType=ASIN&ContentType=text%2Fhtml&Version=2006-03-08&Page=1&ResponseGroup=ItemAttributes,Images,Offers&Style=' + xslt + '" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" height="175"></iframe>\n');
}
}
return false;
}
write('<img title="<MT_TRANS phrase="Quote">" onclick="return formatStr(document.entry_form.text, \'blockquote\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/quote.gif" alt="<MT_TRANS phrase="Quote">" width="26" height="19" />');
<strong>write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');</strong>
write('<img title="<MT_TRANS phrase="Quote">" onclick="return formatStr(document.entry_form.text_more, \'blockquote\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/quote.gif" alt="<MT_TRANS phrase="Quote">" width="26" height="19" />');
write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text_more)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');
write('<a title="<MT_TRANS phrase="Quote">" href="#" onclick="return formatStr(document.entry_form.text, \'blockquote\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-quote.gif" alt="<MT_TRANS phrase="Quote">" width="22" height="16" /></a>');
<strong> write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');</strong>
write('<a title="<MT_TRANS phrase="Quote">" href="#" onclick="return formatStr(document.entry_form.text_more, \'blockquote\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-quote.gif" alt="<MT_TRANS phrase="Quote">" width="22" height="16" /></a>');
<strong>write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text_more)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');</strong>
function AmazonLink(e) {
if (!canFormat) return;
var associate_id = '<font color="blue">twinklexxx</font>'; // 自分のアソシエイト ID に変更
var xslt = '<font color="blue">https://aws.twinkle.cc/amazon.xsl</font>'; // 自分の XSLT のアドレスに変更
var access_key = '<font color="blue">152ZP71KPB47XM09CS02</font>'; // 自分の Web サービス Access Key ID に変更
var str = getSelected(e);
var asin = prompt('Enter Amazon ASIN','');
var country = prompt('Enter Country (us or jp)', 'us');
if (asin != null && country != null) {
if (str == '') {
if(country == 'jp') {
code = '-22';
} else if(country == 'us') {
code = '-20';
}
setSelection(e, '<iframe src="https://xml-' + country + '.amznxslt.com/onca/xml?Service=AWSECommerceService&ItemId=' + asin + '&AssociateTag=' + associate_id + code + '&AWSAccessKeyId=' + access_key + '&Operation=ItemLookup&IdType=ASIN&ContentType=text%2Fhtml&Version=2006-03-08&Page=1&ResponseGroup=ItemAttributes,Images,Offers&Style=' + xslt + '" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" height="175"></iframe>\n');
} else {
setSelection(e, '<iframe src="https://xml-' + country + '.amznxslt.com/onca/xml?Service=AWSECommerceService&ItemId=' + asin + '&AssociateTag=' + associate_id + code + '&AWSAccessKeyId=' + access_key + '&Operation=ItemLookup&IdType=ASIN&ContentType=text%2Fhtml&Version=2006-03-08&Page=1&ResponseGroup=ItemAttributes,Images,Offers&Style=' + xslt + '" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" height="175"></iframe>\n');
}
}
return false;
}
write('<img title="<MT_TRANS phrase="Quote">" onclick="return formatStr(document.entry_form.text, \'blockquote\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/quote.gif" alt="<MT_TRANS phrase="Quote">" width="26" height="19" />');
<strong>write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');</strong>
write('<img title="<MT_TRANS phrase="Quote">" onclick="return formatStr(document.entry_form.text_more, \'blockquote\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/quote.gif" alt="<MT_TRANS phrase="Quote">" width="26" height="19" />');
write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text_more)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');
write('<a title="<MT_TRANS phrase="Quote">" href="#" onclick="return formatStr(document.entry_form.text, \'blockquote\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-quote.gif" alt="<MT_TRANS phrase="Quote">" width="22" height="16" /></a>');
<strong> write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');</strong>
write('<a title="<MT_TRANS phrase="Quote">" href="#" onclick="return formatStr(document.entry_form.text_more, \'blockquote\')"><img src="<TMPL_VAR NAME=STATIC_URI>images/html-quote.gif" alt="<MT_TRANS phrase="Quote">" width="22" height="16" /></a>');
<strong>write('<a title="<MT_TRANS phrase="AmazonLink">" href="#" onclick="return AmazonLink(document.entry_form.text_more)"><img src="<TMPL_VAR NAME=STATIC_URI>images/amazon.gif" alt="<MT_TRANS phrase="AmazonLink">" width="26" height="19" /></a>');</strong>