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 classA namespace binding entry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NamespaceBinder.NamespaceSupport.Entry[]The entries.private int[]The levels of the entries.private intTop of the levels list.Fields inherited from interface NamespaceContext
XML_URI, XMLNS_URI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeclarePrefix(String prefix, String uri) Declare prefix.getDeclaredPrefixAt(int index) Get declared prefix at.intGet declared prefix count.Get URI.voidPop context.voidPush context.voidreset()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:
getURIin 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:
getDeclaredPrefixCountin interfaceNamespaceContext- Returns:
- a count of locally declared prefixes, including the default prefix if bound.
-
getDeclaredPrefixAt
Get declared prefix at.- Specified by:
getDeclaredPrefixAtin interfaceNamespaceContext- Parameters:
index- the index pos- Returns:
- the prefix at the specified index in the current context.
-
getParentContext
-
reset
-
pushContext
public void pushContext()Push context.- Specified by:
pushContextin interfaceNamespaceContext- See Also:
-
popContext
public void popContext()Pop context.- Specified by:
popContextin interfaceNamespaceContext- See Also:
-
declarePrefix
Declare prefix.- Specified by:
declarePrefixin 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:
-