boolean (Transformer transformer, final LocalDebugger dbg) { Controller controller = ((TransformerImpl)transformer).getUnderlyingController(); System.out.println("SAXON 9"); ((Saxon9TraceListener)controller.getConfiguration().getTraceListener()).setDebugger(dbg); controller.getConfiguration().setLineNumbering(true); controller.getConfiguration().setCompileWithTracing(true); controller.getConfiguration().setSerializerFactory(new SerializerFactory(controller.getConfiguration()) { @Override protected Emitter newXMLEmitter(Properties properties) { return new TracingOutputter(dbg.getEventQueue(), super.newXMLEmitter(properties)); } }); controller.getConfiguration().setDebugger(new Debugger() { public SlotManager makeSlotManager() { return new SlotManager() { @Override public int allocateSlotNumber(StructuredQName qName) { System.out.println("qName = " + qName); return super.allocateSlotNumber(qName); } }; } }); return true; }