- <?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" />
-
- <xsl:template match="/">
- <html>
- <head></head>
- <body style="margin 0;padding: 0;">
- <table cellspacing="0" cellpadding="0" style="width: 468px;height: 80px;font-size: 9pt;border: 1px solid #cccccc;">
- <tr>
- <xsl:apply-templates select="ProductInfo/Details"/>
- </tr>
- <tr style="height: 8px;">
- <td style="background-color: #cccccc; text-align: right;" colspan="6">
- <span style="text-decoration: underline;">by Amazon</span>
- </td>
- </tr>
- </table>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match="Details">
-
- <xsl:variable name="i" select="3" />
- <xsl:if test="position() <= $i">
-
- <xsl:variable name="asin" select="Asin" />
- <xsl:variable name="name" select="ProductName" />
- <xsl:variable name="img" select="ImageUrlSmall" />
- <xsl:variable name="baseurl">http://www.amazon.co.jp/exec/obidos/ASIN/</xsl:variable>
-
- <td>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat($baseurl, $asin, '/ref=nosim/[アソシエイトID]/')" />
- </xsl:attribute>
- <xsl:attribute name="target">
- _blank
- </xsl:attribute>
- <img>
- <xsl:attribute name="src">
- <xsl:value-of select="$img"/>
- </xsl:attribute>
- <xsl:attribute name="border">
- 0
- </xsl:attribute>
- <xsl:attribute name="width">
- 50
- </xsl:attribute>
- <xsl:attribute name="height">
- 60
- </xsl:attribute>
- </img>
- </a>
- </td>
- <td>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="concat($baseurl, $asin, '/ref=nosim/[アソシエイトID]/')" />
- </xsl:attribute>
- <xsl:attribute name="target">
- _blank
- </xsl:attribute>
- <xsl:value-of select="$name"/>
- </a>
- </td>
-
- </xsl:if>
-
- </xsl:template>
-
- </xsl:stylesheet>