当前位置: 首页 > 网络学院 > XML相关教程 > XSL/XSLT > XSLT <xsl:namespace-alias> 元素

XSL/XSLT
XSL 语言
XSLT 介绍
XSLT 浏览器
XSLT 转换
<xsl:template>
<xsl:value-of>
<xsl:for-each>
<xsl:sort>
<xsl:if>
<xsl:choose>
<xsl:apply-templates>
XSLT - 客户端
XSLT - 服务器端
XSLT - 编辑XML
XSLT 摘要
XSLT 元素参考
XSLT 函数
XSL 编辑器

XSL/XSLT 中的 XSLT <xsl:namespace-alias> 元素


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 230 ::
收藏到网摘: n/a

Definition and Usage
定义和用法

The <xsl:namespace-alias> element is used to replace a namespace in the style sheet to a different namespace in the output.
<xsl:namespace-alias>元素的作用是:用样式表中的命名空间[namespace]替换输出结果中的命名空间。

Note: <xsl:namespace-alias> is a top-level element, and must be a child node of <xsl:stylesheet> or <xsl:transform>.
注意: <xsl:namespace-alias> 是一个最高级元素,并且,它必须是<xsl:stylesheet>或<xsl:transform>的一个子节点。


Syntax
语法

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

Attributes
属性

属性 描述
stylesheet-prefix prefix
#default
Required. Specifies the namespace you wish to change
必要参数。指定你希望改变的命名空间
result-prefix prefix
#default
Required. Specifies the desired namespace for the output
必要参数。指定你希望输出的命名空间

Example 1
案例1

The wxsl prefix is converted to the xsl prefix in the output:
在输出的结果中将前缀名wxsl改为xsl:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wxsl="http://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>

评论 (0) All

登陆 | 还没注册?