Added command line xslt processor which sets up the IRSpy environment and show
authorAnders S. Mortensen <sondberg@indexdata.dk>
Tue, 12 Dec 2006 10:45:04 +0000 (10:45 +0000)
committerAnders S. Mortensen <sondberg@indexdata.dk>
Tue, 12 Dec 2006 10:45:04 +0000 (10:45 +0000)
debugging messages.

bin/xslt_process.pl [new file with mode: 0755]

diff --git a/bin/xslt_process.pl b/bin/xslt_process.pl
new file mode 100755 (executable)
index 0000000..55aa826
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -w
+
+# $Id: xslt_process.pl,v 1.1 2006-12-12 10:45:04 sondberg Exp $
+
+use strict;
+use warnings;
+use lib '../lib';
+use Getopt::Std;
+use ZOOM::IRSpy;
+use XML::LibXSLT;
+
+XML::LibXSLT->debug_callback(\&xslt_debug);
+
+my $dbname = 'localhost:3313/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);
+
+print $results->toString(), "\n\n";
+
+
+
+sub xslt_debug {
+    my ($msg) = @_;
+
+    print STDERR $msg;
+}