#!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
A
XX
1
XX
B
2
BB
C
CC
ZZ
3