APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.jaxp

public Class JAXPPrefixResolver

extends Object
implements PrefixResolver
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xml.internal.utils.PrefixResolver
Imports
org.w3c.dom.Node, .NamedNodeMap, com.sun.org.apache.xml.internal.utils.PrefixResolver, javax.xml.namespace.NamespaceContext

This class implements a Default PrefixResolver which can be used to perform prefix-to-namespace lookup for the XPath object. This class delegates the resolution to the passed NamespaceContext

Field Summary

Modifier and TypeField and Description
private NamespaceContext
public static final String
S_XMLNAMESPACEURI

The URI for the XML namespace.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
getNamespaceForPrefix(String prefix)

Implements com.sun.org.apache.xml.internal.utils.PrefixResolver.getNamespaceForPrefix.

Given a namespace, get the corrisponding prefix.

public String

Returns:

Namespace that prefix resolves to, or null if prefix is not bound.
getNamespaceForPrefix
(String
Prefix to resolve.
prefix
,
Node
Node from which to start searching for a xmlns attribute that binds a prefix to a namespace.
namespaceContext
)

Implements com.sun.org.apache.xml.internal.utils.PrefixResolver.getNamespaceForPrefix.

Given a prefix and a Context Node, get the corresponding namespace.

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

namespaceContextback to summary
private NamespaceContext namespaceContext
S_XMLNAMESPACEURIback to summary
public static final String S_XMLNAMESPACEURI

The URI for the XML namespace. (Duplicate of that found in com.sun.org.apache.xpath.internal.XPathContext).

Constructor Detail

JAXPPrefixResolverback to summary
public JAXPPrefixResolver(NamespaceContext nsContext)

Method Detail

getBaseIdentifierback to summary
public String getBaseIdentifier()

Implements com.sun.org.apache.xml.internal.utils.PrefixResolver.getBaseIdentifier.

Return the base identifier.

Returns:String

null

getNamespaceForPrefixback to summary
public String getNamespaceForPrefix(String prefix)

Implements com.sun.org.apache.xml.internal.utils.PrefixResolver.getNamespaceForPrefix.

Doc from com.sun.org.apache.xml.internal.utils.PrefixResolver.getNamespaceForPrefix.

Given a namespace, get the corrisponding prefix. This assumes that the PrefixResolver holds its own namespace context, or is a namespace context itself.

getNamespaceForPrefixback to summary
public String getNamespaceForPrefix(String prefix, Node namespaceContext)

Implements com.sun.org.apache.xml.internal.utils.PrefixResolver.getNamespaceForPrefix.

Given a prefix and a Context Node, get the corresponding namespace.

Warning

This will not work correctly if namespaceContext is an attribute node.

Parameters
prefix:String

Prefix to resolve.

namespaceContext:Node

Node from which to start searching for a xmlns attribute that binds a prefix to a namespace.

Returns:String

Namespace that prefix resolves to, or null if prefix is not bound.

handlesNullPrefixesback to summary
public boolean handlesNullPrefixes()

Implements com.sun.org.apache.xml.internal.utils.PrefixResolver.handlesNullPrefixes.

See Also
PrefixResolver#handlesNullPrefixes()