org.iso_relax.verifier.impl

Class ForkContentHandler

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(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(String uri, String localName, String qName)
void
endPrefixMapping(String prefix)
void
ignorableWhitespace(ch[] , int start, int length)
void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
skippedEntity(String name)
void
startDocument()
void
startElement(String uri, String localName, String qName, Attributes attributes)
void
startPrefixMapping(String prefix, String uri)

Constructor Details

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 Details

characters

public void characters(ch[] ,
                       int start,
                       int length)
            throws SAXException

create

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

endDocument

public void endDocument()
            throws SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
            throws SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException

ignorableWhitespace

public void ignorableWhitespace(ch[] ,
                                int start,
                                int length)
            throws SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws SAXException

setDocumentLocator

public void setDocumentLocator(Locator locator)

skippedEntity

public void skippedEntity(String name)
            throws SAXException

startDocument

public void startDocument()
            throws SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
            throws SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException