Geoff B
2007-Jul-23 01:38 UTC
Patch review requested: Add XML namespace prefix to AR#to_xml
Hi, could someone please have a look at this patch: [PATCH] Add XML namespace prefix option to ActiveRecord #to_xml http://dev.rubyonrails.org/ticket/9061 Proposed syntax is as follows: firm.to_xml :namespace=> {:prefix => "contact", :name => "http:// xml.rubyonrails.org/contact"} <firm xmlns:contact="http://xml.rubyonrails.org/contact"> # ... attributes ... </firm> This change does not break the existing API. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Geoff B
2007-Jul-23 18:20 UTC
Re: Patch review requested: Add XML namespace prefix to AR#to_xml
Patch updated so that multiple namespaces can be passed in an Array: firm.to_xml :namespace => ["http://xml.rubyonrails.org/contact", {:prefix=>''isbn'', :name=>''urn:ISBN:0-395-36341-6''}] <firm xmlns="http://xml.rubyonrails.org/contact" xmlns:isbn="urn:ISBN: 0-395-36341-6"> # ... normal attributes as shown above ... </firm> http://dev.rubyonrails.org/ticket/9061 On Jul 22, 8:38 pm, Geoff B <gbues...@gmail.com> wrote:> Hi, could someone please have a look at this patch: > > [PATCH] Add XML namespace prefix option to ActiveRecord #to_xmlhttp://dev.rubyonrails.org/ticket/9061 > > Proposed syntax is as follows: > > firm.to_xml :namespace=> {:prefix => "contact", :name => "http:// > xml.rubyonrails.org/contact"} > > <firm xmlns:contact="http://xml.rubyonrails.org/contact"> > # ... attributes ... > </firm> > > This change does not break the existing API.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---