Hello all,

Something odd happened with Hobix after upgrading to Ruby 1.8.6. 
Something has changed in the REXML API or a bug has been introduced
breaking the Atom feed generator.  The traceback:

 /usr/lib/ruby/1.8/hobix/out/atom.rb:59:in `load': undefined method 
   `attributes' for nil:NilClass (NoMethodError)
         from /usr/lib/ruby/1.8/hobix/weblog.rb:617:in `retouch'
         from /usr/lib/ruby/1.8/hobix/weblog.rb:584:in `each'
         ...
         from /usr/bin/hobix:79

Line 59 of atom.rb is:
 59:  rssdoc.elements['/feed/[EMAIL PROTECTED]"alternate"]'].attributes['href']

Somehow this XPath query doesn't seem to find the appropriate XML
element anymore in the following (abbreviated) XML document:

<feed
  xmlns="http://www.w3.org/2005/Atom";
  xmlns:dc="http://purl.org/dc/elements/1.1/";
  xml:lang="en">
    <title></title>
    <link rel="alternate" type="text/html" href="" />
    <link rel="self" type="application/atom+xml" href="" />
    ...
</feed>

However, when the xmlns attribute of the <feed/> element is removed,
everyting works fine.  What would be a possible fix or workaround for
this problem not breaking the spec nor the fact that it should work with
Ruby 1.8.5 and 1.8.6?

Thanks in advance,
Paul

P.S.  People on the REXML list, please Cc me, for I am not on the list.

-- 
Student @ Eindhoven                         | email: [EMAIL PROTECTED]
University of Technology, The Netherlands   | JID: [EMAIL PROTECTED]
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
_______________________________________________
Hobix-is-the-way mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/hobix-is-the-way

Reply via email to