7

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:

And

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.

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).

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

Community
  • 1
  • 1
Lauro182
  • 1,597
  • 3
  • 15
  • 41
  • if you are looking at pairing XSLT with another language, part of the question to ask is why do you need XSLT2.0 when XSLT1.0 has more support in other languages? –  Dec 04 '13 at 04:53
  • 2
    Actually PHP is about the last major platform that doesn't have XSLT 2.0 support (until last week, see below...) – Michael Kay Dec 04 '13 at 09:58
  • 2
    I need it 2.0, because we are given a xslt 2.0 file that we should use here at the IRS in México, I don't know why they chose to use a 2.0 version since it isn't that widely used and I don't think it needed to be 2.0, but that's how they did it. When i use php to convert it, it actually does convert it but it throws the wrong version error for every element. – Lauro182 Dec 04 '13 at 19:29
  • 5
    Anyone who has ever used XSLT 2.0 will never go back to 1.0 unless offered a very large bribe. – Michael Kay Dec 05 '13 at 09:49

1 Answers1

7

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

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • Hello Michael, I've checked the site and downloaded both installers for windows, 32 and 64 bits versions, 64 bit version says it is evalution, anyway, I've been trying to figure out how to be able use the API for php with no success. There's a small guide to install a php extension for Linux and tried to adapt it to windows but I can't manage to make it work. I've sent a mail to saxon-help@lists.sourceforge.net with more detailed info but it got filtered out because I'm not a member. Any help would be greatly appreciated! – Lauro182 Dec 05 '13 at 19:54
  • Although I answer many Saxon questions on StackOverflow, this is one I will have to refer to a colleague, and that means I must ask you to use the preferred support route. Please either sign up for the saxon-help list on Sourceforge, or for the forums at saxonica.plan.io. – Michael Kay Dec 05 '13 at 21:51
  • Thanks Michael, I did sign up at sourceforge, I've already got an answer from O'Neil Delpratt answering my question, I will be glad to provide feedback as soon as I get this running, thanks a lot! – Lauro182 Dec 05 '13 at 23:46