jd.xml.xpath
Class XPathContext

java.lang.Object
  extended byjd.xml.xpath.XPathContext
Direct Known Subclasses:
XsltContext

public class XPathContext
extends Object

A XPath context.


Nested Class Summary
static class XPathContext.State
          State represents the state information of a XPathContext.
 
Constructor Summary
XPathContext()
          Create a XPathContext.
 
Method Summary
 XPathNode getNode()
          Return the context node.
 int getPosition()
          Return the context position.
 int getSize()
          Return the context size.
 XObject getVariable(VariableName name)
          Return a variable value.
 void restoreState()
          Restore the last state.
 void setNextNode(XPathNode node)
          Set the context node and increase the position by 1.
 void setNode(XPathNode node)
          Set the context node.
 void setPosition(int position)
          Set the context position.
 void setSize(int size)
          Set the context size.
 void startNewState()
          Backup the current state and start a new one.
 void startNewState(XPathContext.State state)
          Backup the current state and start a new one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathContext

public XPathContext()
Create a XPathContext.

Method Detail

getNode

public final XPathNode getNode()
Return the context node.


setNode

public final void setNode(XPathNode node)
Set the context node.


setNextNode

public final void setNextNode(XPathNode node)
Set the context node and increase the position by 1.


getPosition

public final int getPosition()
Return the context position.


setPosition

public final void setPosition(int position)
Set the context position.


getSize

public final int getSize()
Return the context size.


setSize

public final void setSize(int size)
Set the context size.


startNewState

public final void startNewState()
Backup the current state and start a new one.

See Also:
restoreState()

startNewState

public final void startNewState(XPathContext.State state)
Backup the current state and start a new one.

See Also:
restoreState()

restoreState

public final void restoreState()
Restore the last state.

See Also:
startNewState()

getVariable

public XObject getVariable(VariableName name)
Return a variable value.