com.ctc.wstx.util
Class EmptyNamespaceContext

java.lang.Object
  extended by com.ctc.wstx.util.BaseNsContext
      extended by com.ctc.wstx.util.EmptyNamespaceContext
All Implemented Interfaces:
NamespaceContext

public final class EmptyNamespaceContext
extends BaseNsContext

Dummy NamespaceContext (and BaseNsContext) implementation that is usually used in non-namespace-aware mode.

Note: differs from Stax2 reference implementation's version slightly, since it needs to support Woodstox specific extensions for efficient namespace declaration serialization.


Field Summary
 
Fields inherited from class com.ctc.wstx.util.BaseNsContext
UNDECLARED_NS_URI
 
Method Summary
 String doGetNamespaceURI(String prefix)
           
 String doGetPrefix(String nsURI)
           
 Iterator doGetPrefixes(String nsURI)
           
static EmptyNamespaceContext getInstance()
           
 Iterator getNamespaces()
           
 void outputNamespaceDeclarations(Writer w)
          Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.
 void outputNamespaceDeclarations(XMLStreamWriter w)
           
 
Methods inherited from class com.ctc.wstx.util.BaseNsContext
getNamespaceURI, getPrefix, getPrefixes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EmptyNamespaceContext getInstance()

getNamespaces

public Iterator getNamespaces()
Specified by:
getNamespaces in class BaseNsContext

outputNamespaceDeclarations

public void outputNamespaceDeclarations(Writer w)
Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.

Specified by:
outputNamespaceDeclarations in class BaseNsContext

outputNamespaceDeclarations

public void outputNamespaceDeclarations(XMLStreamWriter w)
Specified by:
outputNamespaceDeclarations in class BaseNsContext

doGetNamespaceURI

public String doGetNamespaceURI(String prefix)
Specified by:
doGetNamespaceURI in class BaseNsContext

doGetPrefix

public String doGetPrefix(String nsURI)
Specified by:
doGetPrefix in class BaseNsContext

doGetPrefixes

public Iterator doGetPrefixes(String nsURI)
Specified by:
doGetPrefixes in class BaseNsContext