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

Re: Calling Java Xalan inside Perl on Unix -- THANKS!

Subject: Re: Calling Java Xalan inside Perl on Unix -- THANKS!
From: Gan Uesli Starling <alias@xxxxxxxxxxx>
Date: Thu, 17 Apr 2003 12:45:52 -0400
david mckain
David McKain wrote:
On Thu, Apr 17, 2003 at 10:07:42AM -0400, Gan Uesli Starling wrote:

Your problem is shell escaping. The list @xsl you pass to system() has 2
arguments so is equivalent to typing:

java "org.apache.xalan.xslt.Process -in blah.xml blah..."

at the shell (I've omitted the last part of the command to make it fit
on one line!)

Everything inside the double quotes is treated as ONE argument by the
shell, so what this does is ask Java to find and run the class called
org.apache.xalan.xslt.Process -in blah.xml blah... This class
name includes the space and the '-in' stuff and almost certainly doesn't
exist, hence the error.

To fix, do:

my @xsl = ("java", "org.apache.xalan.xslt.Process", "-in",
            "$filename.xml", ...);
system(@xsl);


That did it. Thanks!

Gan

PS: Is there a pure Perl way of XSLT that is as easy
as calling like above to Java Xalan? I lernt the Java
way from the XSLT Oreilly book. But it seems a bit silly
to call Java from Perl (even though it now works fine).


--


Mistera Sturno - Rarest Extinct Bird

 <(+)__       Gan Uesli Starling
  ((__/)=-    Kalamazoo, MI, USA
   `||`
    ++        http://starling.us


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.