"Jeff Greif" <[EMAIL PROTECTED]> wrote:
> The PrefixResolver interface supports two flavors of getNamespaceForPrefix.
> The javadoc, which incorrectly describes these functions as determining
> prefixes from namespace URIs, rather than the opposite, claims that an
> implementation can specify how to get the default namespace Uri from the
> empty string prefix.
It doesn't claim an implementation can specify how to get the default namespace URI from the empty string, it just says if you pass in an empty string, it will give you the default namespace, if there's one in scope. As far as the errors in the javadoc -- I suggest you file a bug report about the mis-spellings, etc.
> The docs do not explain how the PrefixResolver is used. Is the PrefixResolver
> called on things it finds in the XPath _expression_, or on the source tree data,
> or both?
The PrefixResolver is called when there's an XPath _expression_ with a prefix that needs to be resolved to a namespace. It is not called for prefixes in the source tree -- those are already bound.
> It appears that only one of the XPathAPI methods (one flavor of eval) can
> take a PrefixResolver -- the selectXXX methods cannot.
Yes, but since all of the other calls end up going through that method, it doesn't seem to me to be a problem.
Dave