Namespace support for XML document handlers. This class doesn't
perform any error checking and assumes that all strings passed
as arguments to methods are unique symbols. The SymbolTable class
can be used for this purpose.
author: Andy Clark, IBM version: $Id: NamespaceSupport.java,v 1.2 2006/04/01 06:01:41 jeffsuttor Exp $
Inner Class :final protected class IteratorPrefixes implements Iterator
Inner Class :final protected class Prefixes implements Enumeration
NamespaceSupport(NamespaceContext context) Constructs a namespace context object and initializes it with
the prefixes declared in the specified context.
Method Summary
public boolean
containsPrefix(String prefix) Checks whether a binding or unbinding for
the given prefix exists in the context.
Parameters: prefix - The prefix to look up.
public boolean
containsPrefixInCurrentContext(String prefix) Checks whether a binding or unbinding for
the given prefix exists in the current context.
Parameters: prefix - The prefix to look up.
Context indexes. This array contains indexes into the namespace
information array. The index at the current context is the start
index of declared namespace bindings and runs to the size of the
namespace information array.
See Also:NamespaceSupport.fNamespaceSize
Namespace binding information. This array is composed of a
series of tuples containing the namespace binding information:
<prefix, uri>. The default size can be set to anything
as long as it is a power of 2 greater than 1.
See Also:NamespaceSupport.fNamespaceSize See Also:NamespaceSupport.fContext
Constructs a namespace context object and initializes it with
the prefixes declared in the specified context.
Method Detail
containsPrefix
public boolean containsPrefix(String prefix)(Code)
Checks whether a binding or unbinding for
the given prefix exists in the context.
Parameters: prefix - The prefix to look up. true if the given prefix exists in the context
containsPrefixInCurrentContext
public boolean containsPrefixInCurrentContext(String prefix)(Code)
Checks whether a binding or unbinding for
the given prefix exists in the current context.
Parameters: prefix - The prefix to look up. true if the given prefix exists in the current context