saxon-B 跟踪侦听器控件
要从 Saxon-B 获取跟踪输出,您可以调用以下内容:
processor.getUnderlyingConfiguration().setTraceListener(new XSLTTraceListener());
我的问题是,它的动态程度如何?一旦我创建了一个可执行文件,它是否会以某种方式捕获它,或者我可以动态更改侦听器并使其生效吗?
To get tracing output from Saxon-B, you call something like:
processor.getUnderlyingConfiguration().setTraceListener(new XSLTTraceListener());
My question is, how dynamic is that? Once I've created an executable, does it capture this somehow, or can I change the listener on the fly and have it take effect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不应该真正在配置上设置 TraceListener,因为对不同的转换使用相同的 TraceListener 并没有真正的意义。最好将其设置在控制器上。如果您这样做,那么我怀疑您可以随时切换它 - 但需要您自担风险,例如您不会得到配对的 open() 和 close() 调用。
You shouldn't really set the TraceListener on the Configuration, since it doesn't really make sense to use the same one for different transformations. Better to set it on the Controller. If you do that, then I suspect you can switch it at any time - but at your own risk, for example you won't get paired open() and close() calls.