org.jaxen
public class SimpleVariableContext extends Object implements VariableContext, Serializable
VariableContext
.
This is a simple table-based key-lookup implementation
for VariableContext
which can be programmatically
extended by setting additional variables.
Field Summary | |
---|---|
static long | serialVersionUID |
Map | variables Table of variable bindings. |
Constructor Summary | |
---|---|
SimpleVariableContext() Construct.
|
Method Summary | |
---|---|
Object | getVariableValue(String namespaceURI, String prefix, String localName) |
void | setVariableValue(String namespaceURI, String localName, Object value) Set the value associated with a variable.
|
void | setVariableValue(String localName, Object value) Set the value associated with a variable.
|
Create a new empty variable context.
This method sets a variable that is
associated with a particular namespace.
These variables appear such as $prefix:foo
in an XPath expression. Prefix to URI resolution
is the responsibility of a NamespaceContext
.
Variables within a VariableContext
are
referred to purely based upon their namespace URI,
if any.
Parameters: namespaceURI the namespace URI of the variable localName the local name of the variable value The value to be bound to the variable
This method sets a variable that is not
associated with any particular namespace.
These variables look like $foo
in an XPath expression.
Parameters: localName the local name of the variable value the value to be bound to the variable