sparklemotion/nokogiri

Hangs when validating XML file with RelaxNG

joshvoigts opened this issue · 1 comments

Nokogiri hangs at 100% cpu usage when attempting to validate an ICML file using RelaxNG. I have to manually kill the ruby process each time it hangs. It seems to validate ok on smaller files but blows up on larger ones.

Here's a code sample:

require 'nokogiri'

schema = Nokogiri::XML::RelaxNG(File.open('schema/icml.rng'))

instance = Nokogiri::XML(File.open('test.icml'))
errors = schema.validate(instance)

errors.each do |e|
   puts e
end

Apologies for being unresponsive on this issue for so long.

I can't reproduce this without more information. If you're able to reproduce with the current version of Nokogiri, please let me know and I would be happy to re-open it.