use strict; # -*- perl -*- use Test; BEGIN { plan tests => 7; } use XML::LibXSLT; use XML::LibXML; my $parser = XML::LibXML->new(); ok( $parser ); # U+0100 == LATIN CAPITAL LETTER A WITH MACRON my $doc = $parser->parse_string(<\x{0100}dam XML ok( $doc ); my $xslt = XML::LibXSLT->new(); my $style_doc = $parser->parse_string(< XSLT ok( $style_doc ); my $stylesheet = $xslt->parse_stylesheet($style_doc); ok( $stylesheet ); my $results = $stylesheet->transform($doc); ok( $results ); my $output = $stylesheet->output_string( $results ); ok( $output ); # Test that we've correctly converted to characters seeing as the # output format was UTF-8. ok( $output eq "\x{0100}dam" ) or warn "# output is [[$output]]\n";