Subject: | unbindNode will attempt to unbind DOCUMENT and DOC_FRAGMENT |
Found by code inspection although doing unbindNode on a DOCUMENT object
doesn't seem to cause problems.
In LibXML.xs:
void
unbindNode( self )
xmlNodePtr self
ALIAS:
XML::LibXML::Node::unlink = 1
XML::LibXML::Node::unlinkNode = 2
PREINIT:
ProxyNodePtr docfrag = NULL;
CODE:
!!! This is logically TRUE regardless of self->type !!!
if ( self->type != XML_DOCUMENT_NODE
|| self->type != XML_DOCUMENT_FRAG_NODE ) {
!!!
xmlUnlinkNode( self );
if ( self->type != XML_ATTRIBUTE_NODE ) {
docfrag = PmmNewFragment( self->doc );
xmlAddChild( PmmNODE(docfrag), self );
}
PmmFixOwner( PmmPROXYNODE(self), docfrag );
}