3 # This script is only for debugging purposes - it takes a raw IRspy
4 # xml output document as argument and executes the irspy2zeerex.xsl
5 # transformation right in front of you:
7 # ./irspy_xsltproc.pl irspy_output_raw.xml ...
21 usage $0 [ options ] file.xml ...
25 -f irspy.xsl set irspy_to_zeerex_xsl
29 my $irspy_to_zeerex_xsl;
36 "f=s" => \$irspy_to_zeerex_xsl,
39 die usage if $#ARGV < 0;
40 XML::LibXSLT->debug_callback( \&xslt_debug ) if defined $xslt_debug;
42 $ZOOM::IRSpy::irspy_to_zeerex_xsl = $irspy_to_zeerex_xsl
43 if $irspy_to_zeerex_xsl;
45 my $dbname = 'localhost:8018/IR-Explain---1';
46 my $spy = new ZOOM::IRSpy( $dbname, "admin", "fruitbat" );
48 warn Dumper($spy) if $verbose;
49 foreach my $source_file (@ARGV) {
50 my $source_doc = $spy->{libxml}->parse_file($source_file);
51 my $results = $spy->{irspy_to_zeerex_style}->transform($source_doc);
53 print $results->toString(1);