Skip to content

Commit b1b585f

Browse files
author
Dominique Quatravaux
committed
Fix t/19namespace.t #1
* Remove bizarre assumption that xmlns: is the only namespace in play * At any rate, just calling ->getName() does the right thing these days, so do that
1 parent 96ff473 commit b1b585f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/XML/XPathScript/Processor/LibXML.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sub is_nodelist { return $_[1]->isa( 'XML::LibXML::NodeList' ); }
3030

3131
sub get_attribute {
3232
return $_[1]->isa( 'XML::LibXML::Namespace' )
33-
? ' xmlns:' . $_[1]->getName() . q{="} . $_[1]->value() . q{" }
33+
? sprintf(q{ %s="%s"}, $_[1]->getName(), $_[1]->value())
3434
: $_[1]->toString( 0, 1 )
3535
;
3636
}

0 commit comments

Comments
 (0)