public static TransformerFactory prepareFactory(TransformerFactory factory) {
    try {
      factory.setAttribute("http://xml.apache.org/xalan/properties/source-location", Boolean.TRUE);
      factory.setAttribute("http://xml.apache.org/xalan/features/optimize", Boolean.FALSE);
    } catch (Exception e) {
      // ignore
    }
    return factory;
  }
public static TransformerFactory prepareFactory(TransformerFactory factory)