Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

XML export fixes - iterate over params, pass doc to children correctly

  • Loading branch information...
commit a0419b6dd753d2293175a065a5e1a091a546b10a 1 parent c14e998
@onewland onewland authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/bb/var.rb
View
8 lib/bb/var.rb
@@ -281,9 +281,9 @@ def gen_xml_exporter(xml)
when XML_STORAGE_SUBELEMENT
if collection
"_.each(@get('#{name}') || [], " +
- "(a_#{name}) -> #{xml}.appendChild(a_#{name}.to_xml()))"
+ "(a_#{name}) -> #{xml}.appendChild(a_#{name}.to_xml(doc)))"
else
- "#{xml}.appendChild(@get('#{name}').to_xml()) if @has('#{name}')"
+ "#{xml}.appendChild(@get('#{name}').to_xml(doc)) if @has('#{name}')"
end
when XML_STORAGE_TEXT
@@ -301,9 +301,9 @@ def gen_xml_exporter(xml)
when XML_STORAGE_PARAMETERS
%{if @has('#{name}')
parameters_xml = doc.createElement('#{xml_name}')
- _.each(@get('#{name}'), (par_name) ->
+ _.each(@get('#{name}'), (par_val, par_name) ->
parameter_xml = doc.createElement('parameter')
- parameter_xml.setAttribute(par_name, #{name}[par_name])
+ parameter_xml.setAttribute(par_name, par_val)
parameters_xml.appendChild(parameter_xml)
)
#{xml}.appendChild(parameters_xml)
Please sign in to comment.
Something went wrong with that request. Please try again.