当前位置: 首页 > 图文教程 > XML家族 > XSLT > XSLT函数

XSLT
XSLT的元素语法(1)
XSLT的元素语法(2)
用XSLT和XML改进Struts
XSLT函数
将XSLT查找表打包成EXSLT函数
xsl入门的好文章
使用 XML: 将 XSLT 用于内容管理
XSL中的条件模板
使用 xsl 对 xml 文档进行动态排序分页显示
XSL 的控制语句
使用 XML: 将 XSLT 用于内容管理[推荐]
利用我的XSLT类实现分页范例
xslt的
XSLT转换XML的前后台实现方法
从 XSLT 样式表调用 JavaScript
xslt 应用
XSLT学习笔记
浅谈 XSLT 扩展-让你的 XSLT 如虎添翼
XSLT的优缺点
Jsp结合XML+XSLT将输出为Html格式

XSLT函数


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

XSLT Functions
XSLT函数

 

 

XSLT includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more.
XSLT包含了超过100个内置函数。有些是为了字符串值,数字值,数据和时间比较关系,节点和OName操作,序列操作,布尔(逻辑)值,以及更多。

 

The URI of the XSLT function namespace is:http://www.w3.org/2005/02/xpath-functions
XSLT函数命名空间的URI是http://www.w3.org/2005/02/xpath-functions

 

The default prefix for the function namespace is fn:.
函数命名空间的默认前缀是“fn”:

 

Tip: Functions are often called with the fn: prefix, such as fn:string(). However, since fn: is the default prefix of the namespace, the function names do not need to be prefixed when called.
提示: 函数经常用“fn”命名:前缀,就像“fn:string()”;当然,自“fn:”后,是命名空间(namespace)的默认前缀,但当被访问时,函数名称不需要前缀。

 

The reference of all the built-in XSLT 2.0 functions is located in our XPath tutorial.
在XSLT2.0 函数中所有内置的参数都在我们XPath教程里面。

 

In addition, there are the following built-in XSLT functions:
另外,还有下面的内置XSLT函数:

 

Name
名称
Description
描述
current() Returns the current node
返回当前节点
document() Used to access the nodes in an external XML document
用来访问一个外部的XML文档内的节点
element-available() Tests whether the element specified is supported by the XSLT processor
测试指定的元素是否被XSLT处理器支持
format-number() Converts a number into a string
将数字转化为字符串
function-available() Tests whether the function specified is supported by the XSLT processor
测试指定的函数是否被XSLT处理器支持
generate-id() Returns a string value that uniquely identifies a specified node
返回一个独立地定义一个指定节点的字符串值
key() Returns a node-set using the index specified by an <xsl:key> element
使用由<xsl:key>元素指定的索引来返回一个节点设置(node-set)
system-property() Returns the value of the system properties
返回系统属性值
unparsed-entity-uri() Returns the URI of an unparsed entity
返回一个未被解析的URI实体