
<xsl:stylesheet    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    xmlns:aws="http://webservices.amazon.com/AWSECommerceService/2009-07-01"   version="1.0">
<xsl:output method="html" encoding="Shift_JIS"/>

<xsl:template match="/">
  <html lang="ja">
  <head>
  <title>XSLサンプル</title>
  </head>
  <body>

  <xsl:apply-templates select="aws:ItemLookupResponse/aws:Items/aws:Item"/>

  </body>
  </html>
</xsl:template>

<xsl:template match="aws:ItemLookupResponse/aws:Items/aws:Item">
  <p>[タイトル]<xsl:value-of select="aws:ItemAttributes/aws:Title" /></p>
  <p>[トータル出品数]<xsl:value-of select="aws:Offers/aws:TotalOffers" /></p>

  <xsl:apply-templates select="aws:Offers/aws:Offer" />
</xsl:template> 

<xsl:template match="aws:Offers/aws:Offer">
  <p>
  [出品者]<xsl:value-of select="aws:Merchant/aws:Name" />,
  [状態]<xsl:value-of select="aws:OfferAttributes/aws:Condition" />,
  [価格]<xsl:value-of select="aws:OfferListing/aws:Price/aws:FormattedPrice" />
  </p>
</xsl:template> 

</xsl:stylesheet>