Package net.sf.saxon.functions
This package provides implementations of all the core functions available for use
in XPath expressions. This includes all the functions defined in the XPath 2.0
Functions and Operators specification, as well as the additional functions
defined for use in XSLT. The package also includes Saxon extension functions. Most
of these are in a single class Extensions
, but some of the more
complex functions are in their own classes, for example Evaluate
implements
saxon:evaluate()
.
There is one class for group of closely-related functions. These all inherit from the class
net.sf.saxon.expr.Function. The class StandardFunction
is used to map a function
name to its implementation; it contains tables of information describing the signature of each
function, so that the type-checking code is completely generic.
The package also contains machinery for defining user extension functions. A collection
of functions is represented by a FunctionLibrary
object. There are several
standard function libraries available, covering core functions, Saxon extension functions
constructor functions, and user extension functions: each category is covered by a subclass
of FunctionLibrary
, and there is also a FunctionLibraryList
that
represents the total collection of functions in these individual libraries. The
JavaExtensionLibrary
contains the logic for binding Java extension functions
given their name and arity and the types of their arguments. The class ExtensionFunctionCall
contains the run-time logic for converting XPath values to the required Java types, and for converting
the result back to an XPath value.
These classes, although public, will not normally be used directly by user-written
Java applications. There are a few exceptions, such as ResolveURI
which deliberately
expose functionality equivalent to the XPath function in a static method.
-
ClassDescriptionThis class implements the fn:abs() functionAbstract superclass (and factory class) for implementations of FunctionThis class supports the get_X_from_Y functions defined in XPath 2.0Elaborator for accessor functions such as hours-from-date-Time, minutes-from-durationNon-streaming implementation of accumulator-before() and accumulator-after()This class implements the XPath 2.0 functions adjust-date-to-timezone(), adjust-time-timezone(), and adjust-dateTime-timezone(), with a single argumentThis class implements the XPath 2.0 functions adjust-date-to-timezone(), adjust-time-timezone(), and adjust-dateTime-timezone(), with two argumentsThis abstract class provides functionality common to the sum(), avg(), count(), exists(), and empty() functions.Implements the fn:analyze-string function defined in XPath 3.0.This class implements the function fn:apply(), which is a standard function in XQuery 3.1.Implements the XPath 4.0 fn:atomic-equal() function.Implementation of the fn:avg functionThis class implements the fn:base-uri() function in XPath 2.0Elaborator for simple string-valued properties of nodes such as name(), local-name(), namespace-uri(), and generate-id()This class supports the XPath function boolean()A function item that wraps a CallableThis class supports the ceiling() functionImplements the XPath 2.0 fn:codepoint-equal() function.This class implements the function fn:codepoints-to-string()Abstract superclass for functions that take an optional collation argument, in which the collation is not present as an explicit argument, either because it was defaulted in the original function call, or because it has been bound during static analysis.Generic class for all functions that take an optional collation argument, where the collation argument is supplied and has not yet been resolved.Implements the collation-key function defined in the XSLT 3.0 and XPath 3.1 specificationsImplement the fn:collection() function.This class implements the XPath 2.0 fn:compare() functionImplementation of the fn:concat() functionImplementation of the fn:concat() function as defined in XPath 2.0, 3.0, and 3.1A ConstantFunction is a zero-argument function that always delivers the same result, supplied at the time the function is instantiated.Implements the fn:contains() function, with the collation already knownExpression elaborator for a call to contains(), starts-with(), or ends-with()Implements the fn:contains-token() function with the collation already bound.A ContextAccessorFunction is a function that is dependent on the dynamic context.A ContextItemAccessorFunction is a function that takes no arguments, but operates implicitly on the context item.Subclass of ContextItemAccessorFunction to handle number().Subclass of ContextItemAccessorFunction to handle string-length() and normalize-space().XSLT 3.0 function copy-of().Implementation of the fn:count functionImplement the XSLT current() functionImplements the XSLT function current-group()Implements the XSLT function current-group()Implements the XSLT function current-grouping-key()Implements the XSLT function current-grouping-key()Implements the XSLT 3.0 function current-merge-group()Implements the XSLT function current-grouping-key()This class implements the XSLT 3.0 function current-output-uri()Implement XPath function fn:data() with a single argumentThis class supports the dateTime($date, $time) functionXSLT 2.0 deep-equal() function, where the collation is already known.The XPath 2.0 distinct-values() function, with the collation argument already knownIterator class to return the distinct values in a sequenceImplement the fn:doc() function - a simplified form of the Document functionImplement the saxon:doc() function - a variant of the fn:doc function with a second argument to supply option parameters.Implement the fn:doc-available() functionImplements the XSLT document() functionThis class supports the document-uri() functionA DynamicContextAccessor is a function that takes no arguments, but operates implicitly on the dynamic context.This class supports the XSLT element-available function.Implementation of the fn:empty functionThis class supports the function fn:encode-for-uri()Implements the fn:ends-with() function, with the collation already fixedImplement the XPath 3.0 fn:environment-variable() functionImplement XPath function fn:error()This class supports the function fn:escape-html-uri()An ExecutableFunctionLibrary is a function library that contains definitions of functions for use at run-time.Implementation of the fn:exists functionThis class implements the fn:floor() functionImplementation of aggregate functions such as sum() and avg() that supply a fold() function.Implement the format-date(), format-time(), and format-dateTime() functions in XSLT 2.0 and XQuery 1.1.Implementation of format-number() function.Inner class to represent one sub-picture (the negative or positive subpicture)This class implements the XSLT function-available functions.A FunctionLibrary handles the binding of function calls in XPath (or XQuery) expressions.A FunctionLibraryList is a list of FunctionLibraries.This class supports the generate-id() function with one argumentThis class implements the function fn:has-children($node), which is a standard function in XPath 3.0This class implements the function fn:head(), which is a standard function in XPath 3.0The XPath 2.0 index-of() function, with the collation already knownThis class implements the function fn:has-children(), which is a standard function in XPath 3.0This class implements the XPath 2.0 function fn:in-scope-prefixes()The XPath 2.0 insert-before() functionInsertion iterator.Expression representing a call to a user-written extension function implemented as a subtype of
ExtensionFunctionCall
This class checks that NodeInfo objects returned by an extension function were created under the right ConfigurationA library of integrated function calls, that is, user-written extension functions implemented as instances of the classExtensionFunctionDefinition
.This class supports the functions encode-for-uri() and iri-to-uri()This class implements the saxon:is-idref() extension function, which is specially-recognized by the system because calls are generated by the optimizer.This class supports the local-name() functionThis class implements the fn:lower-case() functionThis class implements the 3-argument matches() function for regular expression matchingAbstract class providing functionality common to functions math:sin(), math:cos(), math:sqrt() etc; contains the concrete implementations of these functions as inner subclassesImplement math:atan2Implement math:piImplement math:powGeneric superclass for all the arity-1 trig functionsThis class implements the min() and max() functions, with the collation argument already known.Concrete subclass to define the fn:max() functionConcrete subclass to define the fn:min() functionThis class supports the name() function with one argumentThis class supports the function namespace-uri-for-prefix()This class supports the namespace-uri() functionElaborator for the namespace-uri() functionThis class supports the nilled() functionThis class supports the node-name() function with a single argumentElaborator for the fn:node-name() functionImplement the XPath normalize-space() functionImplement the XPath normalize-unicode() function (both the 1-argument and 2-argument versions)This class supports the XPath functions boolean(), not(), true(), and false()Implements the XPath fn:number() function when called with one argument.This class implements the rules for options parameters, as used in functions such as parse-json, serialize, json-to-XML, map:merge.This class implements the function fn:outermost(), which is a standard function in XPath 3.0This class implements the function parse-ietf-date(), which is a standard function in XPath 3.1Implement the fn:path function with one argumentInterface implemented by functions that have a "push" implementation, whereby the result of the function is written incrementally to anOutputter
rather than being returned as the result of acall()
method.Implements the fn:put() function in XQuery Update 1.0.This class supports the fn:QName() functionThis class implements any of the functions matches(), replace(), tokenize(), analyze-string(), in the version where a flags argument is present in the argument listThis class implements any of the functions matches(), replace(), tokenize(), analyze-string(), in which the final "flags" argument is omitted.The XPath 2.0 remove() functionAn implementation of SequenceIterator that returns all items except the one at a specified position.This class implements the replace() function for replacing substrings that match a regular expressionThis class supports the resolve-QName function in XPath 2.0This class supports the resolve-uri() function in XPath 2.0Implement XPath function fn:reverse()Implement the XPath 2.0 root() function with one argumentThis class implements the fn:round() functionThis class supports the round-to-half-even() functionImplements the saxon:deep-equal() function, a variant of fn:deep-equal that provides additional control over how the comparison is performed.A Scalar system function is a pure function that accepts a single item as its operand, returns a single atomic value as its result, typically returns an empty sequence if the argument is an empty sequence, and has no context dependencies.Implementation of fn:serialize() as defined in XPath 3.1XSLT 3.0 function snapshot().This class implements the function fn:sort#1, which is a standard function in XPath 3.1This class implements the function fn:sort#2, according to the new XPath 3.1 spec in bug 29792Implements the fn:starts-with() function, with the collation already knownImplement the XPath function static-base-uri()A StaticContextAccessor is a function that takes no arguments, but operates implicitly on the static context.Implement the XPath function default-collation()This class implements the XSLT 3.0 function stream-available()Implement XPath function string() with a single argumentfn:string-join(string* $sequence, string $separator)Implement the XPath string-length() functionThis class supports the function string-to-codepoints()Implements the XPath 2.0 subsequence() function with two argumentsImplements the XPath 2.0 subsequence() function with three argumentsThis class implements the XPath substring() functionImplements the fn:substring-after() function with the collation already knownImplements the fn:substring-before() function with the collation already knownImplementation of the fn:sum functionImplementation of Fold class to do the summation in push modeThe XPath id() or element-with-id() function XPath 2.0 version: accepts any sequence as the first parameter; each item in the sequence is taken as an IDREFS value, that is, a space-separated list of ID values.Abstract superclass for calls to functions in the standard function libraryImplementation of the XSLT system-property() functionThis class implements the function fn:tail(), which is a standard function in XPath 3.0This class implements the single-argument tokenize() function introduced in XPath 3.1This class implements the 3-argument tokenize() function for regular expression matching.This class supports the XPath 2.0 function trace().This class implements the function transform(), which is a standard function in XPath 3.1Implement the XPath translate() functionThis class supports the XPath 2.0 functions exactly-one(), one-or-more(), zero-or-one().This class supports the XSLT fn:type-available() function.XPath 2.0 unordered() functionImplements the unparsed-entity-uri() function defined in XSLT 1.0 and the unparsed-entity-public-id() function defined in XSLT 2.0Implementation of fn:unparsed-text() - with one argument or twoAbstract superclass containing common code supporting the functions unparsed-text(), unparsed-text-lines(), and unparsed-text-available()This class implements the fn:upper-case() functionImplement the fn:uri-collection() function (new in XQuery 3.0/XSLT 3.0).A set of query parameters on a URI passed to the collection() or document() functionA FilenameFilter that tests file names against a regular expression