Menu

does this thing work?

2008-10-07
2013-04-24
  • Nobody/Anonymous

    I haven't tried it yet
    I'm not prepared to invest many hours into installing and fiddling with it

    Is this a project I can dump into my PHP config, and run with it? Is it really working, and ready for a production server?

    it is being discussed here
    http://www.webmasterworld.com/xml/3760540.htm

     
    • boen_robot

      boen_robot - 2008-10-16

      OMFG. This has been here for over a week now, and I didn't saw it. So sorry.

      Well, I wouldn't say it's really ready for a production server, mainly because it has high requirements which shared hosts often don't offer - execution rights in particular - and because it's not a PECL style extension, but a PEAR style one.

      In that topic you link to that other user says it's slower than libxslt, and he's right.

      XML_XSLT2Processor works by invoking Saxon or AltovaXML from the command line. There's a very large overhead associated with invoking an executable with PHP, and because of that overhead, no matter what I do, XML_XSLT2Processor will never become as fast as a PECL style extension.

      I've paused the work on this project because I'm 18 years old and I was a candidate for the local univercity. I'm now in (btw, my speciality: IT), but I'm still a little more busy than I'd like to be. I already have a lot of things planned, and assuming no better project arrives on the horizon, you'll see those things happen. In short, I'm thinking of creating a few new faster interfaces that will provide better performance, plus implementing the rest of SAXON's command line features.

      If you look at the changelog of the latest release, you'll notice there are some known issues with error message display. Those errors are *almost* fixed in the upcoming version (which the only reason it's still "upcoming"), so this will open the door for all of that other stuff. But again - when I have the time.

      If you're wondering, I started this project exactly because, to my understanding, there was no way of using XSLT 2.0 in PHP, and I always wanted that. The only way I found out was by executing a processor from the command line. Now, I'm also aware of a few additional methods (JAVA bridge, the DOTNET class, etc.) and future versions will attempt to utilize those interfaces and maybe (just maybe) more.

      BTW, I'd gladly join the discussion at that other forum, but my email is not accepted, since it's a free one.

       
    • boen_robot

      boen_robot - 2008-10-16

      Oh, I forgot. You don't need to buy Saxon-SA as that guy says. Saxon-B is open source and free. If you really need the SA features, you can use AltovaXML, which is Schema Aware and free. However, I do agree that for best results with a Schema Awared stylesheet, you should probably get SAXON.

      Without having any solid performance data, I'd assume that currently processors in XML_XSLT2Processor behave in this order (from most efficient to least efficient):
      1. AltovaXML/COM (because it uses PHP's COM class)
      2. SAXON/CLI (because... it's SAXON and it's a plain command line program)
      3. AltovaXML/CLI (because it's a plain command line program)
      4. SAXON/JAVA-CLI (because in addition to SAXON itself, the JVM also has to be loaded)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.