Description
===========
External parameter entities do not appear to be handled correctly
in REXML 2.7.1. The script and sample files in this directory
demonstrate the problem. Tested in both 1.6.8/2.3.5 and 1.8.0/2.7.1.
It appears to work correctly in 1.6.8/2.3.5, but not in 1.8.0/2.7.1.
2.3.5 Output
============
Ruby 1.6.8, REXML 2.3.5
File: working.rss
doc.root.class = REXML::Element
doc.root.elements.class = REXML::Elements
Paul Duncan
File: broken.rss
doc.root.class = REXML::Element
doc.root.elements.class = REXML::Elements
O'Reilly Network Articles
2.7.1 Output
============
Ruby 1.8.0, REXML 2.7.1
File: working.rss
doc.root.class = REXML::Element
doc.root.elements.class = REXML::Elements
REXML::Element
File: broken.rss
doc.root.class = REXML::Element
doc.root.elements.class = REXML::Elements
/usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:83:in `internal_parse': undefined method `node_type' for # (NoMethodError)
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:81:in `delete_if'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:81:in `internal_parse'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:60:in `match'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:315:in `d_o_s'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:313:in `each_index'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:313:in `d_o_s'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:317:in `d_o_s'
from /usr/local/lib/site_ruby/1.8/rexml/xpath_parser.rb:313:in `each_index'
... 8 levels...
from ./rexml_test.rb:12:in `open'
from ./rexml_test.rb:12
from ./rexml_test.rb:11:in `each'
from ./rexml_test.rb:11
Files
=====
broken.rss - small file demonstrating problem
broken-orig.rss - original file (from first URL below)
working.rss - working file
Test Sources
============
http://www.oreillynet.com/cs/xml/query/q/295?x-ver=1.0
http://monkeyfist.com/rss1.php3
http://www.pipetree.com/~dj/qmacro.rss10
http://www.decafbad.com/blog/index.rss
http://today.java.net/pub/q/weblogs_rss?x-ver=1.0
http://www.kerneltrap.org/node/feed
(these were reported by karl d'adamo )