Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.xsl.result
Class TextSerializer

    java.lang.Object
      com.novell.xsl.result.SerializerImpl
          com.novell.xsl.result.TextSerializer

All Implemented Interfaces:
  ResultHandler, Serializer

    public class TextSerializer

extends SerializerImpl
implements ResultHandler, Serializer

Class to serialize the result tree text nodes without any XML escaping This implements the

Field Summary

Fields inherited from class com.novell.xsl.result.SerializerImpl
`actualEncoding, options, stream, writer`

Constructor Summary
`TextSerializer()` Construct a default XML serializer
`TextSerializer(OutputStream stream)` Construct an XML serializer that will output to the passed stream

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.
`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 com.novell.xsl.result.SerializerImpl
`getOptions, getStream, initWriter, noTextEscaping, setOptions, setStream`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.novell.xsl.result.Serializer
`getOptions, getStream, noTextEscaping, setOptions, setStream`

Constructor Detail

### TextSerializer

    public TextSerializer()

  Construct a default XML serializer

### TextSerializer

    public TextSerializer(OutputStream stream)

  Construct an XML serializer that will output to the passed stream

Method Detail

### startDocument

    public void startDocument()
                       throws ResultException

  Receive notification of the beginning of a document.

  Specified by:
    `startDocument` in interface `ResultHandler`
  Throws:
    `ResultException` - if an implementation-dependent error occurs

### endDocument

    public void endDocument()
                     throws ResultException

  Receive notification of the end of a document.

  Specified by:
    `endDocument` in interface `ResultHandler`
  Throws:
    `ResultException` - if an implementation-dependent error occurs

### startElement

    public void startElement(String name,
                             String namespaceURI)
                      throws IllegalNameException,
                             IllegalNodeException,
                             ResultException

  Receive notification of the beginning of an element.

  Specified by:
    `startElement` in interface `ResultHandler`
  Parameters:
    `name` - the element's name
    `namespaceURI` - the element's namespace uri
  Throws:
    `IllegalNameException` - if the specified element name is illegal
    `IllegalNodeException` - if the current node cannot contain elements
    `ResultException` - if an implementation-dependent error occurs

### endElement

    public void endElement(String name)
                    throws ResultException

  Receive notification of the end of an element.

  Specified by:
    `endElement` in interface `ResultHandler`
  Throws:
    `ResultException` - if an implementation-dependent error occurs

### attribute

    public void attribute(String name,
                          String value)
                   throws AttributeAfterChildException,
                          IllegalNameException,
                          IllegalNodeException,
                          ResultException

  Receive notification of an attribute.

  Specified by:
    `attribute` in interface `ResultHandler`
  Parameters:
    `name` - the attribute's name
    `value` - the attribute's value
  Throws:
    `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
    `IllegalNodeException` - if the current node is not an element
    `ResultException` - if an implementation-dependent error occurs

### characters

    public void characters(String data)
                    throws IllegalNodeException,
                           ResultException

  Receive notification of character data.

  Specified by:
    `characters` in interface `ResultHandler`
  Parameters:
    `data` - the character data
  Throws:
    `IllegalNodeException` - if the current node cannot contain character data
    `ResultException` - if an implementation-dependent error occurs

### processingInstruction

    public void processingInstruction(String target,
                                      String value)
                               throws IllegalNameException,
                                      IllegalNodeException,
                                      ResultException

  Receive notification of a processing instruction.

  Specified by:
    `processingInstruction` in interface `ResultHandler`
  Parameters:
    `target` - the processing instruction's target
    `value` - the processing instruction's value, or `null` if there is no value
  Throws:
    `IllegalNameException` - if the specified target name is illegal
    `IllegalNodeException` - if the current node cannot contain processing instructions
    `ResultException` - if an implementation-dependent error occurs

### comment

    public void comment(String value)
                 throws IllegalNodeException,
                        ResultException

  Receive notification of a comment.

  Specified by:
    `comment` in interface `ResultHandler`
  Parameters:
    `value` - the comment's value
  Throws:
    `IllegalNodeException` - if the current node cannot contain comments
    `ResultException` - if an implementation-dependent error occurs

### namespace

    public void namespace(String name,
                          NamespaceName value)
                   throws IllegalNodeException,
                          ResultException

  Receive notification of a namespace node. An implementation should keep track of what namespace attributes are in scope in the xml representation to avoid placing redundant attributes on elements.

  Specified by:
    `namespace` in interface `ResultHandler`
  Parameters:
    `name` - the namespace prefix
    `value` - the namespace name (URI)
  Throws:
    `IllegalNodeException` - if the current node cannot contain namespaces
    `ResultException` - if an implementation-dependent error occurs

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD