|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.xsl.result.TextResultHandler
A result handler that returns the concatenation of a result tree's text
nodes. Any attempt to add a non-text node to the result tree causes an
IllegalNodeException to be thrown.
This handler is used to instantiate templates that are allowed to create
only text nodes. There are three such templates in the 16-Dec-98 draft:
xsl:attribute, xsl:comment, and
xsl:pi.
| Constructor Summary | |
TextResultHandler()
Constructs a new text result handler. |
|
| Method Summary | |
void |
attribute(String name,
String value)
Receive notification of an attribute. |
void |
characters(String data)
Receive notification of character data. |
void |
comment(String value)
Receive notification of a comment. |
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(String name)
Receive notification of the end of an element. |
String |
getText()
Returns the result tree's text. |
void |
namespace(String name,
NamespaceName value)
Receive notification of a namespace node. |
void |
processingInstruction(String target,
String value)
Receive notification of a processing instruction. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(String name,
String namespaceURI)
Receive notification of the beginning of an element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextResultHandler()
| Method Detail |
public String getText()
public void startDocument()
throws ResultException
ResultHandler
startDocument in interface ResultHandlerResultException - if an implementation-dependent error occurs
public void endDocument()
throws ResultException
ResultHandler
endDocument in interface ResultHandlerResultException - if an implementation-dependent error occurs
public void startElement(String name,
String namespaceURI)
throws IllegalNameException,
IllegalNodeException,
ResultException
startElement in interface ResultHandlername - the element's namenamespaceURI - the element's namespace uri
IllegalNodeException - always thrown since only text nodes are allowed
IllegalNameException - if the specified element name is illegal
ResultException - if an implementation-dependent error occurs
public void endElement(String name)
throws ResultException
ResultHandler
endElement in interface ResultHandlerResultException - if an implementation-dependent error occurs
public void attribute(String name,
String value)
throws AttributeAfterChildException,
IllegalNameException,
IllegalNodeException,
ResultException
attribute in interface ResultHandlername - the attribute's namevalue - the attribute's value
IllegalNodeException - always thrown since only text nodes are allowed
AttributeAfterChildException - if the current node is an element with children
(attributes cannot be added to an element after children
have been added to it)
IllegalNameException - if the specified attribute name is illegal
ResultException - if an implementation-dependent error occurs
public void characters(String data)
throws IllegalNodeException,
ResultException
ResultHandler
characters in interface ResultHandlerdata - the character data
ResultException - if an implementation-dependent error occurs
IllegalNodeException - if the current node cannot contain character data
public void processingInstruction(String target,
String value)
throws IllegalNameException,
IllegalNodeException,
ResultException
processingInstruction in interface ResultHandlertarget - the processing instruction's targetvalue - the processing instruction's value, or null
if there is no value
IllegalNodeException - always thrown since only text nodes are allowed
ResultException - if an implementation-dependent error occurs
IllegalNameException - if the specified target name is illegal
public void comment(String value)
throws IllegalNodeException,
ResultException
comment in interface ResultHandlervalue - the comment's value
IllegalNodeException - always thrown since only text nodes are allowed
ResultException - if an implementation-dependent error occurs
public void namespace(String name,
NamespaceName value)
throws IllegalNodeException,
ResultException
namespace in interface ResultHandlername - the namespace prefixvalue - the namespace name (URI)
IllegalNodeException - always thrown since only text nodes are allowed
ResultException - if an implementation-dependent error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||