com.caucho.xml.stream
Class NamespaceWriterContext

java.lang.Object
  extended by com.caucho.xml.stream.NamespaceContextImpl
      extended by com.caucho.xml.stream.NamespaceWriterContext
All Implemented Interfaces:
javax.xml.namespace.NamespaceContext

public class NamespaceWriterContext
extends NamespaceContextImpl

Maintains a stack of namespace contexts


Field Summary
 
Fields inherited from class com.caucho.xml.stream.NamespaceContextImpl
_stack, _version, L
 
Constructor Summary
NamespaceWriterContext()
           
NamespaceWriterContext(boolean repair)
           
 
Method Summary
 java.lang.String declare(java.lang.String uri)
          declares a new namespace prefix in the current context; the auto-allocated prefix is returned
 void declare(java.lang.String prefix, java.lang.String uri)
          declares a new namespace prefix in the current context
 void declare(java.lang.String prefix, java.lang.String uri, boolean forceEmit)
          declares a new namespace prefix in the current context
 void emitDeclarations(WriteStream ws)
           
 java.lang.String getNamespaceURI(java.lang.String prefix)
           
 java.lang.String getPrefix(java.lang.String uri)
          looks up the uri, returns the prefix it corresponds to
 java.util.Iterator getPrefixes(java.lang.String uri)
           
 boolean getRepair()
           
protected  void remove(java.lang.String prefix, java.lang.String uri)
           
 void setRepair(boolean repair)
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.xml.stream.NamespaceContextImpl
getDepth, getElementName, pop, push, setElementName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamespaceWriterContext

public NamespaceWriterContext()

NamespaceWriterContext

public NamespaceWriterContext(boolean repair)
Method Detail

remove

protected void remove(java.lang.String prefix,
                      java.lang.String uri)
Specified by:
remove in class NamespaceContextImpl

getRepair

public boolean getRepair()

setRepair

public void setRepair(boolean repair)

declare

public void declare(java.lang.String prefix,
                    java.lang.String uri)
Description copied from class: NamespaceContextImpl
declares a new namespace prefix in the current context

Specified by:
declare in class NamespaceContextImpl

declare

public void declare(java.lang.String prefix,
                    java.lang.String uri,
                    boolean forceEmit)
declares a new namespace prefix in the current context


declare

public java.lang.String declare(java.lang.String uri)
declares a new namespace prefix in the current context; the auto-allocated prefix is returned


getPrefix

public java.lang.String getPrefix(java.lang.String uri)
looks up the uri, returns the prefix it corresponds to


getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)

getPrefixes

public java.util.Iterator getPrefixes(java.lang.String uri)

emitDeclarations

public void emitDeclarations(WriteStream ws)
                      throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object