Package org.exolab.adaptx.xslt
Interface ScriptHandler
-
public interface ScriptHandler
An interface for scripting environments- Author:
- Keith Visco
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
call(java.lang.String name, java.lang.Object[] args)
Calls the method with the given name, and set of argumentsjava.lang.Object
call(java.lang.String name, java.lang.Object[] args, java.lang.String namespace)
Calls the method with the given name, and set of argumentsboolean
createNamespace(java.lang.String name)
Creates a new namespace with the given namejava.lang.Object
eval(XSLScript xslScript, org.w3c.dom.Node context)
Evaluates the given XSLScript element using the default namespacejava.lang.Object
eval(XSLScript xslScript, org.w3c.dom.Node context, java.lang.String namespace)
Evaluates the given XSLScript element using the given namespacejava.lang.Object
evalAsFunction(XSLScript xslScript, org.w3c.dom.Node context)
Evaluates the given XSLScript element as a function using the default namespace.java.lang.Object
evalAsFunction(XSLScript xslScript, org.w3c.dom.Node context, java.lang.String namespace)
Evaluates the given XSLScript element as a function using the given namespace.java.lang.String
getLanguage()
Returns the name of the language that this ScriptHandler handlesboolean
hasDefinedFunction(java.lang.String name, java.lang.String namespace)
void
initialize(ProcessorCallback pc)
Initializes the scripting environment
-
-
-
Method Detail
-
call
java.lang.Object call(java.lang.String name, java.lang.Object[] args)
Calls the method with the given name, and set of arguments- Parameters:
name
- the name of the method to callargs
- the methods arguments- Returns:
- the result of the method invocation
-
call
java.lang.Object call(java.lang.String name, java.lang.Object[] args, java.lang.String namespace)
Calls the method with the given name, and set of arguments- Parameters:
name
- the name of the method to callargs
- the methods argumentsnamespace
- the Namespace to use for evaluation- Returns:
- the result of the method invocation
-
createNamespace
boolean createNamespace(java.lang.String name)
Creates a new namespace with the given name
-
eval
java.lang.Object eval(XSLScript xslScript, org.w3c.dom.Node context)
Evaluates the given XSLScript element using the default namespace- Parameters:
xslScript
- the XSLScript to evaluatecontext
- the current DOM Node that is the context of this evaluation.- Returns:
- the result of the XSLScript evaluation
-
eval
java.lang.Object eval(XSLScript xslScript, org.w3c.dom.Node context, java.lang.String namespace)
Evaluates the given XSLScript element using the given namespace- Parameters:
xslScript
- the XSLScript to evaluatecontext
- the current DOM Node that is the context of this evaluation.namespace
- the Namespace to use for evaluation- Returns:
- the result of the XSLScript evaluation
-
evalAsFunction
java.lang.Object evalAsFunction(XSLScript xslScript, org.w3c.dom.Node context)
Evaluates the given XSLScript element as a function using the default namespace.- Parameters:
xslScript
- the XSLScript to evaluatecontext
- the current DOM Node that is the context of this evaluation.- Returns:
- the result of the XSLScript evaluation
-
evalAsFunction
java.lang.Object evalAsFunction(XSLScript xslScript, org.w3c.dom.Node context, java.lang.String namespace)
Evaluates the given XSLScript element as a function using the given namespace.- Parameters:
xslScript
- the XSLScript to evaluatecontext
- the current DOM Node that is the context of this evaluation.namespace
- the Namespace to use for evaluation- Returns:
- the result of the XSLScript evaluation
-
getLanguage
java.lang.String getLanguage()
Returns the name of the language that this ScriptHandler handles- Returns:
- the name of the language that this ScriptHandler handles
-
hasDefinedFunction
boolean hasDefinedFunction(java.lang.String name, java.lang.String namespace)
-
initialize
void initialize(ProcessorCallback pc)
Initializes the scripting environment- Parameters:
pc
- the ProcessorCallback for supporting access to the RuleProcessor.
-
-