XSLT <xsl:copy> 요소

정의와 사용법

<xsl:copy> 요소는 현재 점의 복사본(복사)을 생성할 수 있습니다.

주의사항:현재 점의 Namespace 점은 자동으로 복사됩니다만, 현재 점의 자식 점과 속성은 자동으로 복사되지 않습니다!

문법

<xsl:copy use-attribute-sets="name-list">
  <!-- Content:template -->
</xsl:copy>

속성

속성 설명
use-attribute-sets name-list 선택 사항입니다. 이 점이 요소이면, 이 속성은 출력 점에 적용되는 속성 집합 목록으로, 공백으로 구분됩니다.

예제

예제 1

message 점을 출력 문서에 복사합니다:

<?xml version="1.0" encoding="ISO-8859-1"?>
<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>