public Transformer newTransformer(Source source) throws TransformerConfigurationException {
  try {
    Templates tmpl=newTemplates(source);
    if (tmpl == null)     return null;
    Transformer transformer=tmpl.newTransformer();
    transformer.setURIResolver(m_uriResolver);
    return transformer;
  }
 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;
  }
}

public Transformer newTransformer ( Source source ) throws TransformerConfigurationException { try { Templates tmpl = newTemplates ( source ) ; if ( tmpl == null ) return null ; Transformer transformer = tmpl . newTransformer ( ) ; transformer . setURIResolver ( m_uriResolver ) ; return transformer ; } 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 ; } }
process the source into a transformer object . care must be given to know that this object can not be used concurrently in multiple threads .
