Class NamespaceEmitter
java.lang.Object
com.icl.saxon.output.Emitter
com.icl.saxon.output.ProxyEmitter
com.icl.saxon.output.NamespaceEmitter
- All Implemented Interfaces:
Result
NamespaceEmitter is a ProxyEmitter responsible for removing duplicate namespace
declarations. It also ensures that an xmlns="" undeclaration is output when
necessary.
-
Field Summary
FieldsFields inherited from class ProxyEmitter
baseEmitter, outputPropertiesFields inherited from class Emitter
locator, outputStream, systemId, writerFields inherited from interface Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(int nameCode) endElement: Discard the namespaces declared on this element.voidsetNamePool(NamePool pool) Set the name pool to be used for all name codesvoidstartElement(int nameCode, Attributes attList, int[] namespaceCodes, int nrOfCodes) startElement.Methods inherited from class ProxyEmitter
characters, comment, endDocument, processingInstruction, setDocumentLocator, setEscaping, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriter, startDocumentMethods inherited from class Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputStream, setSystemId, usesWriter
-
Field Details
-
namePool
-
nscodeXML
protected int nscodeXML -
nscodeNull
protected int nscodeNull
-
-
Constructor Details
-
NamespaceEmitter
public NamespaceEmitter()
-
-
Method Details
-
setNamePool
Set the name pool to be used for all name codes- Overrides:
setNamePoolin classProxyEmitter
-
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:
startElementin classProxyEmitter- Parameters:
namespaceCodes- Array of namespace codes identifying the namespace prefix/uri pairs associated with this elementnrOfCodes- Number of significant entries within namespaces array- Throws:
TransformerException
-
endElement
endElement: Discard the namespaces declared on this element.- Overrides:
endElementin classProxyEmitter- Throws:
TransformerException
-