O'Reilly logo

XSLT, 2nd Edition by Doug Tidwell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Extension Functions from the EXSLT Library

Earlier we mentioned the EXSLT project, an effort to define a common set of XSLT extension functions. For our next example, we’ll use functions from the EXSLT library. Both Saxon and Xalan have EXSLT support built in, so it’s very easy to use extensions from the EXSLT library.

Note

Although a number of XSLT processors support EXSLT, be aware that EXSLT is implemented inconsistently between processors. Not all processors support all functions, and not all functions have the same signature or results.

EXSLT provides eight categories of functions:

Common

Common functions for data typing and for working with node-sets. These are in the http://exslt.org/common namespace.

Dates and times

Functions for manipulating dates and times. These are in the http://exslt.org/dates-and-times namespace.

Dynamic

Functions to dynamically evaluate XPath expressions. These are in the http://exslt.org/dynamic namespace.

Functions

Extension elements and functions that allow you to define your own functions. These are in the http://exslt.org/functions namespace.

Math

Functions for trigonometry, exponentiation, logarithms, and other miscellaneous mathematical functions. These are in the http://exslt.org/math namespace.

Random

A single function (random-sequence()) that generates a sequence of random values between 0 and 1. It is in the http://exslt.org/random namespace.

Regular expressions

Functions that work with regular expressions. These are in the http://exslt.org/regular-expressions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required