All Packages Class Hierarchy This Package Previous Next Index
Class com.kvisco.scripting.ECMAScriptHandler
com.kvisco.scripting.ECMAScriptHandler
- public class ECMAScriptHandler
- implements ScriptHandler
An implementation of ScriptHandler for ECMAScript
- Author:
- Keith Visco (kvisco@ziplink.net)
- See Also:
- ScriptHandler
-
ECMASCRIPT
-
-
ECMAScriptHandler()
- Creates a new ECMAScriptHandler.
-
ECMAScriptHandler(ProcessorCallback)
-
-
call(String, Object[])
- Calls the method with the given name, and set of arguments
-
call(String, Object[])
- Calls the method with the given name, and set of arguments
-
call(String, Object[], String)
- Calls the method with the given name, and set of arguments
-
call(String, Object[], String)
- Calls the method with the given name, and set of arguments
-
createNamespace(String)
- Creates a new namespace with the given name
-
createNamespace(String)
- Creates a Function Namespace using the given name
-
eval(XSLScript, Node)
- Evaluates the given XSLScript element using the default namespace
-
eval(XSLScript, Node, String)
- Evaluates the given XSLScript element using the given namespace
-
eval(XSLScript, Node, String)
- Evaluates the given XSLScript element using the given namespace
-
evalAsFunction(XSLScript, Node)
- Evaluates the given XSLScript element as a function using the
default namespace.
-
evalAsFunction(XSLScript, Node, String)
- Evaluates the given XSLScript element as a function using the
given namespace.
-
evalAsFunction(XSLScript, Node, String)
- Evaluates the given XSLScript element as a function using the
given namespace.
-
getLanguage()
- Returns the name of the language that this ScriptHandler handles
-
getLanguage()
- Returns the name of the language that this ScriptHandler handles
-
hasDefinedFunction(String, String)
-
-
hasDefinedFunction(String, String)
-
-
initialize(ProcessorCallback)
- Initializes the scripting environment.
ECMASCRIPT
public static final String ECMASCRIPT
ECMAScriptHandler
public ECMAScriptHandler()
- Creates a new ECMAScriptHandler. This handler will not
be initialized. A call to #initialize will be needed
before using.
ECMAScriptHandler
public ECMAScriptHandler(ProcessorCallback pc)
call
public Object call(String name,
Object args[])
- Calls the method with the given name, and set of arguments
- Parameters:
- name - the name of the method to call
- args - the methods arguments
- Returns:
- 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
- Parameters:
- name - the name of the method to call
- args - the methods arguments
- namespace - the Namespace to use for evaluation
- Returns:
- the result of the method invocation
createNamespace
public boolean createNamespace(String name)
- Creates a Function Namespace using the given name
- Parameters:
- name - the name of the Namespace to create
getLanguage
public String getLanguage()
- Returns the name of the language that this ScriptHandler handles
- Returns:
- the name of the language that this ScriptHandler handles
hasDefinedFunction
public boolean hasDefinedFunction(String name,
String namespace)
initialize
public void initialize(ProcessorCallback processorCallback)
- Initializes the scripting environment.
eval
public Object eval(XSLScript xslScript,
Node current)
- Evaluates the given XSLScript element using the default namespace
- Parameters:
- xslScript - the XSLScript to evaluate
- context - the current DOM Node that is the context
of this evaluation.
- Returns:
- the result of the XSLScript evaluation
eval
public Object eval(XSLScript xslScript,
Node current,
String namespace)
- Evaluates the given XSLScript element using the given namespace
- Parameters:
- xslScript - the XSLScript to evaluate
- context - 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
public Object evalAsFunction(XSLScript xslScript,
Node current)
- Evaluates the given XSLScript element as a function using the
default namespace.
- Parameters:
- xslScript - the XSLScript to evaluate
- context - 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
public Object evalAsFunction(XSLScript xslScript,
Node current,
String namespace)
- Evaluates the given XSLScript element as a function using the
given namespace.
- Parameters:
- xslScript - the XSLScript to evaluate
- context - 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
All Packages Class Hierarchy This Package Previous Next Index