Latest web development tutorials

XSLT <xsl: namespace-alias> element

XSLT Elements Reference Manual Complete XSLT Element Reference Manual

Definition and Usage

<Xsl: namespace-alias> element is used to replace the style sheet namespace output in a different namespace.

Note: <xsl: namespace-alias> element is the top (top-level element), and must be <xsl: stylesheet> or <xsl: transform> child node.


grammar

<xsl:namespace-alias
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>

Attributes

属性 描述
stylesheet-prefix prefix
#default
必需。规定您希望更改的命名空间。
result-prefix prefix
#default
必需。为输出规定期望的命名空间。

Example 1

Wxsl prefix in the output is converted to the prefix xsl:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wxsl="http://www.w3cschool.cc/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 Elements Reference Manual Complete XSLT Element Reference Manual