#!/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 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 $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";