Lil problem with RSS::Parser

Hi gurus and nubys,
I’m not a great expert of rss or xml in general, but Maybe I spot a
problem with RSS::Parser v 0.8

It seem that this feed
http://www.siforge.org/articles/forum/index.cgi/show/t20021210__version__control/rss
is valid for feedvalidator.org, but not valid for RSS::Parser.

The error is:
RSS::NotAvailableValueError: value <1901-01-01> of tag is
not avail
able.
from (eval):5:8:in sy_updateBase=' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:295 :insend’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:295
:in start_get_text_element' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:291 :incall’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:232
:in tag_end' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/xmlparser.rb: 29:inendElement’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/xmlparser.rb:
53:in parse' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/xmlparser.rb: 53:in_parse’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:113
:in parse' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:69: inparse’
from (irb):12

More, if I try to parse it with
RSS::Parser.parse(txt,false) I get an argument error

ArgumentError: argument out of range
from C:/Programmi/ruby-1.8/ruby/lib/ruby/1.8/time.rb:166:in
local' from C:/Programmi/ruby-1.8/ruby/lib/ruby/1.8/time.rb:166:inparse’
from (eval):5:11:in sy_updateBase=' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:295 :insend’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:295
:in start_get_text_element' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:291 :incall’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:232
:in tag_end' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/xmlparser.rb: 29:inendElement’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/xmlparser.rb:
53:in parse' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/xmlparser.rb: 53:in_parse’
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:113
:in parse' from C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rss/parser.rb:69: inparse’
from (irb):26

I’m running PragProg installer’s ruby 1.8.1. on WinXP, and the sample
script looks like:

require 'rss/parser’
require 'rss/1.0’
require 'rss/2.0’
require 'rss/syndication’
require 'rss/dublincore’
require 'rss/content’
require 'rss/trackback’
require 'open-uri’
url=“http://www.siforge.org/articles/forum/index.cgi/show/t20021210__version__control/rss

txt=open(url).read
RSS::Parser.parse(txt)

I’m sorry I did not post this to the RSS::Parser mailing list, but my
emailo account is currently unavailable :frowning:

In b1a350t4b2vg9abrqigh7dsnveme2s85jg@4ax.com
“Lil problem with RSS::Parser” on Fri, 12 Mar 2004 21:19:37 +0900,

It seem that this feed
http://www.siforge.org/articles/forum/index.cgi/show/t20021210__version__control/rss
is valid for feedvalidator.org, but not valid for RSS::Parser.

The error is:
RSS::NotAvailableValueError: value <1901-01-01> of tag is
not avail
able.

It’s coused by (1) ruby can’t handle 1901-01-01 time and (2)
my omission which was pointed out in [ruby-dev:23039].

(2) is caused by using Time.iso8601 for parsing
[W3CDTF]. It’s fixed in svn trunk at www.cozmxing.org.
I do this in CVS at cvs.ruby-lang.org before very long.

More, if I try to parse it with
RSS::Parser.parse(txt,false) I get an argument error

It’s coused by (1). In svn trunk, parser ignores this case:
channel.sy_updateBase is nil.

I’m sorry I did not post this to the RSS::Parser mailing list, but my
emailo account is currently unavailable :frowning:

It’s OK also in ruby-talk. :slight_smile:

···

gabriele renzi surrender_it@rc1.vip.ukl.yahoo.com wrote:


kou