wt.util.xml.xslt
Class SAXSAX2Wrapper

java.lang.Object
  extended bywt.util.xml.xslt.SAXSAX2Wrapper
All Implemented Interfaces:
SAX2XMLSource, XMLSource

class SAXSAX2Wrapper
extends Object
implements SAX2XMLSource

This class wraps SAX event sources as SAX2 event sources. This allows legacy SAX event sources to be used with new code which expects SAX2 event sources.

This class is little more than glue code around ParserAdapter.


Field Summary
private  SAXXMLSource source
           
 
Constructor Summary
(package private) SAXSAX2Wrapper(SAXXMLSource source)
           
 
Method Summary
 String getBaseURI()
          The URI describing the location of the XML data, up to, but not including the file part of the URI.
 void produceEvents(ContentHandler contentHandler, LexicalHandler lexicalHandler, DTDHandler dtdHandler)
          Produce the SAX events for the XML source data calling the appropriate handler methods on the provided ContentHandler, LexicalHandler, and DTDHandler instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

private SAXXMLSource source
Constructor Detail

SAXSAX2Wrapper

SAXSAX2Wrapper(SAXXMLSource source)
Method Detail

getBaseURI

public String getBaseURI()
Description copied from interface: XMLSource
The URI describing the location of the XML data, up to, but not including the file part of the URI. For example, the base URI for data sourced at http://www.acme.com/documents/Document1.xml would be http://www.acme.com/documents.

Supported API: true

Specified by:
getBaseURI in interface XMLSource
Returns:
String

produceEvents

public void produceEvents(ContentHandler contentHandler,
                          LexicalHandler lexicalHandler,
                          DTDHandler dtdHandler)
                   throws SAXException
Description copied from interface: SAX2XMLSource
Produce the SAX events for the XML source data calling the appropriate handler methods on the provided ContentHandler, LexicalHandler, and DTDHandler instances. This method must support null values for each of these arguments. Note that implementors of this interface may well not send events to all three handlers even if they are provided.

Supported API: true

Specified by:
produceEvents in interface SAX2XMLSource
Parameters:
contentHandler -
lexicalHandler -
dtdHandler -
Throws:
SAXException