Class XPNBuilder
java.lang.Object
org.exolab.adaptx.xslt.dom.XPNBuilder
- All Implemented Interfaces:
ResultHandler, DocumentHandler
A ResultHandler implementation that builds a XPathNode tree
- Version:
- $Revision: 3916 $ $Date: 2003-09-29 21:32:17 +0200 (Mon, 29 Sep 2003) $
- Author:
- Keith Visco
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new XPNBuilderXPNBuilder(String documentURI) Creates a new XPNBuilder -
Method Summary
Modifier and TypeMethodDescriptionvoidcdata(char[] chars, int start, int length) Signals to receive CDATA charactersvoidcharacters(char[] chars, int start, int length) Signals the start of charactersvoidSignals to recieve a commentvoidSignals the end of the documentvoidendElement(String name) Signals the start of elementvoidvoidentityReference(String name) Signals to recieve an entity reference with the given nameReturns the current nodegetRoot()Returns the Root nodevoidignorableWhitespace(char[] chars, int start, int length) Signals the start of ignorable whitespace charactersbooleanReturns true if the DOM builder has completedvoidprocessingInstruction(String target, String data) Signals to recieve a processing instructionvoidsetDocumentLocator(Locator locator) Sets the document locatorvoidsetEscapeText(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.voidSignals the start of a documentvoidstartElement(String name, AttributeList atts) Signals the start of elementStarts a documentFragment and returns a handle to the fragment This fragment won't be added to the DOM treevoidunescapedCharacters(char[] chars, int start, int length) Signals to receive characters which should not be escaped
-
Constructor Details
-
XPNBuilder
public XPNBuilder()Creates a new XPNBuilder -
XPNBuilder
Creates a new XPNBuilder
-
-
Method Details
-
cdata
public void cdata(char[] chars, int start, int length) Signals to receive CDATA characters- Specified by:
cdatain interfaceResultHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve
-
characters
Signals the start of characters- Specified by:
charactersin interfaceDocumentHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve- Throws:
SAXException
-
comment
Description copied from interface:ResultHandlerSignals to recieve a comment- Specified by:
commentin interfaceResultHandler- Parameters:
data- , the content of the comment
-
endDocument
Signals the end of the document- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endElement
Signals the start of element- Specified by:
endElementin interfaceDocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
SAXException
-
entityReference
Signals to recieve an entity reference with the given name- Specified by:
entityReferencein interfaceResultHandler- Parameters:
name- the name of the entity reference
-
startFragment
Starts a documentFragment and returns a handle to the fragment This fragment won't be added to the DOM tree -
endFragment
public void endFragment() -
getCurrentNode
-
getRoot
-
ignorableWhitespace
Signals the start of ignorable whitespace characters- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve- Throws:
SAXException
-
isFinished
public boolean isFinished()Returns true if the DOM builder has completed- Returns:
- true if the DOM builder has completed
-
processingInstruction
Signals to recieve a processing instruction- Specified by:
processingInstructionin interfaceDocumentHandler- Parameters:
target- the target of the processing instructiondata- the content of the processing instruction- Throws:
SAXException
-
setDocumentLocator
Sets the document locator- Specified by:
setDocumentLocatorin interfaceDocumentHandler- 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.- Specified by:
setIndentSizein interfaceResultHandler- Parameters:
indentSize- the number of characters to indent
-
setOutputFormat
Sets the output format information for Formatters that perform serialization.- Specified by:
setOutputFormatin interfaceResultHandler- 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
Signals the start of a document- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
Signals the start of element- Specified by:
startElementin interfaceDocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
SAXException
-
unescapedCharacters
public void unescapedCharacters(char[] chars, int start, int length) Signals to receive characters which should not be escaped- Specified by:
unescapedCharactersin interfaceResultHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve
-