XSLT <xsl:kopie>
❮Volledige XSLT-elementreferentie
Definitie en gebruik
Het element <xsl:copy> maakt een kopie van het huidige knooppunt.
Opmerking: Naamruimteknooppunten van het huidige knooppunt worden ook automatisch gekopieerd, maar onderliggende knooppunten en attributen van het huidige knooppunt worden niet automatisch gekopieerd!
Syntaxis
<xsl:copy use-attribute-sets="name-list">
<!-- Content:template -->
</xsl:copy>
attributen
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 het berichtknooppunt naar het uitvoerdocument:
<?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>
❮Volledige XSLT-elementreferentie