Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xpath
Class XPathContext

    java.lang.Object
      |
      +--org.apache.xpath.XPathContext

public class XPathContext
extends java.lang.Object
implements ExpressionContext

**For advanced use only** Default class for the runtime execution context for XPath.

Field Summary
`XMLReader` | `m_primaryReader` **For advanced use only**

Constructor Summary
`XPathContext()` **For advanced use only** Create an XPathContext instance.
`XPathContext(java.lang.Object owner)` **For advanced use only** Create an XPathContext instance.

Method Summary
`void` | `copyFromOtherLiaison(XPathContext from)` **For advanced use only** Copy attributes from another liaison.
`java.lang.String` | `getAbsoluteURI(java.lang.String urlString, java.lang.String base)` **For advanced use only** Take a user string (system ID) return the url.
`Node` | `getContextNode()` **For advanced use only** Get the current context node.
`ContextNodeList` | `getContextNodeList()` **For advanced use only** Get the current context node list.
`NodeIterator` | `getContextNodes()` **For advanced use only** Get the current context node list.
`Node` | `getCurrentExpressionNode()` **For advanced use only** Get the current node that is the expression's context (i.e.
`Node` | `getCurrentNode()` **For advanced use only** Get the current context node.
`DOMHelper` | `getDOMHelper()` **For advanced use only** Get the DOMHelper associated with this execution context.
`ExtensionsTable` | `getExtensionsTable()` **For advanced use only** Get the extensions table object.
`PrefixResolver` | `getNamespaceContext()` **For advanced use only** Get the current namespace context for the xpath.
`java.lang.Object` | `getOwnerObject()` **For advanced use only** Get the "owner" context of this context, which should be, in the case of XSLT, the Transformer object.
`XMLReader` | `getPrimaryReader()` **For advanced use only** Get primary XMLReader associated with this execution context.
`Locator` | `getSAXLocator()` **For advanced use only**
`SourceTreeManager` | `getSourceTreeManager()` **For advanced use only** Get the DOMHelper associated with this execution context.
`SubContextList` | `getSubContextList()` **For internal use only** Get the current axes iterator, or return null if none.
`URIResolver` | `getURIResolver()` **For advanced use only** Get the URIResolver associated with this execution context.
`XObject` | `getVariable(QName qname)` **For advanced use only** Given a name, locate a variable in the current context, and return the Object.
`VariableStack` | `getVarStack()` **For advanced use only** 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()` **For advanced use only** Pop the current node that is the expression's context (i.e.
`void` | `popCurrentNode()` **For advanced use only** Pop the current context node.
`void` | `popCurrentNodeAndExpression()` **For advanced use only** 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)` **For advanced use only** Set the current node that is the expression's context (i.e.
`void` | `pushCurrentNode(Node n)` **For advanced use only** Set the current context node.
`void` | `pushCurrentNodeAndExpression(Node cn, Node en)` **For advanced use only** Set the current context node.
`void` | `pushSubContextList(SubContextList iter)` **For internal use only** Push a TreeWalker on the stack.
`void` | `reset()` **For advanced use only** Reset for new run.
`void` | `setDOMHelper(DOMHelper helper)` **For advanced use only** Set the DOMHelper associated with this execution context.
`void` | `setNamespaceContext(PrefixResolver pr)` **For advanced use only** Get the current namespace context for the xpath.
`void` | `setPrimaryReader(XMLReader reader)` **For advanced use only** Set primary XMLReader associated with this execution context.
`void` | `setSAXLocator(Locator location)` **For advanced use only**
`void` | `setSourceTreeManager(SourceTreeManager mgr)` **For advanced use only** Set the DOMHelper associated with this execution context.
`void` | `setURIResolver(URIResolver resolver)` **For advanced use only** Set the URIResolver associated with this execution context.
`void` | `setVarStack(VariableStack varStack)` **For advanced use only** Get the variable stack, which is in charge of variables and parameters.
`double` | `toNumber(Node n)` **For advanced use only** Get the value of a node as a number.
`java.lang.String` | `toString(Node n)` **For advanced use only** 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

### m_primaryReader

    public XMLReader m_primaryReader

Constructor Detail

### XPathContext

    public XPathContext()

  **For advanced use only** Create an XPathContext instance.

### XPathContext

    public XPathContext(java.lang.Object owner)

  **For advanced use only** Create an XPathContext instance.
  Parameters:
    `owner` - Value that can be retreaved via the getOwnerObject() method.
  See Also:
    `getOwnerObject`

Method Detail

### copyFromOtherLiaison

    public void copyFromOtherLiaison(XPathContext from)
                              throws SAXException

  **For advanced use only** Copy attributes from another liaison.

### reset

    public void reset()

  **For advanced use only** Reset for new run.

### setSAXLocator

    public void setSAXLocator(Locator location)

### getSAXLocator

    public Locator getSAXLocator()

### getOwnerObject

    public java.lang.Object getOwnerObject()

  **For advanced use only** Get the "owner" context of this context, which should be, in the case of XSLT, the Transformer object. This is needed so that XSLT functions can get the Transformer.
  Returns:
    The owner object passed into the constructor, or null.

### getExtensionsTable

    public ExtensionsTable getExtensionsTable()

  **For advanced use only** Get the extensions table object.

### getVarStack

    public VariableStack getVarStack()

  **For advanced use only** Get the variable stack, which is in charge of variables and parameters.

### setVarStack

    public void setVarStack(VariableStack varStack)

  **For advanced use only** Get the variable stack, which is in charge of variables and parameters.

### getVariable

    public XObject getVariable(QName qname)
                        throws SAXException

  **For advanced use only** Given a name, locate a variable in the current context, and return the Object.

### getDOMHelper

    public final DOMHelper getDOMHelper()

  **For advanced use only** Get the DOMHelper associated with this execution context.

### setDOMHelper

    public void setDOMHelper(DOMHelper helper)

  **For advanced use only** Set the DOMHelper associated with this execution context.

### getSourceTreeManager

    public final SourceTreeManager getSourceTreeManager()

  **For advanced use only** Get the DOMHelper associated with this execution context.

### setSourceTreeManager

    public void setSourceTreeManager(SourceTreeManager mgr)

  **For advanced use only** Set the DOMHelper associated with this execution context.

### getURIResolver

    public final URIResolver getURIResolver()

  **For advanced use only** Get the URIResolver associated with this execution context.

### setURIResolver

    public void setURIResolver(URIResolver resolver)

  **For advanced use only** Set the URIResolver associated with this execution context.

### getPrimaryReader

    public final XMLReader getPrimaryReader()

  **For advanced use only** Get primary XMLReader associated with this execution context.

### setPrimaryReader

    public void setPrimaryReader(XMLReader reader)

  **For advanced use only** Set primary XMLReader associated with this execution context.

### getAbsoluteURI

    public final java.lang.String getAbsoluteURI(java.lang.String urlString,
                                                 java.lang.String base)
                                          throws SAXException

  **For advanced use only** Take a user string (system ID) return the url.
  Throws:
    XSLProcessorException - thrown if the active ProblemListener and XPathContext decide the error condition is severe enough to halt processing.

### getContextNodeList

    public final ContextNodeList getContextNodeList()

  **For advanced use only** Get the current context node list.

### pushContextNodeList

    public final void pushContextNodeList(ContextNodeList nl)

  **For internal use only** Set the current context node list.
  Parameters:
    `A` - nodelist that represents the current context list as defined by XPath.

### popContextNodeList

    public final void popContextNodeList()

  **For internal use only** Pop the current context node list.

### getCurrentNode

    public final Node getCurrentNode()

  **For advanced use only** Get the current context node.

### pushCurrentNodeAndExpression

    public final void pushCurrentNodeAndExpression(Node cn,
                                                   Node en)

  **For advanced use only** Set the current context node.

### popCurrentNodeAndExpression

    public final void popCurrentNodeAndExpression()

  **For advanced use only** Set the current context node.

### pushCurrentNode

    public final void pushCurrentNode(Node n)

  **For advanced use only** Set the current context node.

### popCurrentNode

    public final void popCurrentNode()

  **For advanced use only** Pop the current context node.

### getCurrentExpressionNode

    public final Node getCurrentExpressionNode()

  **For advanced use only** Get the current node that is the expression's context (i.e. for current() support).

### pushCurrentExpressionNode

    public final void pushCurrentExpressionNode(Node n)

  **For advanced use only** Set the current node that is the expression's context (i.e. for current() support).

### popCurrentExpressionNode

    public final void popCurrentExpressionNode()

  **For advanced use only** Pop the current node that is the expression's context (i.e. for current() support).

### getNamespaceContext

    public final PrefixResolver getNamespaceContext()

  **For advanced use only** Get the current namespace context for the xpath.

### setNamespaceContext

    public final void setNamespaceContext(PrefixResolver pr)

  **For advanced use only** Get the current namespace context for the xpath.

### pushSubContextList

    public final void pushSubContextList(SubContextList iter)

  **For internal use only** Push a TreeWalker on the stack.

### popSubContextList

    public final void popSubContextList()

  **For internal use only** Pop the last pushed axes iterator.

### getSubContextList

    public SubContextList getSubContextList()

  **For internal use only** Get the current axes iterator, or return null if none.

### getContextNode

    public final Node getContextNode()

  **For advanced use only** Get the current context node.
  Specified by:
    getContextNode in interface ExpressionContext
  Returns:
    The current context node.

### getContextNodes

    public final NodeIterator getContextNodes()

  **For advanced use only** Get the current context node list.
  Specified by:
    getContextNodes in interface ExpressionContext
  Returns:
    An iterator for the current context list, as defined in XSLT.

### toNumber

    public final double toNumber(Node n)

  **For advanced use only** Get the value of a node as a number.
  Specified by:
    toNumber in interface ExpressionContext
  Parameters:
    `n` - Node to be converted to a number. May be null.
  Returns:
    value of n as a number.

### toString

    public final java.lang.String toString(Node n)

  **For advanced use only** Get the value of a node as a string.
  Specified by:
    toString in interface ExpressionContext
  Parameters:
    `n` - Node to be converted to a string. May be null.
  Returns:
    value of n as a string, or an empty string if n is null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.