#!/usr/bin/perl -w # ISHIHARA Yoshinori 2005.6.14 # $Id use strict; use XML::LibXSLT; use XML::LibXML; use CGI; ## my $q = CGI->new; my $xml_file = $ARGV[0] || $q->param('xml'); my $xslt_file = $ARGV[1] || $q->param('xslt'); ## my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $stylesheet = $xslt->parse_stylesheet_file($xslt_file); ## my $xml_doc = $parser->parse_file($xml_file); my $result = $stylesheet->transform($xml_doc); ## print "Content-type: text/html\n\n"; print $stylesheet->output_string($result);