New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explore using libxml2's xmlReconciliateNs() to deal with reparenting #2919
Comments
|
@nwellnhof Thanks, I just came back to this issue to link to your comment from #613. It's still something I'd like to explore -- I'm not at all convinced that what Nokogiri is doing today is better. And if I discover edge cases I might be able to help contribute to an updated/new implementation. |
Another option, but probably even less tested, is |
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:The text was updated successfully, but these errors were encountered: