XSLT <xsl:네임스페이스 별칭>
❮ 완전한 XSLT 요소 참조
정의 및 사용
<xsl:namespace-alias> 요소는 스타일 시트의 네임스페이스를 출력의 다른 네임스페이스로 교체하는 데 사용됩니다.
참고: <xsl:namespace-alias>는 최상위 요소이며 <xsl:stylesheet> 또는 <xsl:transform>의 자식 노드여야 합니다.
통사론
<xsl:namespace-alias
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
속성
Attribute | Value | Description |
---|---|---|
stylesheet-prefix | prefix #default |
Required. Specifies the namespace you wish to change |
result-prefix | prefix #default |
Required. Specifies the desired namespace for the output |
실시예 1
wxsl 접두사는 출력에서 xsl 접두사로 변환됩니다.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wxsl="https://www.w3schools.com/w3style.xsl">
<xsl:namespace-alias stylesheet-prefix="wxsl" result-prefix="xsl"/>
<xsl:template match="/">
<wxsl:stylesheet>
<xsl:apply-templates/>
</wxsl:stylesheet>
</xsl:template>
</xsl:stylesheet>
❮ 완전한 XSLT 요소 참조