We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please describe the bug
it "foo" do doc = Nokogiri::XML(<<~XML) <dnd:adventure xmlns:dnd="http://www.w3.org/dungeons#"> <dnd:party xmlns:dnd="http://www.w3.org/dragons#"> <dnd:members> </dnd:members> </dnd:party> </dnd:adventure> XML dungeons_ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "dnd" } parent = doc.xpath("//ns:members", ns: "http://www.w3.org/dragons#").first node = doc.create_element("character") node.namespace = dungeons_ns parent.add_child(node) # passes, indicating it's not a reparenting issues assert_equal("http://www.w3.org/dungeons#", node.namespace.href) # fails, maybe this is a serialization issue? not sure. assert_includes(doc.to_xml, %Q{<dnd:character xmlns:dnd="http://www.w3.org/dungeons#"/>}) end
Additional context
I'm pretty sure this is a bug in relink_namespaces which I've wanted to replace for quite a while, see #2919 for other options.
relink_namespaces
The text was updated successfully, but these errors were encountered:
I've got a simple fix for this, will finish it up tonight.
Sorry, something went wrong.
fix(cruby): reconciliation of ns on unparented nodes
7e38303
Closes #3459
fix: reconciliation of ns on unparented nodes
762f2fb
Successfully merging a pull request may close this issue.
Please describe the bug
Additional context
I'm pretty sure this is a bug in
relink_namespaces
which I've wanted to replace for quite a while, see #2919 for other options.The text was updated successfully, but these errors were encountered: