org.jaxen
Class SimpleNamespaceContext
java.lang.Object
|
+--org.jaxen.SimpleNamespaceContext
- All Implemented Interfaces:
- NamespaceContext, Serializable
- public class SimpleNamespaceContext
- extends Object
- implements NamespaceContext, Serializable
Provides mappings from namespace prefix to namespace URI to the xpath
engine.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleNamespaceContext
public SimpleNamespaceContext()
SimpleNamespaceContext
public SimpleNamespaceContext(Map namespaces)
addElementNamespaces
public void addElementNamespaces(Navigator nav,
Object element)
throws UnsupportedAxisException
- Adds all the namespace declarations that are in scope on the given
element. In the case of an XSLT stylesheet, this would be the element
that has the xpath expression in one of its attributes; i.e.
<xsl:if test="condition/xpath/expression">
.
- Parameters:
nav
- the navigator for use in conjunction with
element
element
- the element to copy the namespaces from
addNamespace
public void addNamespace(String prefix,
String namespaceUri)
translateNamespacePrefixToUri
public String translateNamespacePrefixToUri(String prefix)
- Description copied from interface:
NamespaceContext
- Translate the provided namespace prefix into
the matching bound namespace URI.
In XPath, there is no such thing as a 'default namespace'.
The empty prefix always resolves to the empty
namespace URI.
- Specified by:
translateNamespacePrefixToUri
in interface NamespaceContext
- Following copied from interface:
org.jaxen.NamespaceContext
- Parameters:
prefix
- The namespace prefix to resolve.- Returns:
- The namespace URI matching the prefix.
Copyright © 2002 bob mcwhirter & James Strachan. All Rights Reserved. Hosted by