다음을 통해 공유


<xsl:attribute>의 예제 1

이 예제에서는 <myElement> 요소를 복사하고 "true" 값의 copied 특성을 추가합니다.

XML 파일(myelem.xml)

XSLT 파일(attrcopied.xsl)

출력

다음은 형식이 지정된 출력입니다.

My DataMy Other Data

다음은 쉽게 구별할 수 있도록 줄 바꿈을 추가한 프로세서 출력입니다.

<?xml version="1.0"?>

<myElement copied="true">My Data</myElement>

<myElement copied="true">My Other Data</myElement>