APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.utils

public Class PrefixResolverDefault

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

This class implements a generic PrefixResolver that can be used to perform prefix-to-namespace lookup for the XPath object.

Field Summary

Modifier and TypeField and Description
pack-priv Node
m_context

The context to resolve the prefix from, if the context is not given.

Constructor Summary

AccessConstructor and Description
public
PrefixResolverDefault(Node
The context from which XPath expression prefixes will be resolved.

Warning

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

xpathExpressionContext
)

Construct a PrefixResolverDefault object.

Method Summary

Modifier and TypeMethod and Description
public String
public String

Returns:

Namespace that prefix resolves to, or null if prefix is not bound.
getNamespaceForPrefix
(String
Prefix to resolve.
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 namespace, get the corrisponding prefix.

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_contextback to summary
pack-priv Node m_context

The context to resolve the prefix from, if the context is not given.

Constructor Detail

PrefixResolverDefaultback to summary
public PrefixResolverDefault(Node xpathExpressionContext)

Construct a PrefixResolverDefault object.

Parameters
xpathExpressionContext:Node

The context from which XPath expression prefixes will be resolved.

Warning

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

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.

Given a namespace, get the corrisponding prefix. This assumes that the PrevixResolver hold's it's own namespace context, or is a namespace context itself.

Parameters
prefix:String

Prefix to resolve.

Returns:String

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

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

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

Given a namespace, get the corrisponding prefix.

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()