XSLT <xsl:kopie>
❮ Voltooi XSLT-elementverwysing
Definisie en gebruik
Die <xsl:copy>-element skep 'n kopie van die huidige nodus.
Let wel: Naamruimte nodusse van die huidige nodus word ook outomaties gekopieer, maar kind nodusse en kenmerke van die huidige nodus word nie outomaties gekopieer nie!
Sintaksis
<xsl:copy use-attribute-sets="name-list">
<!-- Content:template -->
</xsl:copy>
Eienskappe
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 |
Voorbeeld 1
Kopieer die boodskapnodus na die uitvoerdokument:
<?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>
❮ Voltooi XSLT-elementverwysing