use Test;
BEGIN { plan tests => 6 }
use XML::LibXSLT;
use XML::LibXML;
my $parser = XML::LibXML->new();
ok($parser);
my $doc = $parser->parse_string(<<'EOT');
1 or 2
Cranky
1 (sort of)
Aloof
(see Llama)
Friendly
EOT
ok($doc);
my $xslt = XML::LibXSLT->new();
my $style_doc = $parser->parse_string(<<'EOT');
Know Your Dromedaries
| Species |
No of Humps |
Disposition |
|
|
|
EOT
ok($style_doc);
# warn "Style_doc = \n", $style_doc->toString, "\n";
my $stylesheet = $xslt->parse_stylesheet($style_doc);
ok($stylesheet);
my $results = $stylesheet->transform($doc);
ok($results);
my $output = $stylesheet->output_string($results);
ok($output);
# warn "Results:\n", $output, "\n";