com.icl.saxon.expr

Class Function

public abstract class Function extends Expression

Abstract superclass for system-defined and user-defined functions
Field Summary
protected Expression[]argument
Method Summary
voidaddArgument(Expression expr)
Method to add an argument during function definition.
protected intcheckArgumentCount(int min, int max)
Check number of arguments.
voiddisplay(int level)
Diagnostic print of expression structure
abstract StringgetName()
Get the name of the function.
intgetNumberOfArguments()
Determine the number of actual arguments supplied in the function call

Field Detail

argument

protected Expression[] argument

Method Detail

addArgument

public void addArgument(Expression expr)
Method to add an argument during function definition.

checkArgumentCount

protected int checkArgumentCount(int min, int max)
Check number of arguments.
A convenience routine for use in subclasses.

Parameters: min the minimum number of arguments allowed max the maximum number of arguments allowed

Returns: the actual number of arguments

Throws: XPathException if the number of arguments is out of range

display

public void display(int level)
Diagnostic print of expression structure

getName

public abstract String getName()
Get the name of the function. This method must be implemented in all subclasses.

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

getNumberOfArguments

public int getNumberOfArguments()
Determine the number of actual arguments supplied in the function call