在 PHP 中使用 XSLT 2.0 的最佳方式是什么? [英] What is the best way to use XSLT 2.0 with PHP?

查看:26
本文介绍了在 PHP 中使用 XSLT 2.0 的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在网站上的第二个问题,和往常一样,我花了几个小时阅读了很多相关问题,最相关的两个是:

This is my second question on the site, like always, I've spent several hours reading a lot of related questions, the 2 most relevant are:

  • Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP? Which explains a solution using PHP/Java Bridge and Saxon.

  • Upgrade PHP XSLT processor to XSLT 2.0 Which explains a solution using XML_XSLT2Processor, installing it with PEAR and PHP.

我主要关注第二个选项,因为 php 已经有一个 XSLTProcessor 库,但遗憾的是它只支持 XSLT 1.0,我正在寻找 2.0 支持,所以它似乎是正确的选择,但在安装 PEAR 并尝试安装之后XML_XSLT2Processor,并阅读了很多文章(123,我目前就该主题开放的那些)和 AltovaXML 商业化了,PEAR 太有问题了,我决定采用第一个选项.

I focused mainly on the second option since php already have a XSLTProcessor library, but sadly it only supports XSLT 1.0 and I'm looking 2.0 support, so it seemed to be the right option, but after installing PEAR and trying to install XML_XSLT2Processor, and reading many articles(1, 2, 3, the ones I currently have open about the topic) and AltovaXML gone commercial, and PEAR being so buggy, I decided to go with the first option.

但我真的不知道 Java,但我会尝试一下,但在开始之前我决定先问一下(而且帖子有点过时了).

But I don't really know Java, yet I'm gonna give it a try, but before starting with this I decided to ask first (plus the posts are a little outdated).

难道没有其他更好的方法可以用 PHP 管理 XSLT 2.0 吗?

Isn't there any other better way to manage XSLT 2.0 with PHP?

推荐答案

这个问题很及时,因为上周我们推出了 Saxon/C,这是一个编译为 Intel 机器代码的 Saxon 端口,带有 C、C++ 和 PHP 的 API.现在还为时尚早(Alpha 0.1 版本),但如果您不介意处于最前沿,您可以尝试一下.当然,我们欢迎您的反馈.http://www.saxonica.com/saxon-c/index.xml

The question is timely because last week we launched Saxon/C, a port of Saxon compiled to Intel machine code with APIs for C, C++, and PHP. It's early days yet (an Alpha 0.1 release), but if you don't mind being at the bleeding edge, you might give it a try. And of course we welcome your feedback. Details at http://www.saxonica.com/saxon-c/index.xml

这篇关于在 PHP 中使用 XSLT 2.0 的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