The list on this page indicates which functions are implemented in this Saxon release, and any restrictions in the current implementation.
It includes both the core functions defined in XPath 2.0, and the additional functions defined in the XSLT 2.0 specification.
Function signature
$srcval | numeric ? |
Result | numeric ? |
Implemented in Saxon 7.6.1.
fn:adjust-dateTime-to-timezone
Function signature
$srcval | xs:dateTime ? |
Result | xs:dateTime ? |
Implemented in Saxon 7.8
fn:adjust-dateTime-to-timezone
Function signature
$srcval | xs:dateTime ? |
$timezone | xdt:dayTimeDuration |
Result | xs:dateTime ? |
Implemented in Saxon 7.8
Function signature
$srcval | xs:date ? |
Result | xs:date ? |
Implemented in Saxon 7.8
Function signature
$srcval | xs:date ? |
$timezone | xdt:dayTimeDuration |
Result | xs:date ? |
Implemented in Saxon 7.8
Function signature
$srcval | xs:time ? |
Result | xs:time ? |
Implemented in Saxon 7.8
Function signature
$srcval | xs:time ? |
$timezone | xdt:dayTimeDuration |
Result | xs:time ? |
Implemented in Saxon 7.8
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
Implemented. Changed in 7.4 to return the same type as the argument, when appropriate. (For a set of integers, the result is a double). Not yet implemented for other addable types, e.g. duration.
Function signature
Result | xs:string ? |
Function signature
$srcval | node() |
Result | xs:string ? |
Function signature
$srcval | item() * |
Result | xs:boolean |
Function signature
$srcval | numeric ? |
Result | numeric ? |
Implemented. Changed in 7.4 to return the same type as the supplied argument.
Function signature
$codes | xs:integer * |
Result | xs:string |
Implemented. The error checking is incomplete (there is no check that the integers in the supplied sequence are legal XML characters).
Function signature
$srcval | xs:string |
Result | node() * |
Implemented. In the Saxon implementation, the argument is interpreted as the URI
of an XML catalogue document containing the URIs of the documents that make up the collection. An
example of a catalogue is:
<collection>
<doc href="doc1.xml"/>
<doc href="doc2.xml"/>
<doc href="doc3.xml"/>
</collection>
Function signature
$comparand1 | xs:string ? |
$comparand2 | xs:string ? |
Result | xs:integer ? |
Function signature
$comparand1 | xs:string ? |
$comparand2 | xs:string ? |
$collation | xs:string |
Result | xs:integer ? |
Function signature
$arg1 | xs:string |
Result | xs:string |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:boolean ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collation | xs:string |
Result | xs:boolean ? |
Function signature
Result | item() ? |
Removed in Saxon 7.8
Function signature
$srcval | item() * |
Result | xs:integer |
Function signature
Result | item() ? |
Function signature
Result | xs:date |
Implemented. Changed in 7.8 to return a date in the local timezone.
Function signature
Result | xs:dateTime |
Implemented. Changed in 7.8 to return a date/time in the local timezone.
Function signature
Result | item() * |
xsl:for-each-group
Function signature
Result | xdt:anyAtomicType |
xsl:for-each-group
Implemented in Saxon 7.6.5
Function signature
Result | xs:time |
Implemented. Changed in 7.8 to return a time in the local timezone.
Function signature
$srcval | item() * |
Result | xdt:anyAtomicType * |
Function signature
$srcval | xs:date ? |
Result | xs:integer ? |
Note: The old name get-day-from-date is retained as a synonym
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
Note: The old name get-day-from-dateTime is retained as a synonym
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
Note: The old name get-days-from-dayTimeDuration is retained as a synonym
Function signature
$operand1 | item() * |
$operand2 | item() * |
Result | xs:boolean |
Function signature
$operand1 | item() * |
$operand2 | item() * |
$collation | string |
Result | xs:boolean |
Function signature
Result | xs:string |
Implemented. In Saxon this always returns a value: if no default collation has been specified explicitly, it returns the URI of the code-point collation. Note, the May 2003 draft still returns an anyURI, though elsewhere collations are now represented by a string.
Function signature
$srcval | node() * |
Result | node() * |
Removed in Saxon 7.8
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType * |
Function signature
$srcval | xdt:anyAtomicType * |
$collation | string |
Result | xdt:anyAtomicType * |
Function signature
$uri | string ? |
Result | document-node() ? |
Implemented in Saxon 7.6
Function signature
$uri | item * |
Result | node() * |
Function signature
$uri | item * |
$base | node() * |
Result | node() * |
Note: Check the type of the second argument against the latest spec.
Function signature
$srcval | node() |
Result | string ? |
Note: The function is supported, though not strictly according to the spec. It is defined only for document nodes (as specified in the data model), and the URI returned is not guaranteed to be absolute, and is not guaranteed to be capable of retrieving the document using the document function (for example, a value is returned for a temporary tree).
Function signature
$element | xs:string |
Result | xs:boolean |
Implemented. There is a restriction, namely that if the argument value is not a compile-time constant, then the function has no information about the names of user-defined extension elements, so it will return false if the name of such an element is supplied.
Function signature
$srcval | item() * |
Result | xs:boolean |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:boolean ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collation | xs:string |
Result | xs:boolean ? |
Function signature
Result |
Function signature
$srcval | item() ? |
Result |
Function signature
$uri-part | xs:string |
$escape-reserved | xs:boolean |
Result | string |
Function signature
$srcval | item() * |
Result | item() ? |
Function signature
$srcval | item() * |
Result | xs:boolean |
Function signature
$paramURI | xs:string |
$paramLocal | xs:string |
Result | xs:QName |
Function signature
Result | xs:boolean |
Function signature
$srcval | numeric ? |
Result | numeric ? |
Implemented. Changed in 7.4 to return the same type as the supplied argument.
Function signature
$value | xs:date ? |
$picture | xs:string |
$date-format-name | xs:string |
Result | xs:string |
Supported with limitations. The third argument is ignored, the function always formats the date for the current locale. Alphabetic forms of numbers (including ordinals) are not at present localized.
Function signature
$value | xs:date ? |
$picture | xs:string |
Result | xs:string |
Supported with limitations. The function always formats the date for the current locale. Alphabetic forms of numbers (including ordinals) are not at present localized.
Function signature
$value | xs:dateTime ? |
$picture | xs:string |
$date-format-name | xs:string |
Result | xs:string |
Supported with limitations. The third argument is ignored, the function always formats the date for the current locale. Alphabetic forms of numbers (including ordinals) are not at present localized.
Function signature
$value | xs:dateTime ? |
$picture | xs:string |
Result | xs:string |
Supported with limitations. The function always formats the date for the current locale. Alphabetic forms of numbers (including ordinals) are not at present localized.
Function signature
$value | xs:double |
$picture | xs:string |
Result | xs:string |
Implemented. Changed in 7.4.1 to use the new XSLT 2.0 specification. This creates slight incompatibilities from the previous version, which remains available under the name format-number-1.0(). There is one known restriction: characters such as the decimal-separator are restricted to be in the Unicode BMP, i.e. below Unicode 0xFFFF. The current implementation does not attempt to cache or precompile the picture string. Also it does not detect the error that occurs when the same character is used in more than one role. Error checking has not been thoroughly tested.
Function signature
$value | xs:double |
$picture | xs:string |
$decimal-format | xs:string |
Result | xs:string |
See two-argument version of format-number().
Function signature
$value | xs:time ? |
$picture | xs:string |
$date-format-name | xs:string |
Result | xs:string |
Supported with limitations. The third argument is ignored, the function always formats the time for the current locale. Alphabetic forms of numbers (including ordinals) are not at present localized.
Function signature
$value | xs:time ? |
$picture | xs:string |
Result | xs:string |
Supported with limitations. The function always formats the date for the current locale. Alphabetic forms of numbers (including ordinals) are not at present localized.
Function signature
$function | xs:string |
Result | xs:boolean |
Implemented. There is a restriction, namely that if the argument value is not a compile-time constant, then the function has no information about the names of stylesheet functions, so it will return false if the name of a stylesheet function is supplied.
Function signature
$function | xs:string |
$arity | xs:integer |
Result | xs:boolean |
Implemented in Saxon 7.9. There is a restriction, namely that if the argument value is not a compile-time constant, then the function has no information about the names of stylesheet functions, so it will return false if the name of a stylesheet function is supplied.
Function signature
Result | xs:string |
Function signature
$srcval | node() ? |
Result | xs:string |
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
Implemented
Note: The old name get-hours-from-dateTime is retained as a synonym
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
Note: The old name get-hours-from-dayTimeDuration is retained as a synonym
Function signature
$srcval | xs:time ? |
Result | xs:integer ? |
Implemented; but currently returns the local time value, not the normalized time value.
Note: The old name get-hours-from-time is retained as a synonym
Function signature
$srcval | xs:string * |
Result | element() * |
Note: Implemented according to the XPath 1.0 specification. The new second argument (introduced after the 12 Nov 2004 draft) is not yet implemented.
Function signature
$srcval | xs:string * |
Result | node() * |
Implemented in Saxon 7.9
Note: The new second argument (introduced after the 12 Nov 2004 draft) is not yet implemented.
Function signature
Result | xdt:dayTimeDuration |
Implemented in Saxon 7.8
Function signature
$seqParam | xdt:anyAtomicType * |
$srchParam | xdt:anyAtomicType |
Result | xs:integer * |
Implemented.
Function signature
$seqParam | xdt:anyAtomicType * |
$srchParam | xdt:anyAtomicType |
$collation | xs:string |
Result | xs:integer * |
Implemented.
Function signature
Result | node() * |
Removed in Saxon 7.8
Note: This implementation of the input() function is very simple. If the parameter {http://saxon.sf.net/}input has been supplied to the transformation, the function returns the value of this parameter. This must be a node sequence - which means it cannot be supplied from the command line. If no such parameter has been supplied, it returns the root of the principal source document (the document containing the node that was matched on entry to the transformation).
Function signature
$element | element() |
Result | xs:string * |
Implemented. Name changed in 7.8 from get-in-scope-namespaces().
Note: The old name get-in-scope-prefixes is retained as a synonym
Function signature
$target | item() * |
$position | xs:integer |
$inserts | item() * |
Result | item() * |
Implemented. Changed in 7.4 to reflect the latest WD which changes the name from insert to insert-before, and inserts the new items before the selected position, not after it as previously. Changed in 7.8 to allow the insert position to be beyond the end of the original sequence (which causes the new sequence to be appended).
Function signature
$seqParam | item() * |
$posParam | xs:integer |
Result | item() ? |
Removed in Saxon 7.8
Function signature
$key-name | xs:string |
$key-value | xdt:anyAtomicType * |
Result | node() * |
Function signature
$testlang | xs:string * |
Result | xs:boolean |
The optional second argument (added since the 12 Nov 2003 draft) is not yet implemented.
Function signature
Result | xs:integer |
Function signature
Result | xs:string |
Function signature
$srcval | node() ? |
Result | xs:string |
Function signature
$srcval | xs:QName ? |
Result | string ? |
Note: The old name get-local-name-from-QName is retained as a synonym
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
Function signature
$input | xs:string ? |
$pattern | xs:string |
Result | xs:boolean ? |
Note: Upgraded in Saxon 7.9 to match the precise regex syntax and to support all four flags s, m, i, x.
Function signature
$input | xs:string ? |
$pattern | xs:string |
$flags | xs:string |
Result | xs:boolean ? |
Note: Upgraded in Saxon 7.9 to match the precise regex syntax and to support all four flags s, m, i, x.
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
Implemented. Changed in 7.4 to support any comparable type. Changed in 7.8 to convert untyped Atomic values to xs:double, and to return NaN if the input sequence contains a NaN.
Function signature
$srcval | xdt:anyAtomicType * |
$collation | xs:string |
Result | xdt:anyAtomicType ? |
Implemented in 7.4. Changed in 7.8 to convert untyped Atomic values to xs:double, and to return NaN if the input sequence contains a NaN.
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
Implemented. Changed in 7.4 to support any comparable type. Changed in 7.8 to convert untyped Atomic values to xs:double, and to return NaN if the input sequence contains a NaN.
Function signature
$srcval | xdt:anyAtomicType * |
$collation | xs:string |
Result | xdt:anyAtomicType ? |
Implemented in 7.4. Changed in 7.8 to convert untyped Atomic values to xs:double, and to return NaN if the input sequence contains a NaN.
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
Note: The old name get-minutes-from-dateTime is retained as a synonym
fn:minutes-from-dayTimeDuration
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
Note: The old name get-minutes-from-dayTimeDuration is retained as a synonym
Function signature
$srcval | xs:time ? |
Result | xs:integer ? |
Note: The old name get-minutes-from-time is retained as a synonym
Function signature
$srcval | xs:date ? |
Result | xs:integer ? |
Note: The old name get-month-from-date is retained as a synonym
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
Note: The old name get-month-from-dateTime is retained as a synonym
fn:months-from-yearMonthDuration
Function signature
$srcval | xdt:yearMonthDuration ? |
Result | xs:integer ? |
Note: The old name get-months-from-yearMonthDuration is retained as a synonym
Function signature
Result | xs:string |
Function signature
$srcval | node() ? |
Result | xs:string |
Function signature
Result | xs:string |
Function signature
$srcval | node() ? |
Result | xs:string |
Function signature
$prefix | xs:string |
$element | element() |
Result | string ? |
Implemented. Changed in 7.9 so the prefix is now the first argument, the element node the second.
Note: The old name get-namespace-uri-for-prefix is retained as a synonym
Function signature
$srcval | xs:QName ? |
Result | string ? |
Note: The old name get-namespace-from-QName [sic] is retained as a synonym
Function signature
$srcval | node() |
Result | xs:string |
Removed in Saxon 7.8
Function signature
$srcval | node() |
Result | xs:QName ? |
Function signature
Result | xs:string ? |
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
** Not yet implemented **
Function signature
$srcval | xs:string ? |
$normalizationForm | xs:string |
Result | xs:string ? |
** Not yet implemented **
Function signature
$srcval | item() * |
Result | xs:boolean |
Function signature
Result | xs:double |
Note: Saxon 7.4 implements some incompatible changes to this function defined in XPath 2.0. When given an empty sequence as the argument, the number function now returns an empty sequence, rather than NaN. When given a value that is not a valid number, it raises an error rather than returning NaN. The strings "INF" and "-INF" are recognized as representations of positive and negative infinity.
Function signature
$srcval | item() ? |
Result | xs:double |
Note: Implementation follows the XPath 1.0 specification. Changed in 7.4 so that if the argument is the empty sequence, the result is the empty sequence - this causes some backwards compatibility problems.
Function signature
$srcval | item() * |
Result | item() ? |
Function signature
Result | xs:integer |
Function signature
$groupNumber | xs:integer |
Result | xs:string |
xsl:analyze-string
Function signature
$target | item() * |
$position | xs:integer |
Result | item() * |
Function signature
$input | xs:string ? |
$pattern | xs:string |
$replacement | xs:string |
Result | xs:string ? |
Note: Upgraded in Saxon 7.9 to match the precise regex syntax and to support all four flags s, m, i, x. Also changed to disallow a pattern that matches a zero-length string.
Function signature
$input | xs:string ? |
$pattern | xs:string |
$replacement | xs:string |
$flags | xs:string |
Result | xs:string ? |
Note: Upgraded in Saxon 7.9 to match the precise regex syntax and to support all four flags s, m, i, x. Also changed to disallow a pattern that matches a zero-length string.
Function signature
$qname | xs:string |
$element | element() |
Result | xs:QName |
Function signature
$relative | xs:string |
Result | xs:string |
Function signature
$relative | xs:string |
$base | xs:string |
Result | xs:string |
Note: Current WD still describes the second argument as having type xs:anyURI
Function signature
$srcval | item() * |
Result | item() * |
Implemented in Saxon 7.8
Function signature
Result | node() |
Function signature
$srcval | node() |
Result | node() |
Function signature
$srcval | numeric ? |
Result | numeric ? |
Implemented. Changed in 7.4 to return the same type as the supplied argument.
Function signature
$srcval | numeric ? |
Result | numeric ? |
Function signature
$srcval | numeric ? |
$precision | xs:integer |
Result | numeric ? |
Note: In the case of doubles and floats, rounding errors may occur giving unexpected effects.
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
Note: The old name get-seconds-from-dateTime is retained as a synonym
fn:seconds-from-dayTimeDuration
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
Implemented. Return type should be decimal, not integer.
Note: The old name get-seconds-from-dayTimeDuration is retained as a synonym
Function signature
$srcval | xs:time ? |
Result | xs:integer ? |
Note: The old name get-seconds-from-time is retained as a synonym
Function signature
$parameter1 | node() * |
$parameter2 | node() * |
Result | xs:boolean ? |
Removed in Saxon 7.8
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:boolean ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collation | xs:string |
Result | xs:boolean ? |
Function signature
Result | xs:string |
Function signature
$srcval | item() ? |
Result | xs:string |
Function signature
$sequence | xs:string * |
$separator | xs:string |
Result | xs:string |
Function signature
Result | xs:integer ? |
Function signature
$srcval | xs:string ? |
Result | xs:integer ? |
Function signature
$padString | xs:string ? |
$padCount | xs:integer |
Result | xs:string ? |
Removed in Saxon 7.8
Function signature
$srcval | xs:string |
Result | xs:integer * |
Function signature
$sourceSeq | item() * |
$startingLoc | xs:double |
Result | item() * |
Implemented, currently requires integer argument
Note: Non-integer values, negative values etc for the second argument may not work as defined in the XPath specification.
Function signature
$sourceSeq | item() * |
$startingLoc | xs:double |
$length | xs:double |
Result | item() * |
Implemented, currently requires integer arguments
Note: Non-integer values, negative values etc for the second or third argument may not work as defined in the XPath specification.
Function signature
$sourceString | xs:string ? |
$startingLoc | xs:double |
Result | xs:string ? |
Function signature
$sourceString | xs:string ? |
$startingLoc | xs:double |
$length | xs:double |
Result | xs:string ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:string ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collation | xs:string |
Result | xs:string ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:string ? |
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collation | xs:string |
Result | xs:string ? |
fn:subtract-dateTimes-yielding-dayTimeDuration
Function signature
$operand1 | xs:dateTime ? |
$operand2 | xs:dateTime ? |
Result | xdt:dayTimeDuration ? |
** Not yet implemented **
fn:subtract-dateTimes-yielding-yearMonthDuration
Function signature
$operand1 | xs:dateTime ? |
$operand2 | xs:dateTime ? |
Result | xdt:yearMonthDuration ? |
** Not yet implemented **
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
Implemented. In 7.4, works on all numeric types and returns the same type as the arguments. Not implemented for other addable types, e.g. duration. The new optional second parameter is not implemented. Changed in 7.8 to return integer 0 for an empty sequence, rather than double 0.0.
Function signature
$propertyName | xs:string |
Result | xs:string |
Function signature
$srcval | xs:date ? |
Result | xdt:dayTimeDuration ? |
Implemented. Changed in 7.8 to return dayTimeDuration rather than string.
Note: The old name get-timezone-from-date is retained as a synonym
Function signature
$srcval | xs:dateTime ? |
Result | xdt:dayTimeDuration ? |
Implemented. Changed in 7.8 to return dayTimeDuration rather than string.
Note: The old name timezone-from-dateTime is retained as a synonym
Function signature
$srcval | xs:time ? |
Result | xdt:dayTimeDuration ? |
Implemented. Changed in 7.8 to return dayTimeDuration rather than string.
Note: The old name get-timezone-from-time is retained as a synonym
Function signature
$input | xs:string ? |
$pattern | xs:string |
Result | xs:string * |
Implemented. The facility to split a string into its individual characters by supplying a regex that matches a zero-length string is newly implemented in Saxon 7.7.
Note: Upgraded in Saxon 7.9 to match the precise regex syntax and to support all four flags s, m, i, x. Also changed to disallow a pattern that matches a zero-length string.
Function signature
$input | xs:string ? |
$pattern | xs:string |
$flags | xs:string |
Result | xs:string *? |
Note: Upgraded in Saxon 7.9 to match the precise regex syntax and to support all four flags s, m, i, x. Also changed to disallow a pattern that matches a zero-length string.
Function signature
$value | item() * |
$label | xs:string |
Result | item() * |
Note: The Saxon implementation outputs the value of each item in a sequence as it is evaluated (except when the sequence is empty, in which case it outputs "empty sequence" at the start). Atomic values are output by converting them to a string, nodes by calling getPath() to generate a path expression to the node. With complex expressions the order of evaluation may be rather different from the expected order. The trace output is directed to System.err, this may be redirected by using "2>log.txt" on the command line.
Function signature
$srcval | xs:string ? |
$mapString | xs:string ? |
$transString | xs:string ? |
Result | xs:string ? |
Function signature
Result | xs:boolean |
Function signature
$sequence | item() * |
Result | item() * |
Note: In practice the only important case where this function has any effect in the Saxon implementation is where the sequence supplied as argument is a Step using a reverse axis: for example, unordered(ancestor::*) returns the ancestors in reverse document order. But applications should not rely on the actual order; the function is intended to be used by applications that do not care about the order of the results.
xslt:unparsed-entity-public-id
Function signature
$srcval | xs:string |
Result | xs:string |
Function signature
$srcval | xs:string |
Result | xs:string |
Function signature
$uri | xs:string |
Result | xs:string |
Not implemented. The encoding parameter is currently mandatory.
Function signature
$uri | xs:string |
$encoding | xs:string |
Result | xs:string |
Implemented. Changed at 7.5 so it no longer processes multiple URIs ina single call.
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
Function signature
$srcval | xs:date ? |
Result | xs:integer ? |
Note: The old name get-year-from-date is retained as a synonym
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
Note: The old name get-year-from-dateTime is retained as a synonym
fn:years-from-yearMonthDuration
Function signature
$srcval | xdt:yearMonthDuration ? |
Result | xs:integer ? |
Note: The old name get-years-from-yearMonthDuration is retained as a synonym
Function signature
$srcval | item() * |
Result | item() ? |
Michael H. Kay
March 2004