diff --git a/ext/nokogiri/xml_node.c b/ext/nokogiri/xml_node.c index 02d8588ca2..849a1402f4 100644 --- a/ext/nokogiri/xml_node.c +++ b/ext/nokogiri/xml_node.c @@ -69,11 +69,6 @@ relink_namespace(xmlNodePtr reparented) /* Avoid segv when relinking against unlinked nodes. */ if (reparented->type != XML_ELEMENT_NODE || !reparented->parent) { return; } - /* Make sure that our reparented node has the correct namespaces */ - if (!reparented->ns && reparented->doc != (xmlDocPtr)reparented->parent) { - xmlSetNs(reparented, reparented->parent->ns); - } - /* Search our parents for an existing definition */ if (reparented->nsDef) { xmlNsPtr curr = reparented->nsDef;