|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xpath.XPathContext
**For advanced use only** Default class for the runtime execution context for XPath.
Field Summary | |
XMLReader |
m_primaryReader
The reader of the primary source tree. |
Constructor Summary | |
XPathContext()
Create an XPathContext instance. |
|
XPathContext(java.lang.Object owner)
Create an XPathContext instance. |
Method Summary | |
Node |
getContextNode()
Get the current context node. |
ContextNodeList |
getContextNodeList()
Get the current context node list. |
NodeIterator |
getContextNodes()
Get the current context node list. |
Node |
getCurrentExpressionNode()
Get the current node that is the expression's context (i.e. |
Node |
getCurrentNode()
Get the current context node. |
DOMHelper |
getDOMHelper()
Get the DOMHelper associated with this execution context. |
ErrorListener |
getErrorListener()
Get the ErrorListener where errors and warnings are to be reported. |
ExtensionsTable |
getExtensionsTable()
Get the extensions table object. |
PrefixResolver |
getNamespaceContext()
Get the current namespace context for the xpath. |
java.lang.Object |
getOwnerObject()
Get the "owner" context of this context, which should be, in the case of XSLT, the Transformer object. |
XMLReader |
getPrimaryReader()
Get primary XMLReader associated with this execution context. |
SourceLocator |
getSAXLocator()
Get the current locater in the stylesheet. |
SourceTreeManager |
getSourceTreeManager()
Get the SourceTreeManager associated with this execution context. |
SubContextList |
getSubContextList()
**For internal use only** Get the current axes iterator, or return null if none. |
URIResolver |
getURIResolver()
Get the URIResolver associated with this execution context. |
XObject |
getVariable(QName qname)
Given a name, locate a variable in the current context, and return the Object. |
VariableStack |
getVarStack()
Get the variable stack, which is in charge of variables and parameters. |
void |
popContextNodeList()
**For internal use only** Pop the current context node list. |
void |
popCurrentExpressionNode()
Pop the current node that is the expression's context (i.e. |
void |
popCurrentNode()
Pop the current context node. |
void |
popCurrentNodeAndExpression()
Set the current context node. |
void |
popSubContextList()
**For internal use only** Pop the last pushed axes iterator. |
void |
pushContextNodeList(ContextNodeList nl)
**For internal use only** Set the current context node list. |
void |
pushCurrentExpressionNode(Node n)
Set the current node that is the expression's context (i.e. |
void |
pushCurrentNode(Node n)
Set the current context node. |
void |
pushCurrentNodeAndExpression(Node cn,
Node en)
Set the current context node and expression node. |
void |
pushSubContextList(SubContextList iter)
**For internal use only** Push a TreeWalker on the stack. |
void |
reset()
Reset for new run. |
void |
setDOMHelper(DOMHelper helper)
Set the DOMHelper associated with this execution context. |
void |
setErrorListener(ErrorListener listener)
Set the ErrorListener where errors and warnings are to be reported. |
void |
setNamespaceContext(PrefixResolver pr)
Get the current namespace context for the xpath. |
void |
setPrimaryReader(XMLReader reader)
Set primary XMLReader associated with this execution context. |
void |
setSAXLocator(SourceLocator location)
Set the current locater in the stylesheet. |
void |
setSourceTreeManager(SourceTreeManager mgr)
Set the SourceTreeManager associated with this execution context. |
void |
setURIResolver(URIResolver resolver)
Set the URIResolver associated with this execution context. |
void |
setVarStack(VariableStack varStack)
Get the variable stack, which is in charge of variables and parameters. |
double |
toNumber(Node n)
Get the value of a node as a number. |
java.lang.String |
toString(Node n)
Get the value of a node as a string. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public XMLReader m_primaryReader
Constructor Detail |
public XPathContext()
public XPathContext(java.lang.Object owner)
owner
- Value that can be retrieved via the getOwnerObject() method.getOwnerObject()
Method Detail |
public void reset()
public void setSAXLocator(SourceLocator location)
location
- The location within the stylesheet.public SourceLocator getSAXLocator()
public java.lang.Object getOwnerObject()
public ExtensionsTable getExtensionsTable()
public VariableStack getVarStack()
public void setVarStack(VariableStack varStack)
varStack
- non-null reference to the variable stack.public XObject getVariable(QName qname) throws TransformerException
qname
- The qualified name of a variable.public final DOMHelper getDOMHelper()
public void setDOMHelper(DOMHelper helper)
helper
- reference to a dom helper to be associated with this
execution context.public final SourceTreeManager getSourceTreeManager()
public void setSourceTreeManager(SourceTreeManager mgr)
mgr
- the SourceTreeManager to be associated with this
execution context.public final ErrorListener getErrorListener()
public void setErrorListener(ErrorListener listener) throws java.lang.IllegalArgumentException
listener
- A non-null ErrorListener reference.public final URIResolver getURIResolver()
public void setURIResolver(URIResolver resolver)
resolver
- the URIResolver to be associated with this
execution context, may be null to clear an already set resolver.public final XMLReader getPrimaryReader()
public void setPrimaryReader(XMLReader reader)
reader
- The reader of the primary source tree.public final ContextNodeList getContextNodeList()
public final void pushContextNodeList(ContextNodeList nl)
nl
- the current node list,
also refered to here as a public final void popContextNodeList()
public final Node getCurrentNode()
public final void pushCurrentNodeAndExpression(Node cn, Node en)
cn
- the current node.en
- the sub-expression context node.public final void popCurrentNodeAndExpression()
public final void pushCurrentNode(Node n)
n
- the current node.public final void popCurrentNode()
public final Node getCurrentExpressionNode()
public final void pushCurrentExpressionNode(Node n)
n
- The sub-expression node to be current.public final void popCurrentExpressionNode()
public final PrefixResolver getNamespaceContext()
public final void setNamespaceContext(PrefixResolver pr)
pr
- the prefix resolver to be used for resolving prefixes to
namespace URLs.public final void pushSubContextList(SubContextList iter)
iter
- A sub-context AxesWalker.public final void popSubContextList()
public SubContextList getSubContextList()
public final Node getContextNode()
public final NodeIterator getContextNodes()
public final double toNumber(Node n)
n
- Node to be converted to a number. May be null.public final java.lang.String toString(Node n)
n
- Node to be converted to a string. May be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |