-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
On JRuby, removing a namespaced attribute doesn't work #1299
Comments
Digging in a bit more, the problem appears to be with |
Reading between the lines on http://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/Element.html#hasAttribute_java.lang.String_, it looks like |
Hi, thanks for reporting! |
Aw, actually, the commit, e1b5e34 . |
Awesome! Thank you! |
Sorry, I need to revert this, as it's not apparent what the meaning of this code would be given the current implementations in both JRuby and C:
And I think the right thing to do is to add a new method, analogous to Further, I think we could reasonably allow an argument to |
@alex as a workaround in the meantime, you can find the appropriate member of |
@flavorjones Yup, that's what I'm doing |
@alex well, again, that happens to work because you don't have any name collisions. In the example I give above, you would perhaps not get the results you wanted. I'd recommend using |
Thanks. |
* Work around a bug with Nokogiri on JRuby. * See sparklemotion/nokogiri#1299 for details. * Add a basic unit test for remove_mustUnderstand Close #24
The action item here is: write a method |
This code reproduces the issue:
When run under CRuby,
remove_attribute
will return the value"1"
, anddoc.to_s
will show the XML without the attribute. On JRubyremove_attribute
returnsnil
, anddoc.to_s
shows thatmustUnderstand
is still present.The text was updated successfully, but these errors were encountered: