Package com.icl.saxon.output
Class NamespaceEmitter
- java.lang.Object
-
- com.icl.saxon.output.Emitter
-
- com.icl.saxon.output.ProxyEmitter
-
- com.icl.saxon.output.NamespaceEmitter
-
- All Implemented Interfaces:
javax.xml.transform.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected NamePoolnamePoolprotected intnscodeNullprotected intnscodeXML-
Fields inherited from class com.icl.saxon.output.ProxyEmitter
baseEmitter, outputProperties
-
Fields inherited from class com.icl.saxon.output.Emitter
locator, outputStream, systemId, writer
-
-
Constructor Summary
Constructors Constructor Description NamespaceEmitter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendElement(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, org.xml.sax.Attributes attList, int[] namespaceCodes, int nrOfCodes)startElement.-
Methods inherited from class com.icl.saxon.output.ProxyEmitter
characters, comment, endDocument, processingInstruction, setDocumentLocator, setEscaping, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriter, startDocument
-
Methods inherited from class com.icl.saxon.output.Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputStream, setSystemId, usesWriter
-
-
-
-
Field Detail
-
namePool
protected NamePool namePool
-
nscodeXML
protected int nscodeXML
-
nscodeNull
protected int nscodeNull
-
-
Method Detail
-
setNamePool
public void setNamePool(NamePool pool)
Set the name pool to be used for all name codes- Overrides:
setNamePoolin classProxyEmitter
-
startElement
public void startElement(int nameCode, org.xml.sax.Attributes attList, int[] namespaceCodes, int nrOfCodes) throws javax.xml.transform.TransformerExceptionstartElement. This call removes redundant namespace declarations, and possibly adds an xmlns="" undeclaration.- Overrides:
startElementin classProxyEmitternamespaceCodes- Array of namespace codes identifying the namespace prefix/uri pairs associated with this elementnrOfCodes- Number of significant entries within namespaces array- Throws:
javax.xml.transform.TransformerException
-
endElement
public void endElement(int nameCode) throws javax.xml.transform.TransformerExceptionendElement: Discard the namespaces declared on this element.- Overrides:
endElementin classProxyEmitter- Throws:
javax.xml.transform.TransformerException
-
-