TransformerFactory () { final TransformerFactoryImpl factory = new TransformerFactoryImpl(); factory.setAttribute(FeatureKeys.TRACE_LISTENER, new Saxon9TraceListener()); try { factory.setAttribute(FeatureKeys.OPTIMIZATION_LEVEL, "0"); } catch (IllegalArgumentException e) { e.printStackTrace(); } return factory; }