com.icl.saxon.output

## Class ErrorEmitter

- java.lang.Object
- - com.icl.saxon.output.Emitter
  - - com.icl.saxon.output.ErrorEmitter

- All Implemented Interfaces:
    javax.xml.transform.Result

      public class ErrorEmitter
      extends Emitter

  ErrorEmitter is an Emitter that generates an error message if any attempt is made to produce output. It is used while a saxon:function is active to prevent functions writing to the result tree.

- - ### Field Summary

    - ### Fields inherited from class com.icl.saxon.output.Emitter

      `locator, namePool, outputProperties, outputStream, systemId, writer`

    - ### Fields inherited from interface javax.xml.transform.Result

      `PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ErrorEmitter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] ch, int start, int length)` Character data.
    `void` | `comment(char[] ch, int start, int length)` Handle a comment.
    `void` | `endDocument()` End of the document.
    `void` | `endElement(int name)` End of an element.
    `void` | `processingInstruction(java.lang.String target, java.lang.String data)` Handle a processing instruction.
    `void` | `startDocument()` Start of the document.
    `void` | `startElement(int name, org.xml.sax.Attributes attributes, int[] namespaces, int nscount)` Start of an element.

    - ### Methods inherited from class com.icl.saxon.output.Emitter

      `getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, usesWriter`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ErrorEmitter

          public ErrorEmitter()

  - ### Method Detail

    - #### startDocument

          public void startDocument()
                             throws javax.xml.transform.TransformerException

      Start of the document.
      Specified by:
        `startDocument` in class `Emitter`
      Throws:
        `javax.xml.transform.TransformerException`

    - #### endDocument

          public void endDocument()
                           throws javax.xml.transform.TransformerException

      End of the document.
      Specified by:
        `endDocument` in class `Emitter`
      Throws:
        `javax.xml.transform.TransformerException`

    - #### startElement

          public void startElement(int name,
                          org.xml.sax.Attributes attributes,
                          int[] namespaces,
                          int nscount)
                            throws javax.xml.transform.TransformerException

      Start of an element. Output the start tag, escaping special characters.
      Specified by:
        `startElement` in class `Emitter`
        `namespaces` - Array of namespace codes identifying the namespace prefix/uri pairs associated with this element
        `nscount` - Number of significant entries within namespaces array
      Throws:
        `javax.xml.transform.TransformerException`

    - #### endElement

          public void endElement(int name)
                          throws javax.xml.transform.TransformerException

      End of an element.
      Specified by:
        `endElement` in class `Emitter`
      Throws:
        `javax.xml.transform.TransformerException`

    - #### characters

          public void characters(char[] ch,
                        int start,
                        int length)
                          throws javax.xml.transform.TransformerException

      Character data.
      Specified by:
        `characters` in class `Emitter`
      Throws:
        `javax.xml.transform.TransformerException`

    - #### processingInstruction

          public void processingInstruction(java.lang.String target,
                                   java.lang.String data)
                                     throws javax.xml.transform.TransformerException

      Handle a processing instruction.
      Specified by:
        `processingInstruction` in class `Emitter`
      Throws:
        `javax.xml.transform.TransformerException`

    - #### comment

          public void comment(char[] ch,
                     int start,
                     int length)
                       throws javax.xml.transform.TransformerException

      Handle a comment.
      Specified by:
        `comment` in class `Emitter`
      Throws:
        `javax.xml.transform.TransformerException`