次の方法で共有


<xsl:attribute> の例 3

<xsl:attribute name="{name()}"/> を使用する例を次に示します。

XML ファイル (attribute.xml)

XSLT ファイル (attribute.xsl)

出力

書式付き出力はありません。 これはプロセッサ出力です。

<?xml version="1.0"?>

<myElement bar="bar1" />

<myElement bar="bar2" />

...

<myElement bar="bar5" />