|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface VariableContext
Resolves variable bindings within an XPath expression.
Variables within an XPath expression are denoted using
notation such as $varName or $nsPrefix:varName, and may
refer to primitive types (Boolean, Number or String),
node-sets or individual XML nodes.
When a variable is bound to a node-set, the
actual Java object returned should be a java.util.List
containing XML nodes from the object-model (dom4j, JDOM, DOM, EXML)
being used with the XPath.
A variable may validly be assigned the null value,
but an unbound variable (one that this context does not know about)
should cause an UnresolvableException to be thrown.
SimpleVariableContext,
NamespaceContext| Method Summary | |
|---|---|
java.lang.Object |
getVariableValue(java.lang.String namespaceURI,
java.lang.String prefix,
java.lang.String localName)
An implementation should return the value of an xpath variable based on the namespace uri and local name of the variable-reference expression. |
| Method Detail |
|---|
java.lang.Object getVariableValue(java.lang.String namespaceURI,
java.lang.String prefix,
java.lang.String localName)
throws UnresolvableException
It must not use the prefix parameter to select a variable, because a prefix could be bound to any namespace; the prefix parameter could be used in debugging output or other generated information. The prefix may otherwise be ignored.
namespaceURI - the namespace uri to which the prefix parameter
is bound in the xpath expression. If the variable
reference expression had no prefix, the namespace
uri is null.prefix - the prefix that was used in the variable reference
expression.localName - the local name of the variable-reference
expression; if there is no prefix, then this is
the whole name of the variable.
null)
UnresolvableException - when the variable cannot be resolved.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||