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

## org.apache.xalan.xsltc.runtime
Class DefaultSAXOutputHandler

    java.lang.Object
      |
      +--org.apache.xalan.xsltc.runtime.DefaultSAXOutputHandler

public class DefaultSAXOutputHandler
extends java.lang.Object
implements ContentHandler, LexicalHandler

Constructor Summary
`DefaultSAXOutputHandler(java.io.OutputStream out, java.lang.String encoding)` Constructor - set output-stream & output encoding.
`DefaultSAXOutputHandler(java.lang.String filename, java.lang.String encoding)` Constructor - set output file and output encoding
`DefaultSAXOutputHandler(java.io.Writer writer)` Constructor - simple, initially for use in servlets
`DefaultSAXOutputHandler(java.io.Writer writer, java.lang.String encoding)` Constructor - set Writer to send output to and output encoding

Method Summary
`void` | `characters(char[] ch, int off, int len)` SAX2: Receive notification of character data.
`void` | `close()` Close the output stream
`void` | `comment(char[] ch, int start, int length)`
`void` | `endCDATA()`
`void` | `endDocument()` SAX2: Receive notification of the end of an element.
`void` | `endDTD()`
`void` | `endElement(java.lang.String uri, java.lang.String localname, java.lang.String elementName)` SAX2: Receive notification of the end of an element.
`void` | `endEntity(java.lang.String name)`
`void` | `endPrefixMapping(java.lang.String prefix)` SAX2: End the scope of a prefix-URI Namespace mapping.
`void` | `ignorableWhitespace(char[] ch, int start, int len)` SAX2: Receive notification of ignorable whitespace in element content.
`void` | `omitHeader(boolean value)` Turns xml declaration generation on/off, dependent on the attribute omit-xml-declaration in any xsl:output element.
`void` | `processingInstruction(java.lang.String target, java.lang.String data)` SAX2: Receive notification of a processing instruction.
`void` | `setDocumentLocator(Locator locator)` SAX2: Receive an object for locating the origin of SAX document events.
`void` | `setIndent(boolean indent)` Turns output indentation on/off (used with XML and HTML output only) Breaks the SAX HandlerBase interface, but TextOutput will only call this method of the SAX handler is an instance of this class.
`void` | `setOutputType(int type)` Set the output type (either TEXT, HTML or XML) Breaks the SAX HandlerBase interface, but TextOutput will only call this method of the SAX handler is an instance of this class.
`void` | `setStandalone(java.lang.String standalone)` Sets the 'standalone' attribute that will be output in the XML header.
`void` | `setVersion(java.lang.String version)` Sets the version number that will be output in the XML header.
`void` | `skippedEntity(java.lang.String name)` SAX2: Receive notification of a skipped entity.
`void` | `startCDATA()`
`void` | `startDocument()` SAX2: Receive notification of the beginning of a document.
`void` | `startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)` This method is part of the LexicalHandler interface.
`void` | `startElement(java.lang.String uri, java.lang.String localname, java.lang.String elementName, Attributes attrs)` SAX2: Receive notification of the beginning of an element.
`void` | `startEntity(java.lang.String name)`
`void` | `startPrefixMapping(java.lang.String prefix, java.lang.String uri)` SAX2: Begin the scope of a prefix-URI Namespace mapping.

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

Constructor Detail

### DefaultSAXOutputHandler

    public DefaultSAXOutputHandler(java.io.Writer writer,
                                   java.lang.String encoding)
                            throws java.io.IOException

  Constructor - set Writer to send output to and output encoding

### DefaultSAXOutputHandler

    public DefaultSAXOutputHandler(java.io.Writer writer)
                            throws java.io.IOException

  Constructor - simple, initially for use in servlets

### DefaultSAXOutputHandler

    public DefaultSAXOutputHandler(java.io.OutputStream out,
                                   java.lang.String encoding)
                            throws java.io.IOException

  Constructor - set output-stream & output encoding.

### DefaultSAXOutputHandler

    public DefaultSAXOutputHandler(java.lang.String filename,
                                   java.lang.String encoding)
                            throws java.io.IOException

  Constructor - set output file and output encoding

Method Detail

### close

    public void close()

  Close the output stream

### startDocument

    public void startDocument()
                       throws SAXException

  SAX2: Receive notification of the beginning of a document.
  Specified by:
    startDocument in interface ContentHandler

