Fix what I assume were out-of-date API calls.
authorMike Taylor <mike@indexdata.com>
Fri, 2 Feb 2007 11:30:50 +0000 (11:30 +0000)
committerMike Taylor <mike@indexdata.com>
Fri, 2 Feb 2007 11:30:50 +0000 (11:30 +0000)
Debugging output now only generated if -d specified.

bin/xslt_process.pl

index 557ee91..c3e246e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
 #!/usr/bin/perl -w
 
-# $Id: xslt_process.pl,v 1.2 2007-01-24 09:28:02 mike Exp $
+# $Id: xslt_process.pl,v 1.3 2007-02-02 11:30:50 mike Exp $
 
 use strict;
 use warnings;
 
 use strict;
 use warnings;
@@ -9,13 +9,16 @@ use Getopt::Std;
 use ZOOM::IRSpy;
 use XML::LibXSLT;
 
 use ZOOM::IRSpy;
 use XML::LibXSLT;
 
-XML::LibXSLT->debug_callback(\&xslt_debug);
+if (@ARGV && $ARGV[0] eq "-d") {
+    shift;
+    XML::LibXSLT->debug_callback(\&xslt_debug);
+}
 
 my $dbname = 'localhost:8018/IR-Explain---1';
 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
 my $source_file = shift || die("$0: Please specify xml instance file");
 
 my $dbname = 'localhost:8018/IR-Explain---1';
 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
 my $source_file = shift || die("$0: Please specify xml instance file");
-my $source_doc = $spy->libxml->parse_file($source_file);
-my $results = $spy->irspy_to_zeerex_style->transform($source_doc);
+my $source_doc = $spy->{libxml}->parse_file($source_file);
+my $results = $spy->{irspy_to_zeerex_style}->transform($source_doc);
 
 print $results->toString(), "\n\n";
 
 
 print $results->toString(), "\n\n";