NamespaceContext.
| Modifier and Type | Field and Description |
|---|---|
| protected final String[] | _declarationData
Array that contains prefix/namespace-uri pairs, ordered from the most recent declaration to older ones. |
| protected final NsDeclaration | _lastDeclaration
We will keep a reference to the last namespace declaration in effect at point when this instance was created. |
| protected ArrayList | _tmpDecl
Temporary List used for constructing compact namespace binding information that we will actually use. |
| public static final FixedNsContext | EMPTY_CONTEXT
We can share and reuse "no bindings" instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final String | getNamespaceURI(String
prefix to look up prefix)Implements javax. |
| public final String | getPrefix(String
URI of Namespace to lookup nsURI)Implements javax. |
| public final Iterator | getPrefixes(String
URI of Namespace to lookup nsURI)Implements javax. |
| public FixedNsContext | reuseOrCreate(final NsDeclaration currLastDecl)
Method called to either reuse this context or construct a new one. |
| public String |
| _declarationData | back to summary |
|---|---|
| protected final String[] _declarationData Array that contains prefix/namespace-uri pairs, ordered from the most recent declaration to older ones. Array is always exactly sized so there are no empty entries at the end. | |
| _lastDeclaration | back to summary |
|---|---|
| protected final NsDeclaration _lastDeclaration We will keep a reference to the last namespace declaration in effect at point when this instance was created. This is used for lazy invalidation of instances: if last declaration for an instance differs from the last seen by the reader, a new context must be created. | |
| _tmpDecl | back to summary |
|---|---|
| protected ArrayList<String> _tmpDecl Temporary List used for constructing compact namespace binding information that we will actually use. | |
| EMPTY_CONTEXT | back to summary |
|---|---|
| public static final FixedNsContext EMPTY_CONTEXT We can share and reuse "no bindings" instance. | |
| FixedNsContext | back to summary |
|---|---|
| private FixedNsContext(NsDeclaration lastDecl, String[] declData) | |
| getNamespaceURI | back to summary | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public final String getNamespaceURI(String prefix) Implements javax. Doc from javax. Get Namespace URI bound to a prefix in the current scope. When requesting a Namespace URI by prefix, the following table describes the returned Namespace URI value for all possible prefix values:
| |||||||||||||||
| getPrefix | back to summary | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public final String getPrefix(String nsURI) Implements javax. Doc from javax. Get prefix bound to Namespace URI in the current scope. To get all prefixes bound to a Namespace URI in the current
scope, use When requesting a prefix by Namespace URI, the following table describes the returned prefix value for all Namespace URI values:
| |||||||||||||||
| getPrefixes | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public final Iterator Implements javax. Doc from javax. Get all prefixes bound to a Namespace URI in the current scope. An Iterator over String elements is returned in an arbitrary, implementation dependent, order. The When requesting prefixes by Namespace URI, the following table describes the returned prefixes value for all Namespace URI values:
| |||||||||||||
| reuseOrCreate | back to summary |
|---|---|
| public FixedNsContext reuseOrCreate(final NsDeclaration currLastDecl) Method called to either reuse this context or construct a new one. Reuse is ok if the currently active last declaration has not changed since time this instance was created. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |