# EXSLT - Functions - Implementer Page

Version: 2 User Page: index.html XML Definition: func.xml Module Package: func.zip EXSLT - Functions are those extension elements and functions that allow users to define their own functions for use in expressions and patterns in XSLT. The functions available in XPath cover only basic functionality. While a stylesheet author can often use XSLT code to achieve a goal, it would often be simpler to use a function instead. It's impossible to predict all the functions authors might need, and it also adds portability to a stylesheet if authors can write their own functions (as long as the function implementations are understood by the XSLT processor). These could be defined in any language, but the one language that XSLT processors can all understand is XSLT, so it makes sense to define functions using XSLT instructions. However, XSLT as it stands cannot support the return of values other than result tree fragments; to write functions that return node sets and so on, we need an extension element. 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 - Functions unless all the core 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. Using EXSLT will only make your stylesheet portable amongst the implementations that support EXSLT. Note that there is no requirement for XSLT processors that are compliant to XSLT to support the extensions described within EXSLT. ## Namespace The namespace for EXSLT - Functions is:
    http://exslt.org/functions
Throughout this document, the prefix `func` 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). ## Elements ### Core Elements The following extension elements are considered stable and are core to EXSLT - Functions. Processors that claim support of EXSLT - Functions must support these elements.
Element | Version | Status | Syntax | Download
--- | --- | --- | --- | ---
func:function | 3 | stable |
    <func:function
       name = QName>
       <-- Content: (xsl:param* | template) -->
    </func:function>
| func.function.zip
func:result | 3 | stable |
    <func:result
       select = expression>
       <-- Content: template -->
    </func:result>
| func.result.zip
* old version of element
### Other Elements The following extension elements are not considered stable and are not part of the core of EXSLT - Functions. Processors that claim support of EXSLT - Functions might not support these elements.
Element | Version | Status | Syntax | Download
--- | --- | --- | --- | ---
func:script | 1 | new |
    <func:script
       implements-prefix = ncname
       language = qname-and-not-ncname
       src = uri-reference
       archive = uri-reference />
| func.script.zip
* old version of element
## Change History Previous Version: func.1.html
Version | Modified | By | Details
--- | --- | --- | ---
2 | 2001-03-31 | Jeni Tennison | Changed the prefix from `exsl` to `func`. Added a brief rationale for the module. Included most recent versions of functions.
2.1 | 2001-05-20 | Jeni Tennison | Added `func:script` to module.
2.2 | 2001-05-22 | Jeni Tennison | Added `func:function` and `func:result` to the core.

http://www.exslt.org/func/func.html last modified 2001-05-22