XSLT <xsl:복사>
❮ 완전한 XSLT 요소 참조
정의 및 사용
<xsl:copy> 요소는 현재 노드의 복사본을 만듭니다.
참고: 현재 노드의 네임스페이스 노드도 자동으로 복사되지만 현재 노드의 자식 노드와 속성은 자동으로 복사되지 않습니다!
통사론
<xsl:copy use-attribute-sets="name-list">
<!-- Content:template -->
</xsl:copy>
속성
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 |
실시예 1
메시지 노드를 출력 문서에 복사합니다.
<?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>
❮ 완전한 XSLT 요소 참조