XSLT <xsl: namespace-alias> elemento
Definizione e utilizzo
<Xsl: namespace-alias> elemento viene utilizzato per sostituire l'uscita namespace foglio di stile in uno spazio diverso.
Nota: <xsl: namespace-alias> elemento è la parte superiore (elemento di livello), e devono essere <xsl: stylesheet> o <xsl: trasformare> nodo figlio.
grammatica
<xsl:namespace-alias
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
proprietà
属性 | 值 | 描述 |
---|---|---|
stylesheet-prefix | prefix #default |
必需。规定您希望更改的命名空间。 |
result-prefix | prefix #default |
必需。为输出规定期望的命名空间。 |
esempio 1
prefisso Wxsl in uscita viene convertito nel xsl prefisso:
<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>
Manuale Completo XSLT elemento di riferimento