rec.id index uses @attr 4=104 (urx)
[irspy-moved-to-github.git] / bin / irspy_xsltproc.pl
1 #!/usr/bin/perl -w
2
3 # $Id: irspy_xsltproc.pl,v 1.3 2007-02-02 12:44:43 sondberg Exp $
4 # ------------------------------------------------------------------
5 # This script is only for debugging purposes - it takes a raw IRspy
6 # xml output document as argument and executes the irspy2zeerex.xsl
7 # transformation right in front of you:
8 #
9 # ./irspy_xsltproc.pl irspy_output_raw.xml
10 #
11
12 use strict;
13 use warnings;
14 use lib '../lib';
15 use ZOOM::IRSpy;
16
17 if (@ARGV && $ARGV[0] eq "-d") {
18     shift;
19     XML::LibXSLT->debug_callback(\&xslt_debug);
20 }
21
22 my $dbname = 'localhost:8018/IR-Explain---1';
23 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
24 my $source_file = shift || die("$0: Please specify xml instance file");
25 my $source_doc = $spy->{libxml}->parse_file($source_file);
26 my $results = $spy->{irspy_to_zeerex_style}->transform($source_doc);
27
28 print $results->toString();