EasyPHP自定义java扩展

I am using EasyPHP for test purposes, and I wish to apply an XSLT 2.0 processor in my php code. EasyPHP 5.3.9 standard xslt processor is of 1.0 version though.

What do I have to do to apply the xslt processor in Saxon9he.jar or XSLT2Processor.jar (found on sourceforge.net)? Stuff I would like to know:

  • which directory to place the jar in
  • where to change config to include the jar (probably using extension functionality)
  • what to put into code in order to declare new instance of xslt processor

Code I am currently using

<?php
    $XML = new DOMDocument();
    $XML->load('test.xml');
    $xslt = new XSLTProcessor();
    $XSL = new DOMDocument();
    $XSL->load('test.xslt');
    $xslt->importStylesheet( $XSL );
    print $xslt->transformToXML( $XML );
?>

which errors because I have an XSLT 2.0 version stylesheet. The errors I get are like

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: compilation error: file file:///C:/Program%20Files%20(x86)/EasyPHP-5.3.9/www/test.xslt line 99 element function in C:\Program Files (x86)\EasyPHP-5.3.9\www\test.php on line 7