org.iso_relax.verifier.impl
Class ForkContentHandler

java.lang.Object
  |
  +--org.iso_relax.verifier.impl.ForkContentHandler
All Implemented Interfaces:
ContentHandler

public class ForkContentHandler
extends java.lang.Object
implements ContentHandler

ContentHandler that "forks" the incoming SAX2 events to two ContentHandlers.

Version:
$Id: ForkContentHandler.java,v 1.3 2003/05/30 23:46:33 kkawa Exp $
Author:
Kohsuke KAWAGUCHI

Constructor Summary
ForkContentHandler(ContentHandler first, ContentHandler second)
          Creates a ForkContentHandler.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
static ContentHandler create(ContentHandler[] handlers)
          Creates ForkContentHandlers so that the specified handlers will receive SAX events in the order of the array.
 void endDocument()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 void endPrefixMapping(java.lang.String prefix)
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void setDocumentLocator(Locator locator)
           
 void skippedEntity(java.lang.String name)
           
 void startDocument()
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, Attributes attributes)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForkContentHandler

public ForkContentHandler(ContentHandler first,
                          ContentHandler second)
Creates a ForkContentHandler.

Parameters:
first - This handler will receive a SAX event first.
second - This handler will receive a SAX event after the first handler receives it.
Method Detail

create

public static ContentHandler create(ContentHandler[] handlers)
Creates ForkContentHandlers so that the specified handlers will receive SAX events in the order of the array.


setDocumentLocator

public void setDocumentLocator(Locator locator)
Specified by:
setDocumentLocator in interface ContentHandler

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
SAXException

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
SAXException

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
SAXException

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws SAXException
Specified by:
skippedEntity in interface ContentHandler
SAXException