Open
Description
Currently Nokogiri tries to figure out namespaces after node reparenting via our homebrewed function node.c:relink_namespace()
, however what we're doing there is probably not quite right as evidenced by the number of issues as well as the commentary on a few PRs, notably #2495 and #2310.
Recently I discovered that libxml2 has a method, xmlReconciliateNs()
, which seems to do what we want (from a brief reading).
This issue is to explore using xmlReconciliateNs()
with careful attention paid to:
- does this fix some of the issues reported
- does this break existing tests
- does this break downstream consumers of Nokogiri