スタイルシート変換言語 XSLT

<xsl:attribute>の解説です。  スタイルシート変換言語 XSLTリファレンス 

<xsl:attribute>

<xsl:attribute 
name="name" 
namespace="uri-reference">
・・・
</xsl:attribute>
xsl:attributeは、name属性で指定した名前を持つ属性を、結果ツリーに 追加します。
※ この要素を使用しなくとも、テンプレート内に直接属性を記述すれば出力する事ができます。 しかし、沢山出力させる場合などには、この要素を利用すると非常に便利です。
zipファイル 以下のサンプルをダウンロード(ZIP圧縮)
■ aaa.xml
<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="bbb.xsl"?>

<link>
<name>スタイルシート変換言語 XSLT</name>
<url>http://denkaseihin.com/</url>
</link>
■ bbb.xsl
<?xml version="1.0" encoding="Shift_JIS"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="link">
<html>
<body>

<a>
 <xsl:attribute name="href">
  <xsl:value-of select="url"/>
 </xsl:attribute>
 <xsl:value-of select="name"/>
</a>

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

</xsl:stylesheet>
サンプル
XSLT要素一覧
+ <xsl:apply-imports>
+ <xsl:apply-templates>
+ <xsl:attribute>
+ <xsl:attribute-set>
+ <xsl:call-template>
+ <xsl:comment>
+ <xsl:copy>
+ <xsl:copy-of>
+ <xsl:decimal-format>
+ <xsl:element>
+ <xsl:fallback>
+ <xsl:for-each>
+ <xsl:if>
+ <xsl:import>
+ <xsl:include>
+ <xsl:key>
+ <xsl:message>
+ <xsl:namespace-alias>
+ <xsl:number>
+ <xsl:otherwise>
+ <xsl:output>
+ <xsl:param>
+ <xsl:preserve-space>
+ <xsl:processing-instruction>
+ <xsl:sort>
+ <xsl:strip-space>
+ <xsl:stylesheet>
+ <xsl:template>
+ <xsl:text>
+ <xsl:value-of>
+ <xsl:variable>
+ <xsl:when>
+ <xsl:with-param>