protected static final class AbstractSerializerPhloc.NamespaceStack extends Object
| Constructor and Description |
|---|
AbstractSerializerPhloc.NamespaceStack(NamespaceContext aNamespaceCtx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNamespaceMapping(String sPrefix,
String sNamespaceURI) |
String |
createUniquePrefix()
Create a new unique namespace prefix.
|
String |
getDefaultNamespaceURI() |
String |
getMappedPrefix(String sNamespaceURI)
Check if the passed namespace URI is mapped in the namespace context.
|
String |
getUsedPrefixOfNamespace(String sNamespaceURI)
Resolve the given namespace URI to a prefix.
|
void |
pop() |
void |
push(Map<String,String> aAttrs)
Start a new namespace level.
|
int |
size() |
public AbstractSerializerPhloc.NamespaceStack(@Nullable NamespaceContext aNamespaceCtx)
public void push(@Nullable Map<String,String> aAttrs)
aAttrs - Existing attributes from which XML namespace prefix mappings
should be extracted. May be null.public void addNamespaceMapping(@Nullable String sPrefix, @Nonnull@Nonempty String sNamespaceURI)
public void pop()
@Nonnegative public int size()
@Nullable public String getDefaultNamespaceURI()
null for no specific namespace.@Nullable public String getUsedPrefixOfNamespace(@Nonnull String sNamespaceURI)
sNamespaceURI - The namespace URI to resolve. May not be null. Pass
in an empty string for an empty namespace URI!null if no namespace prefix is required.@Nullable public String getMappedPrefix(@Nonnull String sNamespaceURI)
sNamespaceURI - The namespace URI to check. May not be null.null if no namespace context mapping is presentCopyright © 2006–2015 phloc systems. All rights reserved.