org.exolab.adaptx.xslt
Interface ScriptHandler
public interface ScriptHandler
An interface for scripting environments
Object | call(String name, Object[] args)- Calls the method with the given name, and set of arguments
|
Object | call(String name, Object[] args, String namespace)- Calls the method with the given name, and set of arguments
|
boolean | createNamespace(String name)- Creates a new namespace with the given name
|
Object | eval(XSLScript xslScript, Node context)- Evaluates the given XSLScript element using the default namespace
|
Object | eval(XSLScript xslScript, Node context, String namespace)- Evaluates the given XSLScript element using the given namespace
|
Object | evalAsFunction(XSLScript xslScript, Node context)- Evaluates the given XSLScript element as a function using the
default namespace.
|
Object | evalAsFunction(XSLScript xslScript, Node context, String namespace)- Evaluates the given XSLScript element as a function using the
given namespace.
|
String | getLanguage()- Returns the name of the language that this ScriptHandler handles
|
boolean | hasDefinedFunction(String name, String namespace)
|
void | initialize(ProcessorCallback pc)- Initializes the scripting environment
|
call
public Object call(String name,
Object[] args) Calls the method with the given name, and set of arguments
name - the name of the method to callargs - the methods arguments
- the result of the method invocation
call
public Object call(String name,
Object[] args,
String namespace) Calls the method with the given name, and set of arguments
name - the name of the method to callargs - the methods argumentsnamespace - the Namespace to use for evaluation
- the result of the method invocation
createNamespace
public boolean createNamespace(String name)
Creates a new namespace with the given name
eval
public Object eval(XSLScript xslScript,
Node context) Evaluates the given XSLScript element using the default namespace
xslScript - the XSLScript to evaluatecontext - the current DOM Node that is the context
of this evaluation.
- the result of the XSLScript evaluation
eval
public Object eval(XSLScript xslScript,
Node context,
String namespace) Evaluates the given XSLScript element using the given namespace
xslScript - the XSLScript to evaluatecontext - the current DOM Node that is the context
of this evaluation.namespace - the Namespace to use for evaluation
- the result of the XSLScript evaluation
evalAsFunction
public Object evalAsFunction(XSLScript xslScript,
Node context) Evaluates the given XSLScript element as a function using the
default namespace.
xslScript - the XSLScript to evaluatecontext - the current DOM Node that is the context
of this evaluation.
- the result of the XSLScript evaluation
evalAsFunction
public Object evalAsFunction(XSLScript xslScript,
Node context,
String namespace) Evaluates the given XSLScript element as a function using the
given namespace.
xslScript - the XSLScript to evaluatecontext - the current DOM Node that is the context
of this evaluation.namespace - the Namespace to use for evaluation
- the result of the XSLScript evaluation
getLanguage
public String getLanguage()
Returns the name of the language that this ScriptHandler handles
- the name of the language that this ScriptHandler handles
hasDefinedFunction
public boolean hasDefinedFunction(String name,
String namespace)
initialize
public void initialize(ProcessorCallback pc)
Initializes the scripting environment
pc - the ProcessorCallback for supporting
access to the RuleProcessor.