Skip to content

Commit 2cd1b2d

Browse files
author
Terry Reese
committed
correcting missing elements to the oai client to support the newer libxml packages.
1 parent f140f8e commit 2cd1b2d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

lib/oai/client/header.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def initialize(element)
77
@status = get_attribute(element, 'status')
88
@identifier = xpath(element, './/identifier')
99
@datestamp = xpath(element, './/datestamp')
10-
@set_spec = xpath(element, './/setSpec')
10+
@set_spec = xpath_all(element, './/setSpec')
1111
end
1212

1313
def deleted?

lib/oai/client/response.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ def initialize(doc)
1717
code = error.attributes['code']
1818
when 'LibXML::XML::Node'
1919
message = error.content
20-
code = error.attributes('code')
20+
code = ""
21+
if defined?(error.property) == nil
22+
code = error.attributes['code']
23+
else
24+
code.property('code')
25+
end
2126
end
2227
raise OAI::Exception.new(message, code)
2328
end

0 commit comments

Comments
 (0)