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.
fn:adjust-date-to-timezone
Function signature
$srcval | xs:date ? |
Result | xs:date ? |
** Not yet implemented **
fn:adjust-date-to-timezone
Function signature
$srcval | xs:date ? |
$timezone | xdt:dayTimeDuration |
Result | xs:date ? |
** Not yet implemented **
fn:adjust-dateTime-to-timezone
Function signature
$srcval | xs:dateTime ? |
Result | xs:dateTime ? |
** Not yet implemented **
fn:adjust-dateTime-to-timezone
Function signature
$srcval | xs:dateTime ? |
$timezone | xdt:dayTimeDuration |
Result | xs:dateTime ? |
** Not yet implemented **
fn:adjust-time-to-timezone
Function signature
$srcval | xs:time ? |
Result | xs:time ? |
** Not yet implemented **
fn:adjust-time-to-timezone
Function signature
$srcval | xs:time ? |
$timezone | xdt:dayTimeDuration |
Result | xs:time ? |
** Not yet implemented **
fn:avg
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
fn:base-uri
Function signature
Result | xs:string ? |
fn:base-uri
Function signature
$srcval | node() |
Result | xs:string ? |
boolean
Function signature
$srcval | item() * |
Result | xs:boolean |
fn:ceiling
Function signature
$srcval | numeric ? |
Result | numeric ? |
fn:codepoints-to-string
Function signature
$codes | xs:integer * |
Result | xs:string |
fn:collection
Function signature
$srcval | xs:string |
Result | node() * |
** Not yet implemented **
fn:compare
Function signature
$comparand1 | xs:string ? |
$comparand2 | xs:string ? |
Result | xs:integer ? |
fn:compare
Function signature
$comparand1 | xs:string ? |
$comparand2 | xs:string ? |
$collationLiteral | xs:string |
Result | xs:integer ? |
fn:concat
Function signature
$arg1 | xs:string |
Result | xs:string |
fn:contains
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:boolean ? |
fn:contains
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collationLiteral | xs:string |
Result | xs:boolean ? |
fn:context-item
Function signature
Result | item() ? |
fn:count
Function signature
$srcval | item() * |
Result | xs:integer |
xslt:current
Function signature
Result | item() ? |
fn:current-date
Function signature
Result | xs:date |
fn:current-dateTime
Function signature
Result | xs:dateTime |
xslt:current-group
Function signature
Result | item() * |
xsl:for-each-group
xslt:current-grouping-key
Function signature
Result | xdt:anyAtomicType |
xsl:for-each-group
** Not yet implemented **
fn:current-time
Function signature
Result | xs:time |
data
Function signature
$srcval | item() * |
Result | xdt:anyAtomicType * |
fn:deep-equal
Function signature
$operand1 | item() * |
$operand2 | item() * |
Result | xs:boolean |
fn:deep-equal
Function signature
$operand1 | item() * |
$operand2 | item() * |
$collation | string |
Result | xs:boolean |
fn:default-collation
Function signature
Result | xs:string |
fn:distinct-nodes
Function signature
$srcval | node() * |
Result | node() * |
fn:distinct-values
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType * |
fn:distinct-values
Function signature
$srcval | xdt:anyAtomicType * |
$collation | string |
Result | xdt:anyAtomicType * |
fn:doc
Function signature
$uri | string ? |
Result | document-node() ? |
** Not yet implemented **
xslt:document
Function signature
$uri | item * |
Result | node() * |
xslt:document
Function signature
$uri | item * |
$base | node() * |
Result | node() * |
Note: Check the type of the second argument against the latest spec.
fn:document-uri
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).
fn:empty
Function signature
$srcval | item() * |
Result | xs:boolean |
fn:ends-with
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:boolean ? |
fn:ends-with
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collationLiteral | xs:string |
Result | xs:boolean ? |
fn:error
Function signature
Result |
fn:error
Function signature
$srcval | item() ? |
Result |
fn:escape-uri
Function signature
$uri-part | xs:string |
$escape-reserved | xs:boolean |
Result | string |
fn:exactly-one
Function signature
$srcval | item() * |
Result | item() ? |
fn:exists
Function signature
$srcval | item() * |
Result | xs:boolean |
fn:expanded-QName
Function signature
$paramURI | xs:string |
$paramLocal | xs:string |
Result | xs:QName |
fn:false
Function signature
Result | xs:boolean |
fn:floor
Function signature
$srcval | numeric ? |
Result | numeric ? |
xslt:format-number
Function signature
$value | xs:double |
$picture | xs:string |
Result | xs:string |
xslt:format-number
Function signature
$value | xs:double |
$picture | xs:string |
$decimal-format | xs:string |
Result | xs:string |
xslt:generate-id
Function signature
Result | xs:string |
xslt:generate-id
Function signature
$srcval | node() ? |
Result | xs:string |
fn:get-day-from-date
Function signature
$srcval | xs:date ? |
Result | xs:integer ? |
fn:get-day-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
fn:get-days-from-dayTimeDuration
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
fn:get-dayTimeDuration-from-dateTimes( dateTime $srcval1, dateTime $srcval2) => dayTimeDuration
fn:get-hours-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
fn:get-hours-from-dayTimeDuration
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
fn:get-hours-from-time
Function signature
$srcval | xs:time ? |
Result | xs:integer ? |
fn:get-in-scope-namespaces
Function signature
$element | element() |
Result | xs:string * |
fn:get-local-name-from-QName
Function signature
$srcval | xs:QName ? |
Result | string ? |
fn:get-minutes-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
fn:get-minutes-from-dayTimeDuration
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
fn:get-minutes-from-time
Function signature
$srcval | xs:time ? |
Result | xs:integer ? |
fn:get-month-from-date
Function signature
$srcval | xs:date ? |
Result | xs:integer ? |
fn:get-month-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
fn:get-months-from-yearMonthDuration
Function signature
$srcval | xdt:yearMonthDuration ? |
Result | xs:integer ? |
fn:get-namespace-from-QName
Function signature
$srcval | xs:QName ? |
Result | string ? |
fn:get-namespace-uri-for-prefix
Function signature
$element | element() |
$prefix | xs:string ? |
Result | string ? |
fn:get-seconds-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
fn:get-seconds-from-dayTimeDuration
Function signature
$srcval | xdt:dayTimeDuration ? |
Result | xs:integer ? |
fn:get-seconds-from-time
Function signature
$srcval | xs:time ? |
Result | xs:integer ? |
fn:get-timezone-from-date
Function signature
$srcval | xs:date ? |
Result | xdt:dayTimeDuration ? |
fn:get-timezone-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xdt:dayTimeDuration ? |
fn:get-timezone-from-time
Function signature
$srcval | xs:time ? |
Result | xdt:dayTimeDuration ? |
fn:get-year-from-date
Function signature
$srcval | xs:date ? |
Result | xs:integer ? |
fn:get-year-from-dateTime
Function signature
$srcval | xs:dateTime ? |
Result | xs:integer ? |
fn:get-years-from-yearMonthDuration
Function signature
$srcval | xdt:yearMonthDuration ? |
Result | xs:integer ? |
fn:id
Function signature
$srcval | xs:string * |
Result | element() * |
Note: Implemented according to the XPath 1.0 specification
fn:idref
Function signature
$srcval | xs:string * |
Result | node() * |
** Not yet implemented **
fn:implicit-timezone
Function signature
Result | xdt:dayTimeDuration |
** Not yet implemented **
fn:index-of
Function signature
$seqParam | xdt:anyAtomicType * |
$srchParam | xdt:anyAtomicType |
Result | xs:integer * |
fn:index-of
Function signature
$seqParam | xdt:anyAtomicType * |
$srchParam | xdt:anyAtomicType |
$collation | xs:string |
Result | xs:integer * |
fn:input
Function signature
Result | 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-before
Function signature
$target | item() * |
$position | xs:integer |
$inserts | item() * |
Result | item() * |
fn:item-at
Function signature
$seqParam | item() * |
$posParam | xs:integer |
Result | item() ? |
Note: Currently returns an empty sequence rather than raising an error if the index is out of range
fn:lang
Function signature
$testlang | xs:string * |
Result | xs:boolean |
fn:last
Function signature
Result | xs:integer |
fn:local-name
Function signature
Result | xs:string |
fn:local-name
Function signature
$srcval | node() ? |
Result | xs:string |
fn:lower-case
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
fn:matches
Function signature
$input | xs:string ? |
$pattern | xs:string |
Result | xs:boolean ? |
Note: The regular expression syntax supported in Saxon is that of JDK 1.4.
fn:matches
Function signature
$input | xs:string ? |
$pattern | xs:string |
$flags | xs:string |
Result | xs:boolean ? |
Note: The regular expression syntax supported in Saxon is that of JDK 1.4. The "i" flag (for case insensitive matching) is supported from Saxon 7.4.1.
fn:max
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
fn:max
Function signature
$srcval | xdt:anyAtomicType * |
$collationLiteral | xs:string |
Result | xdt:anyAtomicType ? |
fn:min
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
fn:min
Function signature
$srcval | xdt:anyAtomicType * |
$collationLiteral | xs:string |
Result | xdt:anyAtomicType ? |
fn:name
Function signature
Result | xs:string |
fn:name
Function signature
$srcval | node() ? |
Result | xs:string |
fn:namespace-uri
Function signature
Result | xs:string |
fn:namespace-uri
Function signature
$srcval | node() ? |
Result | xs:string |
fn:node-kind
Function signature
$srcval | node() |
Result | xs:string |
fn:node-name
Function signature
$srcval | node() |
Result | xs:QName ? |
fn:normalize-space
Function signature
Result | xs:string ? |
fn:normalize-space
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
fn:normalize-unicode
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
** Not yet implemented **
fn:normalize-unicode
Function signature
$srcval | xs:string ? |
$normalizationForm | xs:string |
Result | xs:string ? |
** Not yet implemented **
fn:not
Function signature
$srcval | item() * |
Result | xs:boolean |
fn:number
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.
fn:number
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.
fn:one-or-more
Function signature
$srcval | item() * |
Result | item() ? |
fn:position
Function signature
Result | xs:integer |
fn:remove
Function signature
$target | item() * |
$position | xs:integer |
Result | item() * |
fn:replace
Function signature
$input | xs:string ? |
$pattern | xs:string |
$replacement | xs:string |
Result | xs:string ? |
Note: The regular expression syntax supported in Saxon is that of JDK 1.4.
fn:replace
Function signature
$input | xs:string ? |
$pattern | xs:string |
$replacement | xs:string |
$flags | xs:string |
Result | xs:string ? |
Note: The regular expression syntax supported in Saxon is that of JDK 1.4. The "i" flag (for case insensitive matching) is supported from Saxon 7.4.1.
fn:resolve-QName
Function signature
$qname | xs:string |
$element | element() |
Result | xs:QName |
fn:resolve-uri
Function signature
$relative | xs:string |
Result | xs:string |
fn:resolve-uri
Function signature
$relative | xs:string |
$base | xs:string |
Result | xs:string |
Note: Current WD still describes the second argument as having type xs:anyURI
fn:root
Function signature
Result | node() |
fn:root
Function signature
$srcval | node() |
Result | node() |
fn:round
Function signature
$srcval | numeric ? |
Result | numeric ? |
fn:round-half-to-even
Function signature
$srcval | numeric ? |
Result | numeric ? |
fn:round-half-to-even
Function signature
$srcval | numeric ? |
$precision | xs:integer |
Result | numeric ? |
Note: In the case of doubles and floats, rounding errors may occur giving unexpected effects.
fn:sequence-node-identical
Function signature
$parameter1 | node() * |
$parameter2 | node() * |
Result | xs:boolean ? |
fn:starts-with
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:boolean ? |
fn:starts-with
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collationLiteral | xs:string |
Result | xs:boolean ? |
fn:string
Function signature
Result | xs:string |
fn:string
Function signature
$srcval | item() ? |
Result | xs:string |
fn:string-join
Function signature
$sequence | xs:string * |
$separator | xs:string |
Result | xs:string |
fn:string-length
Function signature
Result | xs:integer ? |
fn:string-length
Function signature
$srcval | xs:string ? |
Result | xs:integer ? |
fn:string-pad
Function signature
$padString | xs:string ? |
$padCount | xs:integer |
Result | xs:string ? |
fn:string-to-codepoints
Function signature
$srcval | xs:string |
Result | xs:integer * |
fn:subsequence
Function signature
$sourceSeq | item() * |
$startingLoc | xs:double |
Result | item() * |
Note: Non-integer values, negative values etc for the second argument may not work as defined in the XPath specification.
fn:subsequence
Function signature
$sourceSeq | item() * |
$startingLoc | xs:double |
$length | xs:double |
Result | item() * |
Note: Non-integer values, negative values etc for the second or third argument may not work as defined in the XPath specification.
fn:substring
Function signature
$sourceString | xs:string ? |
$startingLoc | xs:double |
Result | xs:string ? |
fn:substring
Function signature
$sourceString | xs:string ? |
$startingLoc | xs:double |
$length | xs:double |
Result | xs:string ? |
fn:substring-after
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:string ? |
fn:substring-after
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
$collation | xs:string |
Result | xs:string ? |
fn:substring-before
Function signature
$operand1 | xs:string ? |
$operand2 | xs:string ? |
Result | xs:string ? |
fn:substring-before
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 **
fn:sum
Function signature
$srcval | xdt:anyAtomicType * |
Result | xdt:anyAtomicType ? |
fn:tokenize
Function signature
$input | xs:string ? |
$pattern | xs:string |
Result | xs:string * |
Note: The regular expression syntax supported in Saxon is that of JDK 1.4
fn:tokenize
Function signature
$input | xs:string ? |
$pattern | xs:string |
$flags | xs:string |
Result | xs:string *? |
Note: The regular expression syntax supported in Saxon is that of JDK 1.4. The "i" flag (for case insensitive matching) is supported from Saxon 7.4.1.
fn:trace
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.
fn:translate
Function signature
$srcval | xs:string ? |
$mapString | xs:string ? |
$transString | xs:string ? |
Result | xs:string ? |
fn:true
Function signature
Result | xs:boolean |
xslt:unparsed-entity-uri
Function signature
$srcval | xs:string |
Result | xs:string |
xslt:unparsed-entity-public-id
Function signature
$srcval | xs:string |
Result | xs:string |
xslt:unparsed-text
Function signature
$uri | xs:string |
Result | xs:string |
xslt:unparsed-text
Function signature
$uri | xs:string |
$encoding | xs:string |
Result | xs:string |
fn:unordered
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.
fn:upper-case
Function signature
$srcval | xs:string ? |
Result | xs:string ? |
fn:zero-or-one
Function signature
$srcval | item() * |
Result | item() ? |
Michael H. Kay
14 February 2003