code: static TransformerFactory newTransformerFactory() {
          TransformerFactory tf = TransformerFactory.newInstance();
          if (uriResolver != null) {
              tf.setURIResolver(uriResolver);
          }
          if (enableXXEProtection) {
              tf = TransformerFactoryConfigurer.Default.configure(tf);
          }
          return tf;
      }
docs: Get a fresh transformer to use for XSLT transformations (and by
  implication serialization and XPaths).
  @return a new instance of the default transformer factory