[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: Fri, 22 Jun 2007 11:52:57 +0100
RE:  Calling Saxon from a CGI script
None of the browsers yet support XSLT 2.0.

Also, if you're going to run transformations in the browser, you need to
find the magic settings that allow you to see the specific error messages.
You're not going to get very far if all you get is "Error during XSLT
transformation: XSLT transformation failed." I'm afraid I don't remember
what these settings are (and it depends which browser you're using, of

Michael Kay

> -----Original Message-----
> From: Bhaskar _ [mailto:bhaskarji@xxxxxxxxxxx] 
> Sent: 22 June 2007 11:33
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Calling Saxon from a CGI script
> Thanks, Mike.
> I have not used servlets or JAXP at all and have hardly done 
> any programming in Java, so it might take me a while to 
> figure out the solution you've proposed. Meanwhile, I decided 
> to eliminate the parameters passed as command-line arguments 
> to Saxon so as to transform the XML into HTML in the browser  
> itself. When I tried doing so, I get the following error:
> "Error during XSLT transformation: XSLT transformation failed."
> I have tested the XSLT and am sure it works; and I have been 
> able to use the browser to do the transformation with the 
> previous version of this XSLT I had. The main (and am sure 
> important) difference with this XSLT is it is conformant to 
> XSLT 2.0 standards while the previous one was conformant to 
> XSLT 1.0. That is, I am using for-each-group now instead of 
> for-each loops and this is probably what's causing the error 
> (my guess).  Is this the source of the problem or is it 
> something else? Please advise.
> Thanks,
> Bhaskar
> ----Original Message Follows----
> From: "Michael Kay" <mike@xxxxxxxxxxxx>
> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: RE:  Calling Saxon from a CGI script
> Date: Wed, 20 Jun 2007 09:17:20 +0100
>  > 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/
> _________________________________________________________________
> Catch all the cricketing action right here. Live score, match 
> reports, photos et al. 
> http://content.msn.co.in/Sports/Cricket/Default.aspx

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.