Class DocumentHandlerProxy
java.lang.Object
com.icl.saxon.output.Emitter
com.icl.saxon.output.DocumentHandlerProxy
- All Implemented Interfaces:
Result
A DocumentHandlerProxy is an Emitter that filters data before passing it to an
underlying SAX DocumentHandler. Note that in general the output passed to an Emitter
corresponds to an External General Parsed Entity. A SAX DocumentHandler only expects
to deal with well-formed XML documents, so we only pass it the contents of the first
element encountered.
-
Field Summary
FieldsFields inherited from class Emitter
locator, namePool, outputProperties, outputStream, systemId, writerFields inherited from interface Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] chars, int start, int len) Character datavoidcomment(char[] ch, int start, int length) Output a commentvoidEnd of documentvoidendElement(int nameCode) End of elementvoidprocessingInstruction(String target, String data) Processing InstructionvoidsetDocumentLocator(Locator locator) Set Document LocatorvoidSet the underlying document handler.voidStart of documentvoidstartElement(int nameCode, Attributes attributes, int[] namespaces, int nscount) Start of elementMethods inherited from class Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, usesWriter
-
Field Details
-
handler
-
outputAtts
-
-
Constructor Details
-
DocumentHandlerProxy
public DocumentHandlerProxy()
-
-
Method Details
-
setUnderlyingDocumentHandler
Set the underlying document handler. This call is mandatory before using the Emitter. -
setDocumentLocator
Set Document Locator- Overrides:
setDocumentLocatorin classEmitter
-
startDocument
Start of document- Specified by:
startDocumentin classEmitter- Throws:
TransformerException
-
endDocument
End of document- Specified by:
endDocumentin classEmitter- Throws:
TransformerException
-
startElement
public void startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount) throws TransformerException Start of element- Specified by:
startElementin classEmitter- Parameters:
namespaces- Array of namespace codes identifying the namespace prefix/uri pairs associated with this elementnscount- Number of significant entries within namespaces array- Throws:
TransformerException
-
endElement
End of element- Specified by:
endElementin classEmitter- Throws:
TransformerException
-
characters
Character data- Specified by:
charactersin classEmitter- Throws:
TransformerException
-
processingInstruction
Processing Instruction- Specified by:
processingInstructionin classEmitter- Throws:
TransformerException
-
comment
-