[XSLT] 属性名と属性値の列挙
次の例では、カレント要素の属性をすべて列挙し、テーブルに加工する例です。
<table>
<tr>
<th>項目</th><th>値</th>
</tr>
<xsl:for-each select="@*">
<tr>
<td><xsl:value-of select="name(.)"/></td>
<td><xsl:value-of select="."/></td>
</tr>
</xsl:for-each>
</table>
0 件のコメント