Skip to content
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

Still more validity errors #1262

Closed
rubys opened this issue Mar 12, 2015 · 5 comments
Closed

Still more validity errors #1262

rubys opened this issue Mar 12, 2015 · 5 comments
Assignees
Milestone

Comments

@rubys
Copy link
Contributor

rubys commented Mar 12, 2015

test case:

require 'nokogiri'
doc = Nokogiri::HTML::Document.new()
x1 = Nokogiri::XML::Element.new('a', doc)
x1.set_attribute('id', 'x')
x2 = Nokogiri::XML::Element.new('a', doc)
x2.set_attribute('id', 'x')

related: #1208 and #1208

@flavorjones
Copy link
Member

OK, will fix for 1.6.7.

@flavorjones flavorjones self-assigned this Mar 16, 2015
@flavorjones flavorjones added this to the 1.6.7 milestone Mar 16, 2015
@flavorjones
Copy link
Member

Interesting: my first attempt at a fix handles the error and adds it to the document @errors array. However, the JRuby implementation doesn't raise an error in this case.

@rubys Would an acceptable solution here be to simply silence this error, rather than capture it in a platform-dependent way? I'm assuming that if someone's building a document using the API this way that they know what they're doing ...

I'll proceed by silencing unless you have objections and an alternative solution.

flavorjones added a commit that referenced this issue Mar 16, 2015
on attribute insertion. Related to #1262.
flavorjones added a commit that referenced this issue Mar 16, 2015
@rubys
Copy link
Contributor Author

rubys commented Mar 16, 2015

I'm OK with silencing.

@epinault
Copy link

is this released? I see the changelog but I don t see any updated gem. I have the same issue and need a way to silence them :(

@demetrios
Copy link

I'm being bombarded with element section: validity error : ID <some-id> already defined warnings. I see that this appears to have been fixed back in March but never released as an update.

Is something holding v1.6.7 back or was this perhaps forgotten?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants