Latest web development tutorials

XSLT <xsl: copy> Element

Instrukcja XSLT Elementy referencyjny Kompletna instrukcja XSLT element odniesienia

Definicja i Wykorzystanie

<Xsl: copy> Element tworzy kopię bieżącego węzła.

Uwaga: Przestrzeń nazw bieżący węzeł są automatycznie kopiowane, ale obecne węzły potomne i przypisywać węzły nie zostaną automatycznie skopiowane!


gramatyka

<xsl:copy use-attribute-sets="name-list">

<!-- Content:template -->

</xsl:copy>

nieruchomość

属性 描述
use-attribute-sets name-list 可选。如果该节点是元素,则该属性是应用到输出节点的属性集列表,由空格分隔。

Przykład 1

Kopiowanie węzeł wiadomość do dokumentu wyjściowego:

<?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>


Instrukcja XSLT Elementy referencyjny Kompletna instrukcja XSLT element odniesienia