#!/usr/bin/perl
use strict;

use XML::Sablotron;

my $sab = new XML::Sablotron;
my $sit = new XML::Sablotron::Situation;

my $data_path = '/home/sitnikov/public_html/xslt-benchmark/data/';

my $file = 'netinfo1';

$file = $1 if $ENV{'QUERY_STRING'} =~ /^([a-z0-9_-]+)$/;

$sab->process($sit, $data_path.$file.'.xsl', $data_path.$file.'.xml', 'arg:/output');

my $result = $sab->getResultArg('arg:/output');

print "Content-Type: text/html\n\n";
print $result;