--- t/10functions.t +++ t/10functions.t @@ -1,5 +1,5 @@ use Test; -BEGIN { plan tests => 33 } +BEGIN { plan tests => 31 } use XML::LibXSLT; { @@ -86,56 +86,6 @@ } } -{ - # testcase by Elizabeth Mattijsen - my $parser = XML::LibXML->new; - my $xsltproc = XML::LibXSLT->new; - - my $xml = $parser->parse_string( <<'XML' ); - -XML - my $xslt = $parser->parse_string( <<'XSLT' ); - - - - - - - - - - - - - -XSLT - - my $aux = <<'XML'; - - 1st - 2nd - -XML - { - XML::LibXSLT->register_function( - ('http://foo', 'custom') => sub { $parser->parse_string( $aux )->findnodes('//y') } - ); - my $stylesheet = $xsltproc->parse_stylesheet($xslt); - my $result = $stylesheet->transform($xml); - ok ($result->serialize,qq(\n1st2nd\n)); - } - { - XML::LibXSLT->register_function( - ('http://foo', 'custom') => sub { $parser->parse_string( $aux )->findnodes('//y')->[0]; }); - my $stylesheet = $xsltproc->parse_stylesheet($xslt); - my $result = $stylesheet->transform($xml); - ok ($result->serialize,qq(\n1st\n)); - } -} - { my $parser = XML::LibXML->new; my $xsltproc = XML::LibXSLT->new;