XSLT <xsl:copy>要素
完全なXSLT要素リファレンス
定義と使い方
<xsl:copy> 要素は、現在のノードのコピーを作成します。
注意:現在のノードのNamespaceノードは自動的にコピーされますが、現在のノードの子ノードと属性は自動的にコピーされません!
構文
<xsl:copy use-attribute-sets="name-list">
<!-- Content:template -->
</xsl:copy>
<!-- Content:template -->
</xsl:copy>
属性
| 属性 | 值 | 説明 |
|---|---|---|
| use-attribute-sets | name-list | 任意。そのノードが要素の場合、この属性は出力ノードに適用される属性セットのリストで、スペースで区切られます。 |
例 1
message ノードを出力ドキュメントにコピーします:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="message">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="message">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
完全なXSLT要素リファレンス その他の拡張