#!perl use strict; use XML::LibXSLT; use XML::LibXML; =head1 test.xsl =cut my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $stylesheet = $xslt->parse_stylesheet_file('test.xsl'); my $xml; { local $/=''; $xml = ; } my $source_doc = $parser->parse_string( $xml ); my $result = $stylesheet->transform( $source_doc ); print $stylesheet->output_string( $result ); __DATA__ AA AXX1 XX B2BB CCCZZ3