EXSLT

EXSLT 是 XSLT 的一组扩展。有多个模块;下面列出了 Firefox 支持的那些:

¥EXSLT is a set of extensions to XSLT. There are a number of modules; those that are supported by Firefox are listed below:

Common (exsl)

The EXSLT Common package provides basic functions that expand upon the capabilities of XSLT. The namespace for the Common package is http://exslt.org/common.

Math (math)

The EXSLT Math package provides functions for working with numeric values and comparing nodes. The namespace for the Math package is http://exslt.org/math.

Regular expressions (regexp)

The EXSLT Regular Expressions package provides functions that allow testing, matching, and replacing text using JavaScript style regular expressions. The namespace for the Regular Expressions package is http://exslt.org/regular-expressions.

Sets (set)

The EXSLT Sets package offers functions that let you perform set manipulation. The namespace for these functions is http://exslt.org/sets.

Strings (str)

The EXSLT Strings package provides functions that allow the manipulation of strings. The namespace for the Strings package is http://exslt.org/strings.

EXSLT 模块

¥EXSLT modules

要使用 EXSLT 函数,你需要声明该函数所在的命名空间,然后在调用该函数时使用适当的前缀。例如,要使用正则表达式包:

¥To use an EXSLT function, you need to declare the namespace the function is in, and then use the appropriate prefix when calling the function. For example, to use the regular expressions package:

xml
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:regexp="http://exslt.org/regular-expressions">
  <xsl:template match="/"><xsl:value-of select="regexp:replace(/root/@value, 'before', 'gi', 'AFTER')"/></xsl:template>

</xsl:stylesheet>

常见的

¥Common

EXSLT Common 包提供了扩展 XSLT 功能的基本功能。Common 包的命名空间是 http://exslt.org/common

¥The EXSLT Common package provides basic functions that expand upon the capabilities of XSLT. The namespace for the Common package is http://exslt.org/common.

函数

¥Functions

数学

¥Math

EXSLT Math 包提供了处理数值和比较节点的函数。Math 包的命名空间是 http://exslt.org/math

¥The EXSLT Math package provides functions for working with numeric values and comparing nodes. The namespace for the Math package is http://exslt.org/math.

函数

¥Functions

正则表达式

¥Regular expressions

EXSLT 正则表达式包提供了允许使用 JavaScript 样式正则表达式测试、匹配和替换文本的功能。

¥The EXSLT Regular Expressions package provides functions that allow testing, matching, and replacing text using JavaScript style regular expressions.

EXSLT 正则表达式命名空间是 http://exslt.org/regular-expressions

¥The EXSLT Regular Expressions namespace is http://exslt.org/regular-expressions.

函数

¥Functions

¥Sets

EXSLT Sets 包提供了可让你执行集合操作的函数。这些函数的命名空间是 http://exslt.org/sets

¥The EXSLT Sets package offers functions that let you perform set manipulation. The namespace for these functions is http://exslt.org/sets.

函数

¥Functions

字符串

¥Strings

EXSLT Strings 包提供了允许操作字符串的函数。Strings 包的命名空间是 http://exslt.org/strings

¥The EXSLT Strings package provides functions that allow the manipulation of strings. The namespace for the Strings package is http://exslt.org/strings.

函数

¥Functions

也可以看看

¥See also