org.w3c.dom.xpath
Interface XPathNSResolver
- public interface XPathNSResolver
DOM Level 3 WD Experimental:
The DOM Level 3 specification is at the stage
of Working Draft, which represents work in
progress and thus may be updated, replaced,
or obsoleted by other documents at any time.
The XPathNSResolver
interface permit prefix
strings in the expression to be properly bound to
namespaceURI
strings. XPathEvaluator
can
construct an implementation of XPathNSResolver
from a node,
or the interface may be implemented by any application.
See also the Document Object Model (DOM) Level 3 XPath Specification.
Method Summary |
java.lang.String |
lookupNamespaceURI(java.lang.String prefix)
Look up the namespace URI associated to the given namespace prefix. |
lookupNamespaceURI
public java.lang.String lookupNamespaceURI(java.lang.String prefix)
- Look up the namespace URI associated to the given namespace prefix. The
XPath evaluator must never call this with a
null
or
empty argument, because the result of doing this is undefined.Null /
empty prefix passed to XPathNSResolver should return default
namespace.Do not permit null
to be passed in invocation,
allowing the implementation, if shared, to do anything it wants with
a passed null
.It would be confusing to specify more than
this since the resolution of namespaces for XPath expressions never
requires the default namespace.Null returns are problematic.No change.
They should be adequately addressed in core. Some implementations
have not properly supported them, but they will be fixed to be
compliant. Bindings are still free to choose alternative
representations of null
where required.
- Parameters:
prefix
- The prefix to look for.- Returns:
- Returns the associated namespace URI or
null
if
none is found.
Copyright © 1999-2002 Apache XML Project. All Rights Reserved.