com.icl.saxon.tinytree

Class TinyBuilder

Implemented Interfaces:
ErrorHandler, Locator, Result, SourceLocator

public class TinyBuilder
extends Builder

The TinyBuilder class is responsible for taking a stream of SAX events and constructing a Document tree, using the "TinyTree" implementation.

Field Summary

Fields inherited from class com.icl.saxon.om.Builder

STANDARD_TREE, TINY_TREE, columnNumber, controller, currentDocument, discardComments, errorHandler, errorListener, errorOutput, estimatedLength, failed, inDTD, lineNumber, lineNumbering, previewManager, started, stripper, timing

Fields inherited from class com.icl.saxon.output.Emitter

locator, namePool, outputProperties, outputStream, systemId, writer

Method Summary

void
characters(ch[] , int start, int len)
Callback interface for SAX: not for application use
void
comment(ch[] , int start, int length)
Callback interface for SAX: not for application use
void
createDocument()
void
endDocument()
Callback interface for SAX: not for application use
void
endElement(int nameCode)
Callback interface for SAX: not for application use
void
processingInstruction(String piname, String remainder)
Callback interface for SAX: not for application use
Note: because SAX1 does not deliver comment nodes, we get these in the form of a processing instruction with a null name.
void
setUnparsedEntity(String name, String uri)
Set an unparsed entity in the document
void
startDocument()
Callback interface for SAX: not for application use
void
startElement(int nameCode, Attributes attributes, int[] namespaces, int namespacesUsed)
Callback interface for SAX: not for application use

Methods inherited from class com.icl.saxon.om.Builder

build, error, fatalError, getColumnNumber, getCurrentDocument, getLineNumber, getPublicId, getStripper, isTiming, reportError, setController, setDiscardCommentsAndPIs, setErrorHandler, setErrorListener, setErrorOutput, setLineNumbering, setPreviewManager, setRootNode, setStripper, setTiming, setUnparsedEntity, warning

Methods inherited from class com.icl.saxon.output.Emitter

characters, comment, endDocument, endElement, getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, startDocument, startElement, usesWriter

Method Details

characters

public void characters(ch[] ,
                       int start,
                       int len)
            throws TransformerException
Callback interface for SAX: not for application use

comment

public void comment(ch[] ,
                    int start,
                    int length)
            throws TransformerException
Callback interface for SAX: not for application use

createDocument

public void createDocument()

endDocument

public void endDocument()
            throws TransformerException
Callback interface for SAX: not for application use
Overrides:
endDocument in interface Emitter

endElement

public void endElement(int nameCode)
            throws TransformerException
Callback interface for SAX: not for application use
Overrides:
endElement in interface Emitter

processingInstruction

public void processingInstruction(String piname,
                                  String remainder)
            throws TransformerException
Callback interface for SAX: not for application use
Note: because SAX1 does not deliver comment nodes, we get these in the form of a processing instruction with a null name. This requires a specially-adapted SAX driver.
Overrides:
processingInstruction in interface Emitter

setUnparsedEntity

public void setUnparsedEntity(String name,
                              String uri)
Set an unparsed entity in the document
Overrides:
setUnparsedEntity in interface Builder

startDocument

public void startDocument()
            throws TransformerException
Callback interface for SAX: not for application use
Overrides:
startDocument in interface Emitter

startElement

public void startElement(int nameCode,
                         Attributes attributes,
                         int[] namespaces,
                         int namespacesUsed)
            throws TransformerException
Callback interface for SAX: not for application use
Overrides:
startElement in interface Emitter