private static Transformer transformer(final TransformerFactory factory,final Source stylesheet) throws TransformerConfigurationException {
  final Transformer tnfr=factory.newTransformer(stylesheet);
  if (tnfr == null) {
    throw new TransformerConfigurationException(String.format("%s failed to create new XSL transformer for '%s'",factory.getClass(),stylesheet.getSystemId()));
  }
  return tnfr;
}

private static Transformer transformer ( final TransformerFactory factory , final Source stylesheet ) throws TransformerConfigurationException { final Transformer tnfr = factory . newTransformer ( stylesheet ) ; if ( tnfr == null ) { throw new TransformerConfigurationException ( String . format ( "%s failed to create new XSL transformer for '%s'" , factory . getClass ( ) , stylesheet . getSystemId ( ) ) ) ; } return tnfr ; }
make a transformer from this stylesheet .
