Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/nori/xml_utility_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ def initialize(nori, name, normalized_attributes = {})
# leave the type alone if we don't know what it is
@type = self.class.available_typecasts.include?(attributes["type"]) ? attributes.delete("type") : attributes["type"]

unless @type
val = attributes["xsi:type"]
val.gsub!(/^.*:/, '') if val
if self.class.available_typecasts.include?(val)
attributes.delete("xsi:type")
@type = val
else
@type = attributes["xsi:type"]
end
end

@nil_element = false
attributes.keys.each do |key|
if result = /^((.*):)?nil$/.match(key)
Expand Down