Subject: | failed ->setNodeName with non-prefix on namespace mode. |
if processing namespaced node with XML::LibXML-1.58,
we can't use ->setNodeName without namespace prefix.
such as follows:
$ perl -MXML::LibXML <<'END'
Show quoted text
> my $parser = XML::LibXML->new;
> my $fragment = $parser->parse_balanced_chunk("<foo xmlns='http://www.w3.org/2000/xmlns/' />\n");
> print "before : " . $fragment->serialize;
> $fragment->firstChild->setNodeName('bar');
> print "setname w/o ns : " . $fragment->serialize;
> $fragment->firstChild->setNodeName('not-found-ns:bar');
> print "setname with ns: " .$fragment->serialize;
> END
before : <foo xmlns="http://www.w3.org/2000/xmlns/"/>
setname w/o ns : <foo xmlns="http://www.w3.org/2000/xmlns/"/>
setname with ns: <bar xmlns="http://www.w3.org/2000/xmlns/"/>