Search in sources :

Example 1 with ContentHandlerProxy

use of net.sf.saxon.event.ContentHandlerProxy in project teiid by teiid.

the class ContentHandlerProxyReceiver method parse.

@Override
public void parse(InputSource input) throws IOException, SAXException {
    final ContentHandlerProxy chp = new ContentHandlerProxy();
    chp.setLexicalHandler(lexicalHandler);
    chp.setUnderlyingContentHandler(handler);
    this.source.addFilter(new FilterFactory() {

        @Override
        public ProxyReceiver makeFilter(Receiver arg0) {
            return new ContentHandlerProxyReceiver(chp, arg0);
        }
    });
    try {
        config.buildDocumentTree(source);
    } catch (XPathException e) {
        throw new SAXException(e);
    }
}
Also used : ContentHandlerProxy(net.sf.saxon.event.ContentHandlerProxy) XPathException(net.sf.saxon.trans.XPathException) ProxyReceiver(net.sf.saxon.event.ProxyReceiver) Receiver(net.sf.saxon.event.Receiver) FilterFactory(net.sf.saxon.event.FilterFactory) ProxyReceiver(net.sf.saxon.event.ProxyReceiver) SAXException(org.xml.sax.SAXException)

Aggregations

ContentHandlerProxy (net.sf.saxon.event.ContentHandlerProxy)1 FilterFactory (net.sf.saxon.event.FilterFactory)1 ProxyReceiver (net.sf.saxon.event.ProxyReceiver)1 Receiver (net.sf.saxon.event.Receiver)1 XPathException (net.sf.saxon.trans.XPathException)1 SAXException (org.xml.sax.SAXException)1