org.apache.xml.utils
Interface PrefixResolver
- All Known Implementing Classes:
- ElemTemplateElement, PrefixResolverDefault, StylesheetHandler
- public interface PrefixResolver
**For advanced use only**
The class that implements this interface can resolve prefixes
to namespaces.
Method Summary |
java.lang.String |
getBaseIdentifier()
Return the base identifier. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix)
Given a namespace, get the corrisponding prefix. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix,
Node context)
Given a namespace, get the corrisponding prefix, based on the node context. |
getNamespaceForPrefix
public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
- 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
- The prefix to look up, which may be an empty string ("") for the default Namespace.- Returns:
- The associated Namespace URI, or null if the prefix
is undeclared in this context.
getNamespaceForPrefix
public java.lang.String getNamespaceForPrefix(java.lang.String prefix,
Node context)
- Given a namespace, get the corrisponding prefix, based on the node context.
- Parameters:
prefix
- The prefix to look up, which may be an empty string ("") for the default Namespace.context
- The node context from which to look up the URI.- Returns:
- The associated Namespace URI, or null if the prefix
is undeclared in this context.
getBaseIdentifier
public java.lang.String getBaseIdentifier()
- Return the base identifier.
- Returns:
- The base identifier from where relative URIs should be absolutized, or null
if the base ID is unknown.
Copyright � 2000 Apache XML Project. All Rights Reserved.