Module org.htmlunit.cyberneko
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.-
Field Summary
Fields inherited from interface org.htmlunit.cyberneko.xerces.xni.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.
-
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
nullif the prefix is undeclared
-
getDeclaredPrefixCount
public int getDeclaredPrefixCount()Get declared prefix count.- Specified by:
getDeclaredPrefixCountin interfaceNamespaceContext- Returns:
- the count of locally declared prefixes
-
getDeclaredPrefixAt
Get declared prefix at.- Specified by:
getDeclaredPrefixAtin interfaceNamespaceContext- Parameters:
index- the zero-based index position of the declared prefix- Returns:
- the prefix at the specified index, or
nullif out of bounds
-
getParentContext
-
reset
public void reset()Reset.- Specified by:
resetin interfaceNamespaceContext
-
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, ornullor empty string for the default namespaceuri- the Namespace URI to associate with the prefix- Returns:
trueif the prefix was legal,falseotherwise- See Also:
-