diff options
Diffstat (limited to 't/06-libxml.t')
-rw-r--r-- | t/06-libxml.t | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/t/06-libxml.t b/t/06-libxml.t index 2377738..f496301 100644 --- a/t/06-libxml.t +++ b/t/06-libxml.t @@ -1,9 +1,11 @@ #!perl package XmlTransform;{ - use Tree::Transform::XSLTish; + use Tree::Transform::XSLTish ':engine'; use strict; use warnings; + engine_class 'XML::LibXML::XPathContext'; + default_rules; tree_rule match => 'img[@alt="pick"]', action => sub { @@ -31,7 +33,7 @@ my $tree=XML::LibXML->new->parse_string(<<'XML'); XML { -my $trans=XmlTransform->new(engine=>XML::LibXML::XPathContext->new()); +my $trans=XmlTransform->new(); my @results=$trans->transform($tree); is_deeply \@results,['this one'],'XML example'; } |