com.icl.saxon.expr

Class StyleSheetFunctionCall


public class StyleSheetFunctionCall
extends Function

This class represents a call to a function defined in the stylesheet

Field Summary

Fields inherited from class com.icl.saxon.expr.Function

argument

Fields inherited from class com.icl.saxon.expr.Expression

staticContext

Method Summary

Value
evaluate(Context c)
Evaluate the function
int
getDataType()
Determine the data type of the expression, if possible
int
getDependencies()
Determine which aspects of the context the expression depends on.
String
getName()
Get the name of the function.
Expression
reduce(int dependencies, Context context)
Remove dependencies.
void
setFunction(SAXONFunction f)
Create the reference to the saxon:function element
Expression
simplify()
Simplify the function call

Methods inherited from class com.icl.saxon.expr.Function

addArgument, checkArgumentCount, display, getName, getNumberOfArguments

Methods inherited from class com.icl.saxon.expr.Expression

containsReferences, display, enumerate, evaluate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getDataType, getDependencies, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, reduce, setStaticContext, simplify, usesCurrent

Method Details

evaluate

public Value evaluate(Context c)
            throws XPathException
Evaluate the function
Overrides:
evaluate in interface Expression

Parameters:

Returns:
a Value representing the result of the function. This must be of the data type corresponding to the result of getType().

Throws:
XPathException - if the function cannot be evaluated.


getDataType

public int getDataType()
Determine the data type of the expression, if possible
Overrides:
getDataType in interface Expression

Returns:
Value.ANY (meaning not known in advance)


getDependencies

public int getDependencies()
Determine which aspects of the context the expression depends on. The result is a bitwise-or'ed value composed from constants such as Context.VARIABLES and Context.CURRENT_NODE
Overrides:
getDependencies in interface Expression


getName

public String getName()
Get the name of the function.
Overrides:
getName in interface Function

Returns:
the name of the function, as used in XSL expressions, but excluding its namespace prefix


reduce

public Expression reduce(int dependencies,
                         Context context)
            throws XPathException
Remove dependencies.
Overrides:
reduce in interface Expression


setFunction

public void setFunction(SAXONFunction f)
Create the reference to the saxon:function element


simplify

public Expression simplify()
            throws XPathException
Simplify the function call
Overrides:
simplify in interface Expression