com.icl.saxon.output

Class DocumentHandlerProxy

public class DocumentHandlerProxy extends Emitter

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
protected DocumentHandlerhandler
protected AttributeListImploutputAtts
Method Summary
voidcharacters(char[] chars, int start, int len)
Character data
voidcomment(char[] ch, int start, int length)
Output a comment
voidendDocument()
End of document
voidendElement(int nameCode)
End of element
voidprocessingInstruction(String target, String data)
Processing Instruction
voidsetDocumentLocator(Locator locator)
Set Document Locator
voidsetUnderlyingDocumentHandler(DocumentHandler handler)
Set the underlying document handler.
voidstartDocument()
Start of document
voidstartElement(int nameCode, Attributes attributes, int[] namespaces, int nscount)
Start of element

Field Detail

handler

protected DocumentHandler handler

outputAtts

protected AttributeListImpl outputAtts

Method Detail

characters

public void characters(char[] chars, int start, int len)
Character data

comment

public void comment(char[] ch, int start, int length)
Output a comment

endDocument

public void endDocument()
End of document

endElement

public void endElement(int nameCode)
End of element

processingInstruction

public void processingInstruction(String target, String data)
Processing Instruction

setDocumentLocator

public void setDocumentLocator(Locator locator)
Set Document Locator

setUnderlyingDocumentHandler

public void setUnderlyingDocumentHandler(DocumentHandler handler)
Set the underlying document handler. This call is mandatory before using the Emitter.

startDocument

public void startDocument()
Start of document

startElement

public void startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount)
Start of element