xsl:copy

  • Copy the current context node only, does not copy any child nodes or attribute nodes (namespace 'nodes' are copied).

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template name="test">
        <xsl:copy>
          ...
        </xsl:copy>
      </xsl:template>
    </xsl:stylesheet>
    					
  • Use the following to copy everything from the input document to the resulting document:

    <xsl:template match="node()|@*">
      <xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>
    </xsl:template>