public TransformerHandler newTransformerHandler ( Templates templates ) throws TransformerConfigurationException { try { TransformerImpl transformer = ( TransformerImpl ) templates . newTransformer ( ) ; transformer . setURIResolver ( m_uriResolver ) ; TransformerHandler th = ( TransformerHandler ) transformer . getInputContentHandler ( true ) ; return th ; } catch ( TransformerConfigurationException ex ) { if ( m_errorListener != null ) { try { m_errorListener . fatalError ( ex ) ; return null ; } catch ( TransformerConfigurationException ex1 ) { throw ex1 ; } catch ( TransformerException ex1 ) { throw new TransformerConfigurationException ( ex1 ) ; } } throw ex ; } }
Get a TransformerHandler object that can process SAX ContentHandler events into a Result based on the Templates argument .