在 XPath 3.0/Saxon 中调试用户定义的函数

发布于 2024-11-30 07:42:34 字数 169 浏览 1 评论 0原文

最新的 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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

痕至 2024-12-07 07:42:34

我怀疑您对 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文