大网数据广告活动
Web 标准与前端开发

EXSLT

· 52CE 我爱测

EXSLT is a set of extensions to XSLT organized into modules that provide functions for performing transformations on an XML document. 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.

EXSLT is a set of extensions to XSLT organized into modules that provide functions for performing transformations on an XML document. 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.

To use the regular expressions package, for example:

<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>

Reference

The EXSLT reference describes namespaces and functions for common operations, math, regular expressions, set manipulation, and string manipulation.

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.

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

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

Sets

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

Strings

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

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。