Sorry, it's me again.

A possible solution came to my mind. If it works, it would make me able to avoid Saxon extensions and I could test Saxon/C.

As I pointed out, the user of my webpage could enter a search and this search is converted into an XPath expression via PHP. Then from PHP Saxon is called:
system("saxon8 xml_file.xml xslt_file.xsl xpath_parameter={$xpath_generated_by_php}");
In the XSLT there is, as I've learned here on this list, an expression like this:
<xsl:for-each select="saxon:evaluate($xpath_parameter)">

Now, I'm wondering if I could generate the XSLT file dynamically by replacing
saxon:evaluate($xpath_parameter)
by
<?php
echo $xpath_generated_by_php;
?>

Would you recommend that solution?
If so: Is it possible to give Saxon an XSLT directly as a string instead of a path pointing to a file? This way I could avoid saving the dynamically generated XSLT file first.

Best regards,
Christian


From: c_schwaderer@hotmail.com
To: saxon-help@lists.sourceforge.net
Date: Fri, 23 May 2014 16:09:24 +0000
Subject: Re: [saxon] Inacceptable performance of Saxon-B 8

Thank you for the answers!

I think, I can't use Saxon/C because it is the HE version and I need a saxon extension for dynamically evaluate the XPath expression created by the PHP script. Don't I?

As I said before, the server admins had some unknown trouble with Saxon 9 (don't know exactely which version), so they took Saxon 8. And they have - of course - not much time for me and my project. But I'll try to convince them to give an evalutation version of Saxon 9.5 PE a try.




From: mike@saxonica.com
Date: Fri, 23 May 2014 16:42:14 +0100
To: saxon-help@lists.sourceforge.net
Subject: Re: [saxon] Inacceptable performance of Saxon-B 8

Why are you using such an old release?

The most likely cause of the trouble is that the XML parser is fetching DTDs or similar files from the W3C server. In the last couple of years W3C has started to discourage this practice by artifically delaying the response from the server; Saxon has responded by including local copies of the files within the JAR. But to take advantage of this you will need a recent release.

Incidentally, you might like to try Saxon/C as a better way of invoking Saxon from PHP.

Michael Kay
Saxonica

On 23 May 2014, at 16:31, Christian Schwaderer <c_schwaderer@hotmail.com> wrote:

Dear all,

I have a performance problem with Saxon.

My XML project was designed like this: All data is stored in one XML file. On a webserver a user can select or search items. The user's input is transformed with PHP into an XPath expression. From the PHP command line ("system"-function) Saxon is called giving the XPath expression as a parameter.

I've tested the xslt transformation in Oxygen with Saxon 9.5 PE and it worked well.

Now the server was set up and Saxon takes fare more time than is by any means acceptable. 
For example: Called via Oxygen Saxon 9.5 PE took about 2 seconds to transform all data. The source xml file is 1,23 MB large. (As the server admins told me, they had problems with Saxon 9, so they installed Saxon-B 8.?? instead.)

And Saxon-B 8 takes for the same xslt transformation called from the command line about 5 minutes.

For some reasons, Java Bridge can't be installed here, so I have to stick to the command line.

Would buying and installing Saxon 9.5 PE on the server help significantly? Or does anyone know another solution or some advice?

I'm kind of desperate right now, because this project depends on Saxon working well on the server.

Thank you all and have a nice week end!

Christian
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help