[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Calling Saxon from a CGI script

Subject: RE: Calling Saxon from a CGI script
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 20 Jun 2007 09:17:20 +0100
RE:  Calling Saxon from a CGI script
> 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

> 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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.