XSLT <xsl: namespace-alias> Element
Definicja i Wykorzystanie
<Xsl: namespace-alias> element jest stosowany w celu zastąpienia wyjście namespace arkusza stylów w innej przestrzeni nazw.
Uwaga: <xsl: namespace-alias> elementem jest górna (element najwyższego poziomu) i musi być <xsl: stylesheet> lub <xsl: transform> węzeł podrzędny.
gramatyka
<xsl:namespace-alias
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
nieruchomość
属性 | 值 | 描述 |
---|---|---|
stylesheet-prefix | prefix #default |
必需。规定您希望更改的命名空间。 |
result-prefix | prefix #default |
必需。为输出规定期望的命名空间。 |
Przykład 1
Wxsl prefiks wyjście przeprowadza się w xsl tytułach
<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>
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>
Kompletna instrukcja XSLT element odniesienia