Package com.icl.saxon.output
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 com.icl.saxon.output.Emitter
locator, namePool, outputProperties, outputStream, systemId, writer
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] chars, int start, int len) Character datavoid
comment
(char[] ch, int start, int length) Output a commentvoid
End of documentvoid
endElement
(int nameCode) End of elementvoid
processingInstruction
(String target, String data) Processing Instructionvoid
setDocumentLocator
(Locator locator) Set Document Locatorvoid
Set the underlying document handler.void
Start of documentvoid
startElement
(int nameCode, Attributes attributes, int[] namespaces, int nscount) Start of elementMethods inherited from class com.icl.saxon.output.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:
setDocumentLocator
in classEmitter
-
startDocument
Start of document- Specified by:
startDocument
in classEmitter
- Throws:
TransformerException
-
endDocument
End of document- Specified by:
endDocument
in classEmitter
- Throws:
TransformerException
-
startElement
public void startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount) throws TransformerException Start of element- Specified by:
startElement
in 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:
endElement
in classEmitter
- Throws:
TransformerException
-
characters
Character data- Specified by:
characters
in classEmitter
- Throws:
TransformerException
-
processingInstruction
Processing Instruction- Specified by:
processingInstruction
in classEmitter
- Throws:
TransformerException
-
comment
public void comment(char[] ch, int start, int length) Output a comment
-