XPath 2.0 和/或 XSLT 2.0 是否会在 PHP 中实现?
该问题已被提出,但在收到答案之前已被提问者删除。因为我相信这个问题是合理的、合法的并且有其目的,所以我再次提出这个问题并提供我已经为原始问题编写的答案。
XPath 2.0 和/或 XSLT 2.0 是否会得到实施有一天在 PHP 中或者有什么计划吗?
The question was asked but deleted by the asker before it received an answer. Because I believe the question is sound and legitimate and serves a purpose, I'm asking it again and provide the answer I already wrote for the original question.
Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP some day or are there any plans?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅此 XSLT 引擎 列表,来自 XSL 邮件列表上的线程 关于 XSLT 2.0 开发。
PHP 的解决方案是使用 PHP/Java Bridge 和 Saxon,并遵循 教程。
XSLT 2.0(和 XPath 2.0)的当前开发状态意味着目前还没有任何计划,因此 PHP 也没有任何计划。要使用 XPath 2.0,您需要包含 Saxon 9.x 并与 Java 库进行互操作。
即使今天有人为 XPath 2.0 和 XSLT 2.0 编写了一个开源本机库,它也需要一段时间才能适合生产。
See this list of XSLT engines, from a thread on an XSL mailing list regarding XSLT 2.0 development.
A solution for PHP is to use the PHP/Java Bridge and Saxon, and follow a tutorial.
The current status of development for XSLT 2.0 (and XPath 2.0) means that there are no plans currently, so there can't be any for PHP either. To use XPath 2.0, you need to include Saxon 9.x and inter-operate with the Java libraries.
Even if someone wrote an open source native library for XPath 2.0 and XSLT 2.0 today, it would take time before it would be suitable for production.
Saxon C 的构建考虑到了这个(PHP)用例。这是一个 Saxon XSLT 2.0 处理器,现在可以从 PHP 使用。
更具体地说,以下是文档中有关如何构建 PHP 扩展的信息:
Saxon C was built having this (PHP) use case in mind. This is a Saxon XSLT 2.0 processor and now it can be used from PHP.
More specifically, here is the information from the documentation on how to build the PHP extension: