XSLT <xsl:salin>
Referensi Elemen XSLT Lengkap
Definisi dan Penggunaan
Elemen <xsl:copy> membuat salinan dari node saat ini.
Catatan: Node namespace dari node saat ini juga secara otomatis disalin, tetapi node anak dan atribut dari node saat ini tidak secara otomatis disalin!
Sintaksis
<xsl:copy use-attribute-sets="name-list">
<!-- Content:template -->
</xsl:copy>
Atribut
Attribute | Value | Description |
---|---|---|
use-attribute-sets | name-list | Optional. A white space separated list of attribute-sets to apply to the output node, if the node is an element |
Contoh 1
Salin simpul pesan ke dokumen keluaran:
<?xml version="1.0" encoding="UTF-8"?>
<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>
Referensi Elemen XSLT Lengkap