This has now changed name to irspy_xsltproc.pl.
[irspy-moved-to-github.git] / bin / irspy_xsltproc.pl
1 #!/usr/bin/perl -w
2
3 # $Id: irspy_xsltproc.pl,v 1.2 2007-02-02 12:40:51 sondberg Exp $
4
5 use strict;
6 use warnings;
7 use lib '../lib';
8 use ZOOM::IRSpy;
9
10 if (@ARGV && $ARGV[0] eq "-d") {
11     shift;
12     XML::LibXSLT->debug_callback(\&xslt_debug);
13 }
14
15 my $dbname = 'localhost:8018/IR-Explain---1';
16 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
17 my $source_file = shift || die("$0: Please specify xml instance file");
18 my $source_doc = $spy->{libxml}->parse_file($source_file);
19 my $results = $spy->{irspy_to_zeerex_style}->transform($source_doc);
20
21 print $results->toString();