9.2. The <xsl:copy> Instruction Element

The <xsl:copy> element creates a copy of the current node's markup. If the current node is an element, the element's tags, including the element-type name and its associated namespace, are copied. However, <xsl:copy> does not copy the attribute or children nodes of the element. The optional attribute, use-attribute-sets, can be used to include a set of attributes that was defined using the <xsl:attribute-set> element (see Section 6.6.1 for more information on the <xsl:attribute-set> element).The <xsl:copy> element is an instruction element that contains a template, as shown in the following element model definition:

<!-- Category: instruction -->

<xsl:copy

  use-attribute-sets = qnames>

  <!-- Content: template ...

Get XSLT and XPATH: A Guide to XML Transformations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.