Search in sources :

Example 1 with IncrementalSAXSource_Filter

use of org.apache.xml.dtm.ref.IncrementalSAXSource_Filter in project robovm by robovm.

the class TransformerHandlerImpl method clearCoRoutine.

/** 
   * Do what needs to be done to shut down the CoRoutine management.
   */
protected void clearCoRoutine(SAXException ex) {
    if (null != ex)
        m_transformer.setExceptionThrown(ex);
    if (m_dtm instanceof SAX2DTM) {
        if (DEBUG)
            System.err.println("In clearCoRoutine...");
        try {
            SAX2DTM sax2dtm = ((SAX2DTM) m_dtm);
            if (null != m_contentHandler && m_contentHandler instanceof IncrementalSAXSource_Filter) {
                IncrementalSAXSource_Filter sp = (IncrementalSAXSource_Filter) m_contentHandler;
                // This should now be all that's needed.
                sp.deliverMoreNodes(false);
            }
            sax2dtm.clearCoRoutine(true);
            m_contentHandler = null;
            m_dtdHandler = null;
            m_entityResolver = null;
            m_errorHandler = null;
            m_lexicalHandler = null;
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
        if (DEBUG)
            System.err.println("...exiting clearCoRoutine");
    }
}
Also used : IncrementalSAXSource_Filter(org.apache.xml.dtm.ref.IncrementalSAXSource_Filter) SAX2DTM(org.apache.xml.dtm.ref.sax2dtm.SAX2DTM)

Example 2 with IncrementalSAXSource_Filter

use of org.apache.xml.dtm.ref.IncrementalSAXSource_Filter in project j2objc by google.

the class TransformerHandlerImpl method clearCoRoutine.

/** 
   * Do what needs to be done to shut down the CoRoutine management.
   */
protected void clearCoRoutine(SAXException ex) {
    if (null != ex)
        m_transformer.setExceptionThrown(ex);
    if (m_dtm instanceof SAX2DTM) {
        if (DEBUG)
            System.err.println("In clearCoRoutine...");
        try {
            SAX2DTM sax2dtm = ((SAX2DTM) m_dtm);
            if (null != m_contentHandler && m_contentHandler instanceof IncrementalSAXSource_Filter) {
                IncrementalSAXSource_Filter sp = (IncrementalSAXSource_Filter) m_contentHandler;
                // This should now be all that's needed.
                sp.deliverMoreNodes(false);
            }
            sax2dtm.clearCoRoutine(true);
            m_contentHandler = null;
            m_dtdHandler = null;
            m_entityResolver = null;
            m_errorHandler = null;
            m_lexicalHandler = null;
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
        if (DEBUG)
            System.err.println("...exiting clearCoRoutine");
    }
}
Also used : IncrementalSAXSource_Filter(org.apache.xml.dtm.ref.IncrementalSAXSource_Filter) SAX2DTM(org.apache.xml.dtm.ref.sax2dtm.SAX2DTM)

Aggregations

IncrementalSAXSource_Filter (org.apache.xml.dtm.ref.IncrementalSAXSource_Filter)2 SAX2DTM (org.apache.xml.dtm.ref.sax2dtm.SAX2DTM)2