<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" />