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 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.
-
-
Field Summary
-
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(String prefix, String uri)Declare prefix.StringgetDeclaredPrefixAt(int index)Get declared prefix at.intgetDeclaredPrefixCount()Get declared prefix count.NamespaceContextgetParentContext()StringgetURI(String prefix)Get URI.voidpopContext()Pop context.voidpushContext()Push context.voidreset()Reset.
-
-
-
Method Detail
-
getURI
public String getURI(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 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(String prefix, 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)
-
-