public class XPathContext extends DTMManager
This class extends DTMManager but does not directly implement it.
| Modifier and Type | Field and Description |
|---|---|
protected DTMManager |
m_dtmManager
Though XPathContext context extends the DTMManager, it really is a proxy for this object, which
is the real DTMManager.
|
static int |
RECURSIONLIMIT
The ammount to use for stacks that record information during the recursive execution.
|
IDENT_DTM_DEFAULT, IDENT_DTM_NODE_BITS, IDENT_MAX_DTMS, IDENT_NODE_DEFAULT| Constructor and Description |
|---|
XPathContext()
Create an XPathContext instance.
|
XPathContext(boolean recursiveVarContext)
Create an XPathContext instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentNode()
Get the current context node.
|
DTM |
getDTM(int nodeHandle)
Get the instance of DTM that "owns" a node handle.
|
DTM |
getDTM(Source source,
boolean unique,
boolean incremental,
boolean doIndexing)
Get an instance of a DTM, loaded with the content from the specified source.
|
int |
getDTMHandleFromNode(Node node)
Given a W3C DOM node, try and return a DTM handle.
|
DTMManager |
getDTMManager()
Return the DTMManager object.
|
ErrorListener |
getErrorListener()
Get the ErrorListener where errors and warnings are to be reported.
|
PrefixResolver |
getNamespaceContext()
Get the current namespace context for the xpath.
|
int |
getPredicatePos() |
SubContextList |
getSubContextList()
Get the current axes iterator, or return null if none.
|
URIResolver |
getURIResolver()
Get the URIResolver associated with this execution context.
|
void |
popCurrentNode()
Pop the current context node.
|
void |
popCurrentNodeAndExpression()
Set the current context node.
|
void |
popNamespaceContext()
Pop the current namespace context for the xpath.
|
void |
popPredicatePos() |
void |
popSubContextList()
Pop the last pushed axes iterator.
|
void |
pushCurrentNode(int n)
Set the current context node.
|
void |
pushCurrentNodeAndExpression(int cn)
Set the current context node and expression node.
|
void |
pushNamespaceContext(PrefixResolver pr)
Push a current namespace context for the xpath.
|
void |
pushPredicatePos(int n) |
void |
pushSubContextList(SubContextList iter)
Push a TreeWalker on the stack.
|
void |
reset()
Reset for new run.
|
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 |
setURIResolver(URIResolver resolver)
Set the URIResolver associated with this execution context.
|
newInstanceprotected DTMManager m_dtmManager
public static final int RECURSIONLIMIT
public XPathContext()
XPathContext(boolean) constructor with the value true.public XPathContext(boolean recursiveVarContext)
recursiveVarContext - A boolean value indicating whether the XPath context
needs to support pushing of scopes for variable resolutionpublic DTMManager getDTMManager()
public DTM getDTM(Source source, boolean unique, boolean incremental, boolean doIndexing)
(More parameters may eventually need to be added for error handling and entity resolution, and to better control selection of implementations.)
getDTM in class DTMManagersource - the specification of the source object, which may be null, in which case it is
assumed that node construction will take by some other means.unique - true if the returned DTM must be unique, probably because it is going to be
mutated.incremental - true if the DTM should be built incrementally, if possible.doIndexing - true if the caller considers it worth it to use indexing schemes.public DTM getDTM(int nodeHandle)
getDTM in class DTMManagernodeHandle - the nodeHandle.public int getDTMHandleFromNode(Node node)
getDTMHandleFromNode in class DTMManagernode - Non-null reference to a DOM node.public void reset()
public final ErrorListener getErrorListener()
public void setErrorListener(ErrorListener listener) throws IllegalArgumentException
listener - A non-null ErrorListener reference.IllegalArgumentExceptionpublic 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 int getCurrentNode()
public final void pushCurrentNodeAndExpression(int cn)
cn - the current node.public final void popCurrentNodeAndExpression()
public final void pushCurrentNode(int n)
n - the current node.public final void popCurrentNode()
public final int getPredicatePos()
public final void pushPredicatePos(int n)
public final void popPredicatePos()
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 pushNamespaceContext(PrefixResolver pr)
pr - the prefix resolver to be used for resolving prefixes to namespace URLs.public final void popNamespaceContext()
public final void pushSubContextList(SubContextList iter)
iter - A sub-context AxesWalker.public final void popSubContextList()
public SubContextList getSubContextList()
Copyright © 2022–2024 HtmlUnit. All rights reserved.