XSLT <xsl:namespace-alias>
❮完全な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要素リファレンス