com.icl.saxon.om
public abstract class Builder extends Emitter implements ErrorHandler, Locator, SourceLocator
| Field Summary | |
|---|---|
| protected int | columnNumber |
| protected Controller | controller |
| protected DocumentInfo | currentDocument |
| protected boolean | discardComments |
| protected ErrorHandler | errorHandler |
| protected ErrorListener | errorListener |
| protected Writer | errorOutput |
| protected int | estimatedLength |
| protected boolean | failed |
| protected boolean | inDTD |
| protected int | lineNumber |
| protected boolean | lineNumbering |
| protected PreviewManager | previewManager |
| protected boolean | started |
| protected Stripper | stripper |
| static int | STANDARD_TREE |
| protected boolean | timing |
| static int | TINY_TREE |
| Constructor Summary | |
|---|---|
| Builder()
create a Builder and initialise variables | |
| Method Summary | |
|---|---|
| DocumentInfo | build(SAXSource source)
Build the tree from an input source. |
| void | error(SAXParseException e)
Callback interface for SAX: not for application use |
| void | fatalError(SAXParseException e)
Callback interface for SAX: not for application use |
| int | getColumnNumber() |
| DocumentInfo | getCurrentDocument()
Get the current document |
| int | getLineNumber() |
| String | getPublicId() |
| Stripper | getStripper()
Get the Stripper in use |
| boolean | isTiming()
Get timing option |
| protected void | reportError(SAXParseException e, boolean isFatal)
Common routine for errors and fatal errors |
| void | setController(Controller c) |
| void | setDiscardCommentsAndPIs(boolean discard)
Indicate whether comments and Processing Instructions should be discarded |
| void | setErrorHandler(ErrorHandler eh)
Set the SAX error handler to use. |
| void | setErrorListener(ErrorListener eh)
Set the JAXP error listener to use, if no SAX errorHandler has been provided. |
| void | setErrorOutput(Writer writer)
Set output for error messages produced by the default error handler. The default error handler does not throw an exception for parse errors or input I/O errors, rather it returns a result code and writes diagnostics to a user-specified output writer, which defaults to System.err This call has no effect if setErrorHandler() has been called to supply a user-defined error handler |
| void | setLineNumbering(boolean onOrOff)
Set line numbering on or off |
| void | setPreviewManager(PreviewManager pm)
Set the PreviewManager to use |
| void | setRootNode(DocumentInfo doc)
Set the root (document) node to use. |
| void | setStripper(Stripper s)
Set the Stripper to use |
| void | setTiming(boolean on)
Set timing option on or off |
| abstract void | setUnparsedEntity(String name, String uri)
Set the URI for an unparsed entity in the document.
|
| void | warning(SAXParseException e)
Callback interface for SAX: not for application use |
Parameters: source The source to use. SAXSource is a SAX-defined class that allows input from a URL, a byte stream, or a character stream. SAXON also provides a subclass, ExtendedInputSource, that allows input directly from a File.
Returns: The DocumentInfo object that results from parsing the input.
Throws: TransformerException if the input document could not be read or if it was not parsed correctly.
Returns: the document that has been most recently built using this builder
UNKNOWN: discard true if comments and PIs are to be discarded, false if they are to be added to the tree
Parameters: eh The error handler to use. It must conform to the interface org.xml.sax.ErrorHandler
Parameters: eh The error listener to use. It must conform to the interface javax.xml.transform.ErrorListener
Parameters: writer The Writer to use for error messages