org.apache.commons.jxpath.ri
Class NamespaceResolver
java.lang.Object
org.apache.commons.jxpath.ri.NamespaceResolver
- Cloneable
public class NamespaceResolver
extends java.lang.Object
implements Cloneable
The reference implementation of JXPathContext.
$Revision: 1.2 $ $Date: 2004/06/29 22:57:20 $
namespaceMap
protected HashMap namespaceMap
reverseMap
protected HashMap reverseMap
clone
public Object clone()
getNamespaceContextPointer
public Pointer getNamespaceContextPointer()
getNamespaceURI
public String getNamespaceURI(String prefix)
Given a prefix, returns a registered namespace URI. If the requested
prefix was not defined explicitly using the registerNamespace method,
JXPathContext will then check the context node to see if the prefix is
defined there. See
setNamespaceContextPointer
.
prefix
- The namespace prefix to look up
- namespace URI or null if the prefix is undefined.
getPrefix
public String getPrefix(String namespaceURI)
isSealed
public boolean isSealed()
registerNamespace
public void registerNamespace(String prefix,
String namespaceURI)
Registers a namespace prefix.
prefix
- A namespace prefixnamespaceURI
- A URI for that prefix
setNamespaceContextPointer
public void setNamespaceContextPointer(NodePointer pointer)
Register a namespace for the expression context.