xt.pl
- $XSL_ENGINE = 'c:\q\jre\bin\java -cp c:\q\xt\xt.jar;c:\q\xp\xp.jar com.jclark.xsl.sax.Driver';
-
- print "\n";
- use Cwd;
- use File::Path;
- use File::Basename;
- use Zvon::Filesystem;
- #######################
- $xmlFile = $ARGV[0];
- $xslFile = $ARGV[1];
- $interactive = $ARGV[2]; #default YES; switch NO
- if (!(-e $xmlFile)) {$xmlFile = "$xmlFile\.xml";};
- if (!(-e $xmlFile)) {$xmlFile = '';};
- if (!(-e $xslFile)) {$xslFile = "$xslFile\.xsl";};
- if (!(-e $xslFile)) {$xslFile = '';};
- if ($interactive ne 'NO')
- {
- print STDOUT "\n\nProgram XT started.\n";
- print STDOUT "XML File: [$xmlFile]: ";
- $tmp = <STDIN>;
- chomp($tmp);
- if($tmp ne ""){$xmlFile=$tmp;};
- if (!(-f $xmlFile)) {$xmlFile = Filesystem::filelist();}
- print STDOUT "XSL File [$xslFile]: ";
- $tmp = <STDIN>;
- chomp($tmp);
- if($tmp ne ""){$xslFile=$tmp;};
- if (!(-f $xslFile)) {$xslFile = Filesystem::filelist();}
- }
- $htmlFile = $xmlFile;
- $htmlFile =~ s/\..*/\.html/;
- system "$XSL_ENGINE $xmlFile $xslFile $htmlFile";