com.sun.msv.writer

Class ContentHandlerAdaptor

public class ContentHandlerAdaptor extends Object implements DocumentHandler

Adapt SAX2 ContentHandler as a SAX1 DocumentHandler. This class wraps a ContentHandler and makes it act as a DocumentHandler.

Author: David Megginson, sax@megginson.com

Constructor Summary
ContentHandlerAdaptor(ContentHandler handler)
Method Summary
voidcharacters(char[] ch, int start, int length)
Adapt a SAX1 characters event.
voidendDocument()
Adapt a SAX1 end document event.
voidendElement(String qName)
Adapt a SAX1 end element event.
voidignorableWhitespace(char[] ch, int start, int length)
Adapt a SAX1 ignorable whitespace event.
voidprocessingInstruction(String target, String data)
Adapt a SAX1 processing instruction event.
voidsetDocumentLocator(Locator locator)
Adapt a SAX1 document locator event.
voidstartDocument()
Adapt a SAX1 start document event.
voidstartElement(String qName, AttributeList qAtts)
Adapt a SAX1 startElement event.

Constructor Detail

ContentHandlerAdaptor

public ContentHandlerAdaptor(ContentHandler handler)

Method Detail

characters

public void characters(char[] ch, int start, int length)
Adapt a SAX1 characters event.

Parameters: ch An array of characters. start The starting position in the array. length The number of characters to use.

Throws: org.xml.sax.SAXException The client may raise a processing exception.

See Also: org.xml.sax.DocumentHandler#characters

endDocument

public void endDocument()
Adapt a SAX1 end document event.

Throws: org.xml.sax.SAXException The client may raise a processing exception.

See Also: org.xml.sax.DocumentHandler#endDocument

endElement

public void endElement(String qName)
Adapt a SAX1 end element event.

Parameters: qName The qualified (prefixed) name.

Throws: org.xml.sax.SAXException The client may raise a processing exception.

See Also: org.xml.sax.DocumentHandler#endElement

ignorableWhitespace

public void ignorableWhitespace(char[] ch, int start, int length)
Adapt a SAX1 ignorable whitespace event.

Parameters: ch An array of characters. start The starting position in the array. length The number of characters to use.

Throws: org.xml.sax.SAXException The client may raise a processing exception.

See Also: org.xml.sax.DocumentHandler#ignorableWhitespace

processingInstruction

public void processingInstruction(String target, String data)
Adapt a SAX1 processing instruction event.

Parameters: target The processing instruction target. data The remainder of the processing instruction

Throws: org.xml.sax.SAXException The client may raise a processing exception.

See Also: org.xml.sax.DocumentHandler#processingInstruction

setDocumentLocator

public void setDocumentLocator(Locator locator)
Adapt a SAX1 document locator event.

Parameters: locator A document locator.

See Also: org.xml.sax.ContentHandler#setDocumentLocator

startDocument

public void startDocument()
Adapt a SAX1 start document event.

Throws: org.xml.sax.SAXException The client may raise a processing exception.

See Also: org.xml.sax.DocumentHandler#startDocument

startElement

public void startElement(String qName, AttributeList qAtts)
Adapt a SAX1 startElement event.

If necessary, perform Namespace processing.

Parameters: qName The qualified (prefixed) name. qAtts The XML 1.0 attribute list (with qnames).