org.apache.commons.jelly.expression.xpath

## Class XPathExpression

- java.lang.Object
- - org.apache.commons.jelly.expression.ExpressionSupport
  - - org.apache.commons.jelly.expression.xpath.XPathExpression

All Implemented Interfaces:
  Expression, org.jaxen.VariableContext

    public class XPathExpression
    extends ExpressionSupport
    implements org.jaxen.VariableContext

An expression which returns an XPath object.

Version:
  $Revision: 155420 $
Author:
  James Strachan

### Field Summary

### Fields inherited from class org.apache.commons.jelly.expression.ExpressionSupport

`EMPTY_ITERATOR`

### Fields inherited from interface org.apache.commons.jelly.expression.Expression

`NULL`

### Constructor Summary

Constructors
Constructor and Description
`XPathExpression()`
`XPathExpression(String text, Expression xpathExpr, TagScript tagScript)`

### Method Summary

Methods
`protected Map` `createUriMap(Map namespaceContext)` Factory method to create a synchronized Map of non-null and non-blank namespace prefixes to namespace URIs
`Object` `evaluate(JellyContext context)` Evaluates the expression with the given context and returns the result
`String` `getExpressionText()`
`Object` `getVariableValue(String namespaceURI, String prefix, String localName)`
`String` `toString()`

### Methods inherited from class org.apache.commons.jelly.expression.ExpressionSupport

`evaluateAsBoolean, evaluateAsIterator, evaluateAsString, evaluateRecurse`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### XPathExpression

    public XPathExpression()

#### XPathExpression

    public XPathExpression(String text,
                   Expression xpathExpr,
                   TagScript tagScript)

### Method Detail

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getExpressionText

    public String getExpressionText()

Specified by:
  `getExpressionText` in interface `Expression`
Returns:
  the textual representation of this expression

#### evaluate

    public Object evaluate(JellyContext context)

Description copied from interface: `Expression`
Evaluates the expression with the given context and returns the result

Specified by:
  `evaluate` in interface `Expression`

#### getVariableValue

    public Object getVariableValue(String namespaceURI,
                          String prefix,
                          String localName)

Specified by:
  `getVariableValue` in interface `org.jaxen.VariableContext`

#### createUriMap

    protected Map createUriMap(Map namespaceContext)

Factory method to create a synchronized Map of non-null and non-blank namespace prefixes to namespace URIs