Package org.htmlunit.cyberneko.filters
Class NamespaceBinder.NamespaceSupport
java.lang.Object
org.htmlunit.cyberneko.filters.NamespaceBinder.NamespaceSupport
- All Implemented Interfaces:
NamespaceContext
- Enclosing class:
NamespaceBinder
This namespace context object implements the old and new XNI
NamespaceContext
interface methods so that it can
be used across all versions of Xerces2.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
A namespace binding entry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NamespaceBinder.NamespaceSupport.Entry[]
The entries.private int[]
The levels of the entries.private int
Top of the levels list.Fields inherited from interface org.htmlunit.cyberneko.xerces.xni.NamespaceContext
XML_URI, XMLNS_URI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
declarePrefix
(String prefix, String uri) Declare prefix.getDeclaredPrefixAt
(int index) Get declared prefix at.int
Get declared prefix count.Get URI.void
Pop context.void
Push context.void
reset()
Reset.
-
Field Details
-
top_
private int top_Top of the levels list. -
levels_
private int[] levels_The levels of the entries. -
entries_
The entries.
-
-
Constructor Details
-
NamespaceSupport
public NamespaceSupport()Default constructor.
-
-
Method Details
-
getURI
Get URI.- Specified by:
getURI
in interfaceNamespaceContext
- Parameters:
prefix
- The prefix to look up.- Returns:
- The associated Namespace URI, or null if the prefix is undeclared in this context.
-
getDeclaredPrefixCount
public int getDeclaredPrefixCount()Get declared prefix count.- Specified by:
getDeclaredPrefixCount
in interfaceNamespaceContext
- Returns:
- a count of locally declared prefixes, including the default prefix if bound.
-
getDeclaredPrefixAt
Get declared prefix at.- Specified by:
getDeclaredPrefixAt
in interfaceNamespaceContext
- Parameters:
index
- the index pos- Returns:
- the prefix at the specified index in the current context.
-
getParentContext
-
reset
public void reset()Reset.- Specified by:
reset
in interfaceNamespaceContext
-
pushContext
public void pushContext()Push context.- Specified by:
pushContext
in interfaceNamespaceContext
- See Also:
-
popContext
public void popContext()Pop context.- Specified by:
popContext
in interfaceNamespaceContext
- See Also:
-
declarePrefix
Declare prefix.- Specified by:
declarePrefix
in interfaceNamespaceContext
- Parameters:
prefix
- The prefix to declare, or null for the empty string.uri
- The Namespace URI to associate with the prefix.- Returns:
- true if the prefix was legal, false otherwise
- See Also:
-