xsl:copy-of Element

Inserts subtrees and result-tree fragments into the result tree.

<xsl:copy-of
  select = expression />

Attributes

  • select
    [required] XPath expression identifying nodes to be copied. The subtree below each of these nodes is copied to the result tree in its entirety.

Element Information

Number of occurrences Unlimited
Parent elements xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements
Child elements (No child elements)

Remarks

When the result of evaluating the expression is a result-tree fragment, the complete fragment is copied into the result tree. When the result is a node-set, all the nodes in the set are copied in document order into the result tree; copying an element node copies the attribute nodes, name space nodes, and children of the element node as well as the element node itself. A root node is copied by copying its children. When the result is neither a node-set nor a result-tree fragment, the result is converted to a string and then inserted into the result tree, as with <xsl:value-of>.

See Also

XSLT Elements | xsl:value-of Element

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.