org.exolab.adaptx.xslt.dom

Class XPNBuilder

public class XPNBuilder extends Object implements ResultHandler

A ResultHandler implementation that builds a XPathNode tree

Version: $Revision: 3916 $ $Date: 2003-09-29 15:32:17 -0400 (Mon, 29 Sep 2003) $

Author: Keith Visco

Constructor Summary
XPNBuilder()
Creates a new XPNBuilder
XPNBuilder(String documentURI)
Creates a new XPNBuilder
Method Summary
voidcdata(char[] chars, int start, int length)
Signals to receive CDATA characters
voidcharacters(char[] chars, int start, int length)
Signals the start of characters
voidcomment(String data)
voidendDocument()
Signals the end of the document
voidendElement(String name)
Signals the start of element
voidendFragment()
voidentityReference(String name)
Signals to recieve an entity reference with the given name
XPathNodegetCurrentNode()
Returns the current node
XPathNodegetRoot()
Returns the Root node
voidignorableWhitespace(char[] chars, int start, int length)
Signals the start of ignorable whitespace characters
booleanisFinished()
Returns true if the DOM builder has completed
voidprocessingInstruction(String target, String data)
Signals to recieve a processing instruction
voidsetDocumentLocator(Locator locator)
Sets the document locator
voidsetEscapeText(boolean escapeText)
Sets the behavoir of handling character content.
voidsetIndentSize(short indentSize)
Sets the indent size for all formatters that perform serialization, in which indentation is applicable.
voidsetOutputFormat(OutputFormat format)
Sets the output format information for Formatters that perform serialization.
voidsetSaveLocation(boolean saveLocation)
Sets whether or not to save location information.
voidstartDocument()
Signals the start of a document
voidstartElement(String name, AttributeList atts)
Signals the start of element
XPathNodestartFragment()
Starts a documentFragment and returns a handle to the fragment This fragment won't be added to the DOM tree
voidunescapedCharacters(char[] chars, int start, int length)
Signals to receive characters which should not be escaped

Constructor Detail

XPNBuilder

public XPNBuilder()
Creates a new XPNBuilder

XPNBuilder

public XPNBuilder(String documentURI)
Creates a new XPNBuilder

Method Detail

cdata

public void cdata(char[] chars, int start, int length)
Signals to receive CDATA characters

Parameters: chars the character array containing the characters to receive start the index into the character array to start receiving characters at length the number of characters to recieve

characters

public void characters(char[] chars, int start, int length)
Signals the start of characters

Parameters: chars the character array containing the characters to receive start the index into the character array to start receiving characters at length the number of characters to recieve

comment

public void comment(String data)

endDocument

public void endDocument()
Signals the end of the document

endElement

public void endElement(String name)
Signals the start of element

Parameters: name the name of the element atts the AttributeList containing the associated attributes for the element

endFragment

public void endFragment()

entityReference

public void entityReference(String name)
Signals to recieve an entity reference with the given name

Parameters: name the name of the entity reference

getCurrentNode

public XPathNode getCurrentNode()
Returns the current node

Returns: the current node

getRoot

public XPathNode getRoot()
Returns the Root node

Returns: the root node

ignorableWhitespace

public void ignorableWhitespace(char[] chars, int start, int length)
Signals the start of ignorable whitespace characters

Parameters: chars the character array containing the characters to receive start the index into the character array to start receiving characters at length the number of characters to recieve

isFinished

public boolean isFinished()
Returns true if the DOM builder has completed

Returns: true if the DOM builder has completed

processingInstruction

public void processingInstruction(String target, String data)
Signals to recieve a processing instruction

Parameters: target the target of the processing instruction data the content of the processing instruction

setDocumentLocator

public void setDocumentLocator(Locator locator)
Sets the document locator

Parameters: locator the Locator used by this DocumentHandler

setEscapeText

public void setEscapeText(boolean escapeText)
Sets the behavoir of handling character content. If argument is true, character content will be escaped. If false, character content will not be escaped.

Parameters: escapeText the flag indicating whether or not to escape character content

setIndentSize

public void setIndentSize(short indentSize)
Sets the indent size for all formatters that perform serialization, in which indentation is applicable.

Parameters: indentSize the number of characters to indent

setOutputFormat

public void setOutputFormat(OutputFormat format)
Sets the output format information for Formatters that perform serialization.

Parameters: format the OutputFormat used to specify properties during serialization

setSaveLocation

public void setSaveLocation(boolean saveLocation)
Sets whether or not to save location information. Location information can only be saved if the Locator has been set by the SAX Parser.

Parameters: saveLocation a boolean that when true, indicates that location information should be saved if possible.

startDocument

public void startDocument()
Signals the start of a document

startElement

public void startElement(String name, AttributeList atts)
Signals the start of element

Parameters: name the name of the element atts the AttributeList containing the associated attributes for the element

startFragment

public XPathNode startFragment()
Starts a documentFragment and returns a handle to the fragment This fragment won't be added to the DOM tree

unescapedCharacters

public void unescapedCharacters(char[] chars, int start, int length)
Signals to receive characters which should not be escaped

Parameters: chars the character array containing the characters to receive start the index into the character array to start receiving characters at length the number of characters to recieve