Re: XML::LibXML namespaces after node removal
by Dominic Mitchell other posts by this author
Sep 2 2005 2:54AM messages near this date
view in the new Beta List Site
Re: XML::LibXML namespaces after node removal
|
Re: XML::LibXML namespaces after node removal
& XSLT On Fri, Sep 02, 2005 at 11:18:41AM +0200, Robin Berjon wrote:
> Dominic Mitchell wrote:
> >I have a problem with namespaces after removal of a node from a
> >document. I want to remove a node, then write it out to disk as a
> >standalone fragment. But the namespace declarations are going missing.
> >(...)
> >And I can't see why this is happening? Can anyone help me with this?
> >I've attached the above as a test.
>
> Dunno, it could be a bug. With the following after unbindNode() it works:
>
> my $doc2 = $p->createDocument();
> $doc2->importNode($barbar);
> $doc2->setDocumentElement($barbar);
I don't know about a bug, but it's certainly non-intuitive. I would
have thought that unbindNode() would have sorted it out. Perhaps a doc
patch is in order.
Anyway, thanks very much to yourself and Petr for the workaround. I
shall use that.
-Dom
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Dominic Mitchell
Robin Berjon
Dominic Mitchell
Robin Berjon
Dominic Mitchell
Petr Pajas
|