Next / Previous / Contents / Shipman's homepage

14. Extension elements

You may need functions that are not part of standard XSLT. A number of organizations have defined so-called extension elements that provide these additional functions.

To use an extension, you must add two attributes to the xslt:stylesheet element of your stylesheet:

  1. Declare a namespace for the extension elements by adding an attribute of the form xmlns:n="u", where n is the namespace you are declaring, and u is the URI of the extension element's definition.

  2. Tell XSLT to process this namespace, instead of writing it to the output, by using an attribute of the form extension-element-prefixes="n", where n is the same namespace name used in the previous step.

We'll just give one example; more extensions will arise as XSLT evolves.