Class StyleSheetFunctionCall
java.lang.Object
com.icl.saxon.expr.Expression
com.icl.saxon.expr.Function
com.icl.saxon.expr.StyleSheetFunctionCall
This class represents a call to a function defined in the stylesheet
-
Field Summary
Fields inherited from class Expression
staticContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEvaluate the functionintDetermine the data type of the expression, if possibleintDetermine which aspects of the context the expression depends on.getName()Get the name of the function.Remove dependencies.voidCreate the reference to the saxon:function elementsimplify()Simplify the function callMethods inherited from class Function
addArgument, checkArgumentCount, display, getNumberOfArgumentsMethods inherited from class Expression
containsReferences, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, setStaticContext, usesCurrent
-
Constructor Details
-
StyleSheetFunctionCall
public StyleSheetFunctionCall()
-
-
Method Details
-
setFunction
Create the reference to the saxon:function element -
getName
-
getDataType
public int getDataType()Determine the data type of the expression, if possible- Specified by:
getDataTypein classExpression- Returns:
- Value.ANY (meaning not known in advance)
-
simplify
Simplify the function call- Overrides:
simplifyin classExpression- Returns:
- the simplified expression
- Throws:
XPathException
-
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- Specified by:
getDependenciesin classExpression
-
reduce
Remove dependencies.- Specified by:
reducein classExpression- Parameters:
dependencies- The dependencies to be removed, e.g. Context.VARIABLEScontext- The context to be used for the partial evaluation- Returns:
- a new expression (or Value) that does not have any of the specified dependencies
- Throws:
XPathException
-
evaluate
Evaluate the function- Specified by:
evaluatein classExpression- Parameters:
c- The context in which the expression is to be evaluatedcontext- The context in which the function is to be evaluated- 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.
-