// Get the input content handler, which will handle the
// parse events and create the source tree.
//StylesheetHandler inputHandler = (StylesheetHandler)m_processor.getTemplatesBuilder();
//reader.setContentHandler( inputHandler );
SourceTreeHandler handler = new SourceTreeHandler();
reader.setContentHandler(handler);
reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
// Kick off the parse. When the ContentHandler gets
// the startDocument event, it will call transformNode( node ).
reader.parse( SAXSource.sourceToInputSource(iSource));
sourceTree = handler.getRoot();
}
}
catch(Exception e)
{
// Unwrap exception