org.inria.ns.reflex.xml
Interface NamespaceContext

All Known Subinterfaces:
NamespaceContext.Mutable
All Known Implementing Classes:
NamespaceContext.Elem, NamespaceContext.Impl

public interface NamespaceContext

A NamespaceContext is used for namespace URI resolution when a prefix is used.

Author:
Philippe Poulard

Nested Class Summary
static class NamespaceContext.Elem
          A mutable namespace context backed by an element.
static class NamespaceContext.Impl
          A mutable default implementation of a NamespaceContext.
static interface NamespaceContext.Mutable
          A mutable namespace context.
 
Field Summary
static NamespaceContext VOID_NAMESPACE_CONTEXT
          The immutable void namespace context.
 
Method Summary
 String getNamespaceURI(String prefix)
          Retrieve the namespace URI bound to the given prefix.
 Iterator getPrefixes(String namespaceURI)
          Retrieve the list of prefixes that are bound to a namespace URI.
 

Field Detail

VOID_NAMESPACE_CONTEXT

static final NamespaceContext VOID_NAMESPACE_CONTEXT
The immutable void namespace context.

Method Detail

getNamespaceURI

String getNamespaceURI(String prefix)
Retrieve the namespace URI bound to the given prefix.

Parameters:
prefix - The prefix for which the namespace URI is needed.
Returns:
The namespace URI bound to the given prefix, that is "" if the prefix is unknown.

getPrefixes

Iterator getPrefixes(String namespaceURI)
Retrieve the list of prefixes that are bound to a namespace URI.

Parameters:
namespaceURI - The namespace URI.
Returns:
A non-null iterator on the prefixes that may be empty.