com.icl.saxon.output

Class NamespaceEmitter

Implemented Interfaces:
Result

public class NamespaceEmitter
extends ProxyEmitter

NamespaceEmitter is a ProxyEmitter responsible for removing duplicate namespace declarations. It also ensures that an xmlns="" undeclaration is output when necessary.

Nested Class Summary

Field Summary

protected NamePool
namePool
protected int
nscodeNull
protected int
nscodeXML

Fields inherited from class com.icl.saxon.output.ProxyEmitter

baseEmitter, outputProperties

Fields inherited from class com.icl.saxon.output.Emitter

locator, namePool, outputProperties, outputStream, systemId, writer

Method Summary

void
endElement(int nameCode)
endElement: Discard the namespaces declared on this element.
void
setNamePool(NamePool pool)
Set the name pool to be used for all name codes
void
startElement(int nameCode, Attributes attList, int[] namespaceCodes, int nrOfCodes)
startElement.

Methods inherited from class com.icl.saxon.output.ProxyEmitter

characters, comment, endDocument, endElement, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriter, startDocument, startElement

Methods inherited from class com.icl.saxon.output.Emitter

characters, comment, endDocument, endElement, getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, startDocument, startElement, usesWriter

Field Details

namePool

protected NamePool namePool


nscodeNull

protected int nscodeNull


nscodeXML

protected int nscodeXML

Method Details

endElement

public void endElement(int nameCode)
            throws TransformerException
endElement: Discard the namespaces declared on this element.
Overrides:
endElement in interface ProxyEmitter


setNamePool

public void setNamePool(NamePool pool)
Set the name pool to be used for all name codes
Overrides:
setNamePool in interface ProxyEmitter


startElement

public void startElement(int nameCode,
                         Attributes attList,
                         int[] namespaceCodes,
                         int nrOfCodes)
            throws TransformerException
startElement. This call removes redundant namespace declarations, and possibly adds an xmlns="" undeclaration.
Overrides:
startElement in interface ProxyEmitter