|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.staxmate.out.SMNamespace
org.codehaus.staxmate.out.SMGlobalNamespace
public final class SMGlobalNamespace
Namespace that is global and shared for all SMOutputContext)s
(~= XML documents or sub-trees). This includes the
pre-defined namespaces (ones with "xml" and "xmlns" prefixes as well
as the default "empty"/missing namespace, one bound to "" if no explicit
declaration is made).
| Field Summary | |
|---|---|
protected java.lang.String |
mPrefix
Prefix this namespace is (permanently) bound to. |
| Fields inherited from class org.codehaus.staxmate.out.SMNamespace |
|---|
mURI |
| Constructor Summary | |
|---|---|
protected |
SMGlobalNamespace(java.lang.String uri,
java.lang.String prefix)
|
| Method Summary | |
|---|---|
protected void |
bindAs(java.lang.String prefix)
Global namespaces should never be bound/unbound, so if this gets called, an exception will be thrown (but note that this being an 'internal' method, this is more like an assertion). |
protected void |
bindPermanentlyAs(java.lang.String prefix)
Method used to permanently bind this (local) namespace to a prefix. |
java.lang.String |
getBoundPrefix()
|
java.lang.String |
getLastBoundPrefix()
|
java.lang.String |
getPreferredPrefix()
|
protected boolean |
isValidIn(SMOutputContext ctxt)
Method used to verify that the namespace is actually valid within the specified output context. |
boolean |
prefersDefaultNs()
|
void |
prefersDefaultNs(boolean state)
|
void |
setPreferredPrefix(java.lang.String prefPrefix)
Method that can be called to associate a "preferred" prefix; prefix that this namespace should be bound to instead of some automatically generated one (unless that prefix is already bound to another URI). |
protected void |
unbind()
Method called to indicate that the namespace is no longer bound to its current prefix within the current output context. |
| Methods inherited from class org.codehaus.staxmate.out.SMNamespace |
|---|
getURI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String mPrefix
| Constructor Detail |
|---|
protected SMGlobalNamespace(java.lang.String uri,
java.lang.String prefix)
| Method Detail |
|---|
public java.lang.String getPreferredPrefix()
getPreferredPrefix in class SMNamespacepublic java.lang.String getBoundPrefix()
getBoundPrefix in class SMNamespacepublic java.lang.String getLastBoundPrefix()
getLastBoundPrefix in class SMNamespacepublic boolean prefersDefaultNs()
prefersDefaultNs in class SMNamespacepublic void prefersDefaultNs(boolean state)
prefersDefaultNs in class SMNamespacepublic void setPreferredPrefix(java.lang.String prefPrefix)
SMNamespace
setPreferredPrefix in class SMNamespaceprotected boolean isValidIn(SMOutputContext ctxt)
SMNamespace
isValidIn in class SMNamespaceprotected void bindAs(java.lang.String prefix)
bindAs in class SMNamespaceprotected void bindPermanentlyAs(java.lang.String prefix)
SMNamespace
bindPermanentlyAs in class SMNamespaceprotected void unbind()
SMNamespace
unbind in class SMNamespace
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||