Package org.htmlunit.cyberneko.filters
Class NamespaceBinder.NamespaceSupport
- java.lang.Object
-
- org.htmlunit.cyberneko.filters.NamespaceBinder.NamespaceSupport
-
- All Implemented Interfaces:
NamespaceContext
- Enclosing class:
- NamespaceBinder
public static class NamespaceBinder.NamespaceSupport extends java.lang.Object implements NamespaceContext
This namespace context object implements the old and new XNINamespaceContextinterface methods so that it can be used across all versions of Xerces2.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classNamespaceBinder.NamespaceSupport.EntryA namespace binding entry.
-
Field Summary
Fields Modifier and Type Field Description private NamespaceBinder.NamespaceSupport.Entry[]entries_The entries.private int[]levels_The levels of the entries.private inttop_Top of the levels list.-
Fields inherited from interface org.htmlunit.cyberneko.xerces.xni.NamespaceContext
XML_URI, XMLNS_URI
-
-
Constructor Summary
Constructors Constructor Description NamespaceSupport()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeclarePrefix(java.lang.String prefix, java.lang.String uri)Declare prefix.java.lang.StringgetDeclaredPrefixAt(int index)Get declared prefix at.intgetDeclaredPrefixCount()Get declared prefix count.NamespaceContextgetParentContext()java.lang.StringgetURI(java.lang.String prefix)Get URI.voidpopContext()Pop context.voidpushContext()Push context.voidreset()Reset.
-
-
-
Field Detail
-
top_
private int top_
Top of the levels list.
-
levels_
private int[] levels_
The levels of the entries.
-
entries_
private NamespaceBinder.NamespaceSupport.Entry[] entries_
The entries.
-
-
Method Detail
-
getURI
public java.lang.String getURI(java.lang.String prefix)
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
public java.lang.String getDeclaredPrefixAt(int index)
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
public NamespaceContext getParentContext()
-
reset
public void reset()
Reset.- Specified by:
resetin interfaceNamespaceContext
-
pushContext
public void pushContext()
Push context.- Specified by:
pushContextin interfaceNamespaceContext- See Also:
NamespaceContext.popContext()
-
popContext
public void popContext()
Pop context.- Specified by:
popContextin interfaceNamespaceContext- See Also:
NamespaceContext.pushContext()
-
declarePrefix
public boolean declarePrefix(java.lang.String prefix, java.lang.String uri)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:
NamespaceContext.getURI(java.lang.String),NamespaceContext.getDeclaredPrefixAt(int)
-
-