public class NamespaceContextImpl extends Object implements NamespaceContext
NamespaceContext
interface. It can store
own namespace declarations
and also inherit declarations from a parent
NamespaceContext
.Modifier and Type | Class and Description |
---|---|
protected static class |
NamespaceContextImpl.PrefixIterator |
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
namespace2prefix
maps namespace-URI to prefix.
|
private NamespaceContext |
parentContext
the parent context to inherit from or
null . |
private Map<String,String> |
prefix2namespace
maps prefix to namespace-URI.
|
Constructor and Description |
---|
NamespaceContextImpl()
The constructor.
|
NamespaceContextImpl(NamespaceContext parentContext)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String namespaceURI) |
Iterator |
getPrefixes(String namespaceURI) |
void |
setNamespace(String prefix,
String uri)
This method is used to declare a namespace in this context.
|
private final NamespaceContext parentContext
null
.public NamespaceContextImpl()
public NamespaceContextImpl(NamespaceContext parentContext)
parentContext
- is the parent context to inherit from.public String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
public String getPrefix(String namespaceURI)
getPrefix
in interface NamespaceContext
public Iterator getPrefixes(String namespaceURI)
getPrefixes
in interface NamespaceContext
Copyright © 2001–2016 mmm-Team. All rights reserved.