File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ v0.0.9 Tue Aug 12, 2008
2+ - change to xpath.rb file to add support to libxml-ruby 0.8+ branch.
3+
14v0.0.6 Tue Jun 5, 2007
25- change to resumption token location in the response, to better conform to the specification.
36- oai shell date parsing should now be working correctly.
Original file line number Diff line number Diff line change 1- RUBY_OAI_VERSION = '0.0.8 '
1+ RUBY_OAI_VERSION = '0.0.9 '
22
33require 'rubygems'
44require 'rake'
Original file line number Diff line number Diff line change @@ -37,8 +37,13 @@ def get_attribute(node, attr_name)
3737 case node . class . to_s
3838 when 'REXML::Element'
3939 return node . attribute ( attr_name )
40- when 'XML::Node'
41- return node . property ( attr_name )
40+ when 'LibXML::XML::Node'
41+ #There has been a method shift between 0.5 and 0.7
42+ if defined? ( node . property ) == nil
43+ return node . attributes [ attr_name ]
44+ else
45+ return node . property ( attr_name )
46+ end
4247 end
4348 return nil
4449 end
@@ -48,11 +53,11 @@ def get_attribute(node, attr_name)
4853 # figure out what sort of object we should do xpath on
4954 def parser_type ( x )
5055 case x . class . to_s
51- when 'XML::Document'
56+ when 'LibXML:: XML::Document'
5257 return 'libxml'
53- when 'XML::Node'
58+ when 'LibXML:: XML::Node'
5459 return 'libxml'
55- when 'XML::Node::Set'
60+ when 'LibXML:: XML::Node::Set'
5661 return 'libxml'
5762 when 'REXML::Element'
5863 return 'rexml'
You can’t perform that action at this time.
0 commit comments