diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-07 03:36:38 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-07 03:36:38 +0000 |
commit | 8dfa6fb0a80d633d71987f06462823ca13b67be8 () | |
tree | ccf92cc3af99d21f06a5a9c32d02e247abe74592 /lib/rss/parser.rb | |
parent | 4ded52b623ebd1b3de12db82f8b54cc156c1fd28 (diff) |
* lib/rss/parser.rb, lib/rss/1.0.rb: accepted rdf:resource or
resource attribute in rdf:li. * test/rss/test_parser.rb: added test for above change. * lib/rss/dublincore.rb: reverted style. * lib/rss/xmlparser.rb: normalized XMLParser class hierarchy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rss/parser.rb | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -260,19 +260,18 @@ module RSS def start_else_element(local, prefix, attrs, ns) class_name = local[0,1].upcase << local[1..-1] current_class = @last_element.class - begin -# if current_class.const_defined?(class_name) next_class = current_class.const_get(class_name) start_have_something_element(local, prefix, attrs, ns, next_class) - rescue NameError -# else if @ignore_unknown_element @proc_stack.push(nil) else parent = "ROOT ELEMENT???" - begin - parent = current_class::TAG_NAME - rescue NameError end raise NotExceptedTagError.new(local, parent) end @@ -317,14 +316,18 @@ module RSS klass.get_attributes.each do |a_name, a_uri, required| - if a_uri for prefix, uri in ns - if uri == a_uri val = attrs["#{prefix}:#{a_name}"] break if val end end - else val = attrs[a_name] end |