public class MultipleScopeNamespaceSupport extends NamespaceSupport
NamespaceSupport.Prefixes
Modifier and Type | Field and Description |
---|---|
protected int |
fCurrentScope |
protected int[] |
fScope |
fContext, fCurrentContext, fNamespace, fNamespaceSize, fPrefixes
XML_URI, XMLNS_URI
Constructor and Description |
---|
MultipleScopeNamespaceSupport() |
MultipleScopeNamespaceSupport(NamespaceContext context) |
Modifier and Type | Method and Description |
---|---|
Enumeration |
getAllPrefixes()
Return an enumeration of all prefixes whose declarations are active
in the current context.
|
String |
getPrefix(String uri)
Look up a namespace URI and get one of the mapped prefix.
|
String |
getPrefix(String uri,
int context) |
String |
getPrefix(String uri,
int start,
int end) |
int |
getScopeForContext(int context) |
String |
getURI(String prefix)
Look up a prefix and get the currently-mapped Namespace URI.
|
String |
getURI(String prefix,
int context) |
String |
getURI(String prefix,
int start,
int end) |
void |
popScope()
Pops the current scope.
|
void |
pushScope()
Begins a new scope.
|
void |
reset()
Only resets the current scope -- all namespaces defined in lower scopes
remain valid after a call to reset.
|
containsPrefix, declarePrefix, getDeclaredPrefixAt, getDeclaredPrefixCount, popContext, pushContext
public MultipleScopeNamespaceSupport()
public MultipleScopeNamespaceSupport(NamespaceContext context)
context
- public Enumeration getAllPrefixes()
NamespaceContext
getAllPrefixes
in interface NamespaceContext
getAllPrefixes
in class NamespaceSupport
NamespaceContext.getAllPrefixes()
public int getScopeForContext(int context)
public String getPrefix(String uri)
NamespaceContext
This method looks up the namespace URI in the current context. If more than one prefix is currently mapped to the same URI, this method will make an arbitrary selection If no mapping is found, this methods will continue lookup in the parent context(s).
getPrefix
in interface NamespaceContext
getPrefix
in class NamespaceSupport
uri
- The namespace URI to look up.NamespaceContext.getPrefix(String)
public String getURI(String prefix)
NamespaceContext
This method looks up the prefix in the current context. If no mapping is found, this methods will continue lookup in the parent context(s). Use the empty string ("") for the default Namespace.
getURI
in interface NamespaceContext
getURI
in class NamespaceSupport
prefix
- The prefix to look up.NamespaceContext.getURI(String)
public void reset()
reset
in interface NamespaceContext
reset
in class NamespaceSupport
NamespaceContext.reset()
public void pushScope()
public void popScope()
Copyright © 2019 JBoss by Red Hat. All rights reserved.