net.sf.joost.emitter
Class SAXEmitter

java.lang.Object
  extended by net.sf.joost.emitter.StxEmitterBase
      extended by net.sf.joost.emitter.SAXEmitter
All Implemented Interfaces:
Constants, StxEmitter, ContentHandler, LexicalHandler

public class SAXEmitter
extends StxEmitterBase

This class implements the common interface StxEmitter. Is is designed for using SAXResult. So this class outputs a SAX2-event-stream to the output target - saxContentHandler (e.g. the registered ContentHandler).

Author:
Zubow

Field Summary
private static org.apache.commons.logging.Log log
           
private  ContentHandler saxContentHandler
          The SAXEmitter acts as a proxy und propagates SAX2 events to this handler.
private  LexicalHandler saxLexicalHandler
          If present, the SAXEmitter propagates lexical SAX2 events this handler.
 
Fields inherited from interface net.sf.joost.Constants
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS
 
Constructor Summary
SAXEmitter(ContentHandler saxSourceHandler)
          Constructor
 
Method Summary
 void characters(char[] ch, int start, int length)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void comment(char[] ch, int start, int length)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void endCDATA()
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void endDocument()
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void endDTD()
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void endElement(String uri, String local, String raw)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void endEntity(String name)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void endPrefixMapping(String prefix)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void ignorableWhitespace(char[] p0, int p1, int p2)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void processingInstruction(String target, String data)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void setDocumentLocator(Locator locator)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void skippedEntity(String value)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void startCDATA()
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void startDocument()
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void startDTD(String name, String publicId, String systemId)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void startElement(String uri, String local, String raw, Attributes attrs)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 void startEntity(String name)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler
 void startPrefixMapping(String prefix, String uri)
          SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler
 
Methods inherited from class net.sf.joost.emitter.StxEmitterBase
getSystemId, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

saxContentHandler

private ContentHandler saxContentHandler
The SAXEmitter acts as a proxy und propagates SAX2 events to this handler.


saxLexicalHandler

private LexicalHandler saxLexicalHandler
If present, the SAXEmitter propagates lexical SAX2 events this handler.

Constructor Detail

SAXEmitter

public SAXEmitter(ContentHandler saxSourceHandler)
Constructor

Parameters:
saxSourceHandler - A ContentHandler for the SAXResult
Method Detail

startDocument

public void startDocument()
                   throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

startElement

public void startElement(String uri,
                         String local,
                         String raw,
                         Attributes attrs)
                  throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

endElement

public void endElement(String uri,
                       String local,
                       String raw)
                throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

skippedEntity

public void skippedEntity(String value)
                   throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] p0,
                                int p1,
                                int p2)
                         throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler

Throws:
SAXException

setDocumentLocator

public void setDocumentLocator(Locator locator)
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxContentHandler


startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException

endDTD

public void endDTD()
            throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException

startEntity

public void startEntity(String name)
                 throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException

endEntity

public void endEntity(String name)
               throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException

startCDATA

public void startCDATA()
                throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException

endCDATA

public void endCDATA()
              throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
SAX2-Callback - Simply propagates the Call to the registered output target - here the saxLexicalHandler

Throws:
SAXException