<?xml version="1.0" encoding="euc-jp" standalone="yes" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<xsl:template match="/">
		<html>
			<head>
			<meta http-equiv="Content-Type" content="text/html; charset=euc-jp" />
			<title>XSLT xsl:element、xsl:attributeエレメント</title>
			<meta name="keywords" content="XML,XSLT,スタイルシート,for-each" />
			</head>
		
			<body>
			<div class="xmlLineBox">
			<xsl:for-each select="affiliate/shop">
				<h4>
				<xsl:element name="a">
					<xsl:attribute name="href"><xsl:value-of select="url" /></xsl:attribute>
					<xsl:attribute name="target">_blank</xsl:attribute>
					<xsl:value-of select="name" />
				</xsl:element>
				
				<xsl:element name="img">
					<xsl:attribute name="border">0</xsl:attribute>
					<xsl:attribute name="width">1</xsl:attribute>
					<xsl:attribute name="height">1</xsl:attribute>
					<xsl:attribute name="src"><xsl:value-of select="img" /></xsl:attribute>
				</xsl:element>
				</h4>
				<p><xsl:value-of select="comment" /></p>
			</xsl:for-each>
			</div>
			</body>
		</html>
	</xsl:template>

</xsl:stylesheet>
