New
[irspy-moved-to-github.git] / bin / xslt_process.pl
1 #!/usr/bin/perl -w
2
3 # $Id: xslt_process.pl,v 1.1 2006-12-12 10:45:04 sondberg Exp $
4
5 use strict;
6 use warnings;
7 use lib '../lib';
8 use Getopt::Std;
9 use ZOOM::IRSpy;
10 use XML::LibXSLT;
11
12 XML::LibXSLT->debug_callback(\&xslt_debug);
13
14 my $dbname = 'localhost:3313/IR-Explain---1';
15 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
16 my $source_file = shift || die("$0: Please specify xml instance file");
17 my $source_doc = $spy->libxml->parse_file($source_file);
18 my $results = $spy->irspy_to_zeerex_style->transform($source_doc);
19
20 print $results->toString(), "\n\n";
21
22
23
24 sub xslt_debug {
25     my ($msg) = @_;
26
27     print STDERR $msg;
28 }