public class NamespacesStack extends Object
| Constructor and Description |
|---|
NamespacesStack() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultNamespace(String namespaceUri)
Adds the default namespace to current scope.
|
void |
addNamespace(String namespacePrefix,
String namespaceUri)
Adds a namespace to current scope.
|
void |
addNewNamespaceScope()
Adds a new namespace scope.
|
void |
declareAsAttributes(org.xml.sax.helpers.AttributeListImpl attributeList,
boolean localOnly)
Declares the namespaces using the attribute list.
|
Namespaces |
getCurrentNamespaceScope()
Retrieves the current namespace scope.
|
String |
getDefaultNamespaceURI()
Retrieves the default namespace namespace uri.
|
Enumeration<String> |
getLocalNamespacePrefixes()
Retrieves the namespace prefixes registered in current scope.
|
String |
getNamespacePrefix(String namespaceUri)
Retrieves the namespace prefix for the given namespace uri.
|
String |
getNamespaceURI(String namespacePrefix)
Retrieves the namespace uri bound to specified prefix.
|
String |
getNonDefaultNamespacePrefix(String namespaceUri)
Retrieves the non default namespace prefix for the given namespace uri.
|
void |
removeNamespace(String namespacePrefix)
Removes the namespace from current scope using the namespace prefix
|
void |
removeNamespaceScope()
Removes the namespace scope.
|
public void addNamespace(String namespacePrefix, String namespaceUri)
namespacePrefix - the namespace prefixnamespaceUri - the namespace uripublic void addDefaultNamespace(String namespaceUri)
namespaceUri - the namespace uripublic void removeNamespace(String namespacePrefix)
namespacePrefix - the prefix of the namespace to removepublic String getNamespaceURI(String namespacePrefix)
namespacePrefix - the namespace prefixpublic void declareAsAttributes(org.xml.sax.helpers.AttributeListImpl attributeList, boolean localOnly)
attributeList - the list of attributes containing the namespaceslocalOnly - whether the namespaces will only registered in current namespace context or in
entire stackpublic String getDefaultNamespaceURI()
public String getNamespacePrefix(String namespaceUri)
namespaceUri - the namespace uripublic String getNonDefaultNamespacePrefix(String namespaceUri)
namespaceUri - the namespace uripublic Enumeration<String> getLocalNamespacePrefixes()
public void addNewNamespaceScope()
public void removeNamespaceScope()
public Namespaces getCurrentNamespaceScope()
Copyright © 2016. All rights reserved.