lib/xamplr/from-xml.rb in xamplr-1.9.15 vs lib/xamplr/from-xml.rb in xamplr-1.9.16
- old
+ new
@@ -222,11 +222,11 @@
# puts "#{File.basename(__FILE__)} #{__LINE__} EXISTING ELEMENT: #{ existing_element }"
# puts "#{File.basename(__FILE__)} #{__LINE__} WOW, must handle the existing element correctly"
element = existing_element #TODO -- IS THIS RIGHT????????????????????????
end
unless element then
- element = klasses[0].new
+ element = klasses[0].discriminate(@attribute_name, @attribute_namespace, @attribute_value).new
requires_caching = @recovering
# puts "#{File.basename(__FILE__)} #{__LINE__} WOW, what about recovering????"
#TODO -- IS THIS RIGHT????????????????????????
requires_caching = true #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
unless @recovering then
@@ -239,10 +239,10 @@
end
end
end
unless element then
- element = klasses[0].new
+ element = klasses[0].discriminate(@attribute_name, @attribute_namespace, @attribute_value).new
element.note_created(@is_realising)
end
element.note_initialise_attributes_with(@attribute_name, @attribute_namespace, @attribute_value, @is_realising)
element.init_attributes(@attribute_name, @attribute_namespace, @attribute_value)