XSLT <xsl:namespace-alias>
Referensi Elemen XSLT Lengkap
Definisi dan Penggunaan
Elemen <xsl:namespace-alias> digunakan untuk mengganti namespace di style sheet ke namespace yang berbeda di output.
Catatan: <xsl:namespace-alias> adalah elemen tingkat atas, dan harus berupa simpul anak dari <xsl:stylesheet> atau <xsl:transform>.
Sintaksis
<xsl:namespace-alias
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
Atribut
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 |
Contoh 1
Awalan wxsl dikonversi ke awalan xsl di output:
<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>
Referensi Elemen XSLT Lengkap