code: public static XslTransformer getTransformer(Source source) throws TransformerConfigurationException {
      	if (source == null) {
      		throw new IllegalArgumentException("source is null");
      	}
          XslTransformer transformer = new XslTransformer();
          transformer.transformerImpl = transformerFactory.newTransformer(source);
          return transformer;
      }
docs: Get a wrapped XSL transformer instance for supplied stylesheet source.
  @param source XSL source
  @return XSL transformer instance
  @throws TransformerConfigurationException if an exception occurs while processing