It would appear that you're using backtics to quote the
system function args: you're mixing two methods. Instead, use a quoting
scheme that allows variable interpolation for the system command or use a
variable to hold the result of a backtic'd expression: eg. perl -e
"$d='data.xml';system \"sabcmd style.xsl $d\"" or perl -e
"$d='data.xml';$r=`sabcmd style.xsl $d`;print $r"
Alternatively, use the module
interface:
#!perl -w
use strict;
use
XML::Sablotron qw(:all);
my ($template_uri, $data_uri, $result_uri, $params, $buffers, $sab, $code, $result, $return); $template_uri = "file://d:/xml/style.xsl"; $data_uri = "file://d:/xml/data.xml"; $result_uri = "arg:/result"; $params = []; $buffers = []; $sab = new XML::Sablotron();
$code = $sab->RunProcessor($template_uri, $data_uri, $result_uri, $params, $buffers); exit $code if $code; $return = $sab->GetResultArg("result"); print $return; __END__
|
- [Sab] running Sablotron from Perl r.gordon
- Re: [Sab] running Sablotron from Perl Robin Berjon
- John Cope
