org.jaxen
public class SimpleFunctionContext extends Object implements FunctionContext
FunctionContext.
This is a simple table-based key-lookup implementation
for FunctionContext which can be programmatically
extended by registering additional functions.
| Field Summary | |
|---|---|
| HashMap | functions Table of functions. |
| Constructor Summary | |
|---|---|
| SimpleFunctionContext() Construct an empty function context. | |
| Method Summary | |
|---|---|
| Function | getFunction(String namespaceURI, String prefix, String localName) |
| void | registerFunction(String namespaceURI, String localName, Function function) Register a new function.
|
Construct an empty function context.
By registering a new function, any XPath expression
that utilizes this FunctionContext may
refer to and use the new function.
Functions may exist either in a namespace or not.
Namespace prefix-to-URI resolution is the responsibility
of a NamespaceContext. Within this FunctionContext
functions are only referenced using the URI, not
the prefix.
The namespace URI of a function may be null
to indicate that it exists without a namespace.
Parameters: namespaceURI the namespace URI of the function to be registered with this context localName the non-prefixed local portion of the function to be registered with this context function a Function implementation object to be used when evaluating the function