This version:
exslt-common-010310.html
Most Recent version:
http://www.jenitennison.com/xslt/exslt/common/
Previous versions:
exslt-common-010302.html
exslt-common-010302.html
exslt-common-010225.html
Author: Jeni Tennison
This document describes the common set of EXSLT 1.0. EXSLT 1.0 is a set of extension elements and functions that XSLT authors may find helpful when creating stylesheets. The common set of EXSLT 1.0 are those extension elements and functions that provide a base level of common functionality that the rest of EXSLT can build on.
Other parts of EXSLT 1.0 include:
This document is a fourth draft for review by the implementers of XSLT processors and the XSLT stylesheet authors. It is based on discussions on XSL-List. Comments on this document should be sent to XSL-List.
This document has no official standing and has not been considered nor approved by any organization.
1. Introduction
2. Namespace
3. Common Functions
A. References
B. Acknowledgements
C. Changes from previous version
This document describes the common set of EXSLT 1.0. EXSLT 1.0 is a set of extension elements and functions that XSLT authors may find helpful when creating stylesheets. The common set of EXSLT 1.0 are those extension elements and functions that provide a base level of common functionality that the rest of EXSLT can build on.
The extension elements and functions defined within this document are governed by the general rules about extensions to XSLT covered in [14. Extensions] in [XSLT 1.0].
XSLT processors are free to support any number of the extension elements and functions described in this document. However, an XSLT processor must not claim to support EXSLT 1.0 - Common unless all the extensions described within this document are implemented by the processor. An implementation of an extension element or function in an EXSLT namespace must conform to the behaviour described in this document.
The namespace for the extension elements and functions described in this document is:
http://xmlns.opentechnology.org/xslt-extensions/common
Throughout this document, the prefix exsl
is used to refer to this namespace. Any other prefix can be used within a particular stylesheet (though a prefix must be specified to enable the extension functions to be recognised as extensions).
This section defines the common extension functions in EXSLT 1.0.
Function: node-set exsl:node-set(object)
The purpose of the exsl:node-set function is to convert a result tree fragment into a node set. If the argument is a node set already, it is simply returned as is. It is an error if the argument to exsl:node-set is not a node set or a result tree fragment.
Function: string exsl:object-type(object)
The exsl:object-type function returns a string giving the type of the object passed as the argument. The possible object types are: 'string'
, 'number'
, 'boolean'
, 'node-set'
or 'RTF'
.
Most XSLT object types can be coerced to each other without error. However, there are certain coercions that raise errors, most importantly treating anything other than a node set as a node set. Authors of utilities such as named templates or user-defined extension functions may wish to give some flexibility in the parameter and argument values that are accepted by the utility; the exsl:object-type function enables them to do so.
This has been informed and inspired by discussions on XSL-List with:
David Carlisle
Jarno Elovirta
Joe English
Clark C. Evans
Jim Fuller
Dave Gomboc
Dave Hartnoll
Kevin Jones
Yevgeniy (Eugene) Kaganovich
Mike Kay
Steve Muench
Miloslav Nic
Francis Norton
Dimitre Novatchev
Uche Ogbuji
David Rosenborg