org.apache.axiom.om.xpath
Class AXIOMXPath

java.lang.Object
  extended byorg.jaxen.BaseXPath
      extended byorg.apache.axiom.om.xpath.AXIOMXPath
All Implemented Interfaces:
java.io.Serializable, org.jaxen.XPath

public class AXIOMXPath
extends org.jaxen.BaseXPath

See Also:
Serialized Form

Constructor Summary
AXIOMXPath(java.lang.String xpathExpr)
          Construct given an XPath expression string.
 
Method Summary
 void addNamespace(java.lang.String prefix, java.lang.String uri)
          This override captures any added namespaces, as the Jaxen BaseXPath class nor NamespaceContext (or SimpleNamespaceContext) exposes thier internal map of the prefixes to the namespaces.
 java.util.Map getNamespaces()
          Expose the prefix to namespace mapping for this expression
 
Methods inherited from class org.jaxen.BaseXPath
booleanValueOf, createFunctionContext, createNamespaceContext, createVariableContext, debug, evaluate, getContext, getContextSupport, getFunctionContext, getNamespaceContext, getNavigator, getRootExpr, getVariableContext, numberValueOf, selectNodes, selectNodesForContext, selectSingleNode, selectSingleNodeForContext, setFunctionContext, setNamespaceContext, setVariableContext, stringValueOf, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AXIOMXPath

public AXIOMXPath(java.lang.String xpathExpr)
           throws org.jaxen.JaxenException
Construct given an XPath expression string.

Parameters:
xpathExpr - the XPath expression.
Throws:
org.jaxen.JaxenException - if there is a syntax error while parsing the expression
Method Detail

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.lang.String uri)
                  throws org.jaxen.JaxenException
This override captures any added namespaces, as the Jaxen BaseXPath class nor NamespaceContext (or SimpleNamespaceContext) exposes thier internal map of the prefixes to the namespaces. This method - although is not the ideal solution to the issue, attempts to provide an override to changing the Jaxen code.

Parameters:
prefix - a namespace prefix
uri - the URI to which the prefix matches
Throws:
org.jaxen.JaxenException - if the underlying implementation throws an exception

getNamespaces

public java.util.Map getNamespaces()
Expose the prefix to namespace mapping for this expression

Returns:
a Map of namespace prefixes to the URIs


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.