Skip to main content

Module exslt

Module exslt 

Source
Expand description

EXSLT extension function families — the math, date, str, and set namespaces every real-world XSLT stylesheet (and many bare XPath consumers) reach for.

EXSLT lives inside the XPath crate, not inside XSLT, because these are XPath function libraries — they plug into the XPath function dispatcher and are useful even when no stylesheet is involved (e.g. etree.XPath("math:max(...)")).

Each family exposes a dispatch(name, args, idx) function that returns Some(result) if the function name belongs to the family, or None otherwise — letting the XPath evaluator chain through user bindings → EXSLT families → built-ins.

Spec references:

  • https://exslt.org/math/
  • https://exslt.org/date/
  • https://exslt.org/str/
  • https://exslt.org/set/

Modules§

common
EXSLT common family — http://exslt.org/common
date
EXSLT date family — https://exslt.org/date/
math
EXSLT math family — https://exslt.org/math/
regexp
EXSLT regular-expression family — http://exslt.org/regular-expressions
sets
EXSLT set family — https://exslt.org/set/
str
EXSLT str family — https://exslt.org/str/

Constants§

COMMON_NS
DATE_NS
DYN_NS
MATH_NS
REGEXP_NS
SET_NS
STR_NS
XPATH_MATH_NS
XPath 3.0 math namespace — distinct from EXSLT math. Hosts math:pi(), math:sin(), math:pow(), etc. per XPath 3.0 §4.8. XSLT 3.0 §3.6 pre-binds this prefix.

Functions§

dispatch
Dispatch an XPath function call to the matching EXSLT family. Returns Some(result) when ns_uri matches one of the EXSLT namespace URIs and the family recognises name; otherwise None, so the caller can fall through to its own table or surface “unregistered function.”