xsl-list
[Top] [All Lists]

RE: [xsl] Calling Saxon from a CGI script

2007-06-20 01:17:38
I am using the Saxon processor for java to transform an XML 
into HTML. The XSL expects the user to provide two parameter 
values as command line arguments to Saxon. So, my call to 
Saxon is something like this:
java net.sf.saxon.Transform -o report.html report.xml report.xsl
param1=val1 param2=val2

The values val1 and val2 are inputs in an HTML form and would 
be available at run-time in a CGI perl script. Once I get 
these values, I basically want to call Saxon as above to 
perform the transformation. I am trying to use the 'system' 
command inside the CGI perl script 

You really don't want to do it that way. Loading and initializing a Java VM
just to run one transformation is not the way to do things in a web service
environment. (It can take 5 seconds to load the VM to run a 50ms
transformation.) Write a Java servlet that runs in a container such as
Tomcat which keeps the VM alive, and use the JAXP API to drive the
transformations. There's a "starter kit" servlet for doing this in the Saxon
distribution.

but it doesn't work - I am 
seeing the following error in the webserver error logs:

*** glibc detected *** java: free(): invalid pointer: 0xbfc7cbb8 ***,

Sorry, that's not an XSLT or Saxon problem, it's something to do with the
configuration of your web server.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>