code: public Transformer newTransformer(Source source)
            throws TransformerConfigurationException
    {
      try 
      {
        Templates tmpl=newTemplates( source );
        /* this can happen if an ErrorListener is present and it doesn't
           throw any exception in fatalError. 
           The spec says: "a Transformer must use this interface
           instead of throwing an exception" - the newTemplates() does
           that, and returns null.
        */
        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; // TODO: but the API promises to never return null...
          } 
          catch( TransformerConfigurationException ex1 ) 
          {
            throw ex1;
          }
          catch( TransformerException ex1 ) 
          {
            throw new TransformerConfigurationException( ex1 );
          }
        }
        throw ex;
      }
    }
docs: Process the source into a Transformer object.  Care must
  be given to know that this object can not be used concurrently
  in multiple threads.
  
  @param source An object that holds a URL, input stream, etc.
  
  @return A Transformer object capable of
  being used for transformation purposes in a single thread.
  
  @throws TransformerConfigurationException May throw this during the parse when it
  is constructing the Templates object and fails.