### endDocument

    public void endDocument()
                     throws SAXException

  SAX2: Receive notification of the end of an element.
  Specified by:
    endDocument in interface ContentHandler

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localname,
                             java.lang.String elementName,
                             Attributes attrs)
                      throws SAXException

  SAX2: Receive notification of the beginning of an element.
  Specified by:
    startElement in interface ContentHandler

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localname,
                           java.lang.String elementName)
                    throws SAXException

  SAX2: Receive notification of the end of an element.
  Specified by:
    endElement in interface ContentHandler

### characters

    public void characters(char[] ch,
                           int off,
                           int len)
                    throws SAXException

  SAX2: Receive notification of character data.
  Specified by:
    characters in interface ContentHandler

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.String data)
                               throws SAXException

  SAX2: Receive notification of a processing instruction.
  Specified by:
    processingInstruction in interface ContentHandler

### ignorableWhitespace

    public void ignorableWhitespace(char[] ch,
                                    int start,
                                    int len)

  SAX2: Receive notification of ignorable whitespace in element content.
  Specified by:
    ignorableWhitespace in interface ContentHandler

### setDocumentLocator

    public void setDocumentLocator(Locator locator)

  SAX2: Receive an object for locating the origin of SAX document events.
  Specified by:
    setDocumentLocator in interface ContentHandler

### skippedEntity

    public void skippedEntity(java.lang.String name)

  SAX2: Receive notification of a skipped entity.
  Specified by:
    skippedEntity in interface ContentHandler

### startPrefixMapping

    public void startPrefixMapping(java.lang.String prefix,
                                   java.lang.String uri)

  SAX2: Begin the scope of a prefix-URI Namespace mapping. Namespace declarations are output in startElement()
  Specified by:
    startPrefixMapping in interface ContentHandler

### endPrefixMapping

    public void endPrefixMapping(java.lang.String prefix)

  SAX2: End the scope of a prefix-URI Namespace mapping.
  Specified by:
    endPrefixMapping in interface ContentHandler

### startCDATA

    public void startCDATA()

  Specified by:
    startCDATA in interface LexicalHandler

### endCDATA

    public void endCDATA()

  Specified by:
    endCDATA in interface LexicalHandler

### comment

    public void comment(char[] ch,
                        int start,
                        int length)

  Specified by:
    comment in interface LexicalHandler

### startEntity

    public void startEntity(java.lang.String name)

  Specified by:
    startEntity in interface LexicalHandler

### endDTD

    public void endDTD()

  Specified by:
    endDTD in interface LexicalHandler

### endEntity

    public void endEntity(java.lang.String name)

  Specified by:
    endEntity in interface LexicalHandler

### startDTD

    public void startDTD(java.lang.String name,
                         java.lang.String publicId,
                         java.lang.String systemId)
                  throws SAXException

  This method is part of the LexicalHandler interface. It is only used to pass DOCTYPE declarations (based on the doctype-system/public attributes in the element) to the output handler.
  Specified by:
    startDTD in interface LexicalHandler
  Parameters:
    `name` - The document type name (name of first element)
    `publicId` -
    `systemId` -
  Throws:
    SAXException - Whenever

### setIndent

    public void setIndent(boolean indent)

  Turns output indentation on/off (used with XML and HTML output only) Breaks the SAX HandlerBase interface, but TextOutput will only call this method of the SAX handler is an instance of this class.

### setVersion

    public void setVersion(java.lang.String version)

  Sets the version number that will be output in the XML header.

### setStandalone

    public void setStandalone(java.lang.String standalone)

  Sets the 'standalone' attribute that will be output in the XML header. The attribute will be omitted unless this method is called.

### omitHeader

    public void omitHeader(boolean value)

  Turns xml declaration generation on/off, dependent on the attribute omit-xml-declaration in any xsl:output element. Breaks the SAX HandlerBase interface, but TextOutput will only call this method of the SAX handler is an instance of this class.

### setOutputType

    public void setOutputType(int type)
                       throws SAXException

  Set the output type (either TEXT, HTML or XML) Breaks the SAX HandlerBase interface, but TextOutput will only call this method of the SAX handler is an instance of this class.

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

Copyright © 2002 Apache XML Project. All Rights Reserved.