在 XPath 3.0/Saxon 中调试用户定义的函数
最新的 Saxon PE 中是否支持调试 xpath 用户定义函数?我使用了跟踪功能,但它似乎在某些情况下有效,而在其他情况下则无效。我确信这是有逻辑的,但我不明白。我真的在寻找一些简单的东西,比如类似于
的东西。
提前致谢。
Is there any support for debugging xpath user-defined functions in the latest Saxon PE? I've used the trace function, but it seems to work in some contexts and not in others. I'm sure there's a logic to that, but I don't understand it. I'm really looking for something simple like something akin to <xsl:message>
.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑您对 trace() 的调用正在工作,但由于惰性求值,输出令人困惑,这意味着事物的求值顺序通常与您期望的顺序不同。事实上,优化器有时可以将您在源代码中编写的表达式重新排列为完全不同的内容。
您是否尝试过 Stylus Studio 或 oXygen 等工具中的调试器?通常这些会禁用一些优化,使执行顺序更容易理解。
I suspect your calls on trace() are working, but the output is confusing because of lazy evaluation, which means that things are often evaluated in a different order from what you expect. In fact, the optimizer can sometimes rearrange the expressions you write in your source into something quite different.
Have you tried the debuggers in tools like Stylus Studio or oXygen? Typically these disable some optimizations, making the sequence of execution more comprehensible.