The list on this page indicates which XPath 2.0 functions are implemented in this Saxon release, and any restrictions in the current implementation.
Functions defined in the XSLT 2.0 specification are not currently listed.
fn:add-timezone-to-date( date $srcval) => date
** Not yet implemented **
fn:add-timezone-to-date( date $srcval, dayTimeDuration $timezone) => date
fn:add-timezone-to-dateTime( dateTime $srcval) => dateTime
** Not yet implemented **
fn:add-timezone-to-dateTime( dateTime $srcval, dayTimeDuration $timezone) => dateTime
fn:add-timezone-to-time( time $srcval) => time
** Not yet implemented **
fn:add-timezone-to-time( time $srcval, dayTimeDuration $timezone) => time
fn:avg(atomicValue* $srcval) => numeric?
fn:base-uri(node $srcval) => anyURI?,returns String
fn:boolean(item* $srcval) => boolean
fn:ceiling(numeric? $srcval) => numeric?
fn:codepoints-to-string(integer* codes) => string
fn:collection(string $srcval) => node*
** Not yet implemented **
fn:compare(string? $comparand1, string? $comparand2) => integer?
fn:compare(string? $comparand1, string? $comparand2, anyURI $collationLiteral) => integer?
Note: In Saxon, the collation is represented as a string
fn:concat(string $arg1, ...) => string
fn:contains(string? $operand1, string? $operand2) => boolean?
fn:contains(string? $operand1, string? $operand2, anyURI $collationLiteral) => boolean?
fn:context-item() => item?
fn:count(item* $srcval) => unsignedInt
Note: Currently returns an integer, not an unsignedInt
fn:current-date() => date
fn:current-dateTime() => dateTime
fn:current-time() => time
fn:data(node $srcval) => atomic value*
fn:dayTimeDuration-from-seconds( double seconds) => dayTimeDuration
Implemented, but no longer defined in the spec
fn:deep-equal(node $parameter1, node $parameter2) => boolean
fn:deep-equal(node $parameter1, node $parameter2, anyURI $collation) => boolean
fn:default-collation() => anyURI
fn:distinct-nodes( node* $srcval) => node*
fn:distinct-values( item* $srcval) => item*
fn:distinct-values( item* $srcval, anyURI $collationLiteral) => item*
fn:document(item* $srcval1) => node*
fn:document(item* $srcval1, node* $srcval2) => node*
fn:empty(item* $srcval) => boolean
fn:ends-with(string? $operand1, string? $operand2) => boolean?
fn:ends-with(string? $operand1, string? $operand2, anyURI $collationLiteral) => boolean?
fn:error()
fn:error(item $srcval)
fn:escape-uri(string $uri-part, boolean $escape-reserved) => string
fn:exists(item* $srcval) => boolean
fn:expanded-QName( string $paramURI, string $paramLocal) => QName
fn:false() => boolean
fn:floor(numeric? $srcval) => numeric?
fn:get-day-from-date( date? $srcval) => integer?
fn:get-day-from-dateTime( dateTime? $srcval) => integer?
fn:get-days-from-dayTimeDuration( dayTimeDuration? $srcval) => integer?
fn:get-dayTimeDuration-from-dateTimes( dateTime $srcval1, dateTime $srcval2) => dayTimeDuration
fn:get-hours-from-dateTime( dateTime? $srcval) => integer?
fn:get-hours-from-dayTimeDuration( dayTimeDuration? $srcval) => integer?
fn:get-hours-from-time( time? $srcval) => integer?
fn:get-in-scope-namespaces( element? $element) => string*
fn:get-local-name-from-QName( QName? $srcval) => string?
fn:get-minutes-from-dateTime( dateTime? $srcval) => integer?
fn:get-minutes-from-dayTimeDuration( dayTimeDuration? $srcval) => integer?
fn:get-minutes-from-time( time? $srcval) => integer?
fn:get-month-from-date( date? $srcval) => integer?
fn:get-month-from-dateTime( dateTime? $srcval) => integer?
fn:get-months-from-yearMonthDuration( yearMonthDuration? $srcval) => integer?
fn:get-namespace-from-QName( QName? $srcval) => anyURI?
fn:get-namespace-uri-for-prefix( element $element, string $prefix) => anyURI?
fn:get-seconds-from-dateTime( dateTime? $srcval) => decimal?
fn:get-seconds-from-dayTimeDuration( dayTimeDuration? $srcval) => integer?
fn:get-seconds-from-time( time? $srcval) => decimal?
fn:get-timezone-from-date( date? $srcval) => string?
fn:get-timezone-from-dateTime( dateTime? $srcval) => string?
fn:get-timezone-from-time( time? $srcval) => string?
fn:get-year-from-date( date? $srcval) => integer?
fn:get-year-from-dateTime( dateTime? $srcval) => integer?
fn:get-yearMonthDuration-from-dateTimes( dateTime $srcval1, dateTime $srcval2) => yearMonthDuration
** Not yet implemented **
fn:get-years-from-yearMonthDuration( yearMonthDuration? $srcval) => integer?
fn:id(IDREF* $srcval) => element*
Note: Implemented according to the XPath 1.0 specification
fn:idref(string* $srcval) => element*
** Not yet implemented **
fn:implicit-timezone() => dayTimeDuration
** Not yet implemented **
fn:index-of(item* $seqParam, item $srchParam) => unsignedInt*
fn:index-of(item* $seqParam, item $srchParam, anyURI $collationLiteral) => unsignedInt*
fn:input() => node*
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).
fn:insert(item* $target, decimal $position, item* $inserts) => item*
fn:item-at(item* $seqParam, decimal $posParam) => item?
Note: Currently returns an empty sequence rather than raising an error if the index is out of range
fn:lang(string $testlang) => boolean
fn:last() => unsignedInt?
fn:local-name() => string
fn:local-name(node? $srcval) => string
fn:lower-case(string? $srcval) => string?
fn:matches(string? $input, string? $pattern) => boolean?
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:matches(string? $input, string? $pattern, string? $flags) => boolean?
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:max(item* $srcval) => anySimpleType?
fn:max(item* $srcval, anyURI $collationLiteral) => anySimpleType?
fn:min(item* $srcval) => anySimpleType?
fn:min(item* $srcval, anyURI $collationLiteral) => anySimpleType?
fn:name() => string
fn:name(node? $srcval) => string
fn:namespace-uri() => string
fn:namespace-uri(node? $srcval) => string
fn:node-kind(node $srcval) => string
fn:node-name(node $srcval) => QName?
fn:normalize-space( string? $srcval) => string?
fn:normalize-unicode( string? $srcval) => string?
** Not yet implemented **
fn:normalize-unicode( string? $srcval, string $normalizationForm) => string?
** Not yet implemented **
fn:not(item* $srcval) => boolean
fn:number() => double
fn:number(node $srcval) => 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.
fn:position() => unsignedInt?
fn:QName-in-context(string $qname, boolean $use-default) => QName
** Not yet implemented **
fn:QName-in-context(string $qname, boolean $use-default, node $node) => QName
** Not yet implemented **
fn:remove(item* $target, decimal $position) => item*
fn:remove-timezone-from-date( date $srcval) => date
** Not yet implemented **
fn:remove-timezone-from-dateTime( dateTime $srcval) => dateTime
** Not yet implemented **
fn:remove-timezone-from-dateTime( dateTime $srcval, dayTimeDuration $timezone) => dateTime
fn:remove-timezone-from-time( time $srcval) => time
** Not yet implemented **
fn:remove-timezone-from-time( time $srcval, dayTimeDuration $timezone) => time
fn:replace(string? $input, string? $pattern, string? $replacement) => string?
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:replace(string? $input, string? $pattern, string? $replacement, string? $flags) => string?
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:resolve-uri(anyURI $relative) => anyURI
** Not yet implemented **
fn:resolve-uri(anyURI $relative, anyURI $base) => anyURI
** Not yet implemented **
fn:root(node $srcval) => node
fn:round(numeric? $srcval) => numeric?
fn:round-half-to-even(numeric? $srcval) => numeric?
** Not yet implemented **
fn:round-half-to-even(numeric? $srcval, integer $precision) => numeric?
** Not yet implemented **
Note: Second argument has the wrong type in January draft
fn:sequence-deep-equal( item* $parameter1, item* $parameter2) => boolean?
fn:sequence-deep-equal( item* $parameter1, item* $parameter2, anyURI $collationLiteral) => boolean?
fn:sequence-node-equal( node* $parameter1, node* $parameter2) => boolean?
fn:starts-with(string? $operand1, string? $operand2) => boolean?
fn:starts-with(string? $operand1, string? $operand2, anyURI $collationLiteral) => boolean?
fn:string() => string
fn:string(item $srcval) => string
fn:string-join(string* $sequence, string $separator) => string
fn:string-length(string? $srcval) => integer?
fn:string-pad(string? $padString, decimal? $padCount) => string?
fn:string-to-codepoints(string $srcval) => integer*
fn:subsequence(item* $sourceSeq, decimal $startingLoc) => item*
fn:subsequence(item* $sourceSeq, decimal $startingLoc, decimal $length) => item*
fn:substring(string? $sourceString, decimal? $startingLoc) => string?
fn:substring(string? $sourceString, decimal? $startingLoc, decimal? $length) => string?
fn:substring-after( string? $operand1, string? $operand2) => string?
fn:substring-after( string? $operand1, string? $operand2, anyURI $collationLiteral) => string?
fn:substring-before( string? $operand1, string? $operand2) => string?
fn:substring-before( string? $operand1, string? $operand2, anyURI $collationLiteral) => string?
fn:subtract-dateTimes-yielding-dayTimeDuration( dateTime? $operand1, dateTime? $operand2) => dayTimeDuration?
** Not yet implemented **
fn:subtract-dateTimes-yielding-yearMonthDuration( dateTime? $operand1, dateTime? $operand2) => yearMonthDuration?
** Not yet implemented **
fn:sum(atomicValue* $srcval) => numeric
fn:tokenize(string? $input, string? $pattern) => string*
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:tokenize(string? $input, string? $pattern, string? $flags) => string*
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:translate(string? $srcval, string? $mapString, string? $transString) => string?
fn:true() => boolean
fn:unparsed-entity-uri(string $srcval) => string
fn:unparsed-entity-public-id(string $srcval) => string
fn:unparsed-text(string $uri, string $encoding) => string?
fn:unordered(item* $sequence) => 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.
fn:upper-case(string? $srcval) => string?
fn:yearMonthDuration-from-months(int months) => yearMonthDuration
Implemented, but no longer in the spec
Michael H. Kay
14 February 2003