I''m having a strange problem with an rxml view - it won''t let me put hyphens in the names of XML elements. The original problem line was: xml.VISA-SSL do But in any other place, if I insert a hyphen into the name of any arbitrary element, I get the following kind of error: undefined method `theTextAfterTheHyphen'' for #<#<Class:0xb7617180>:0xb7616f28> Does anyone know what''s going on here? It''s essential that I can put a hyphen into this element name, since the XML DTD I must conform to specifies it. I''ve Googled but I can''t seem to find anyone else having the same problem. Could someone else with some rxml views try it and confirm they also get the above error when inserting a hyphen into an element name? I''m running Ruby 1.8.2 / Rails 0.14.3 on Gentoo Linux. Thanks for your help! ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/
Dave Silvester
2005-Nov-03 14:52 UTC
Re: Builder / rxml views: hyphens in XML element names
On Thursday 03 Nov 2005 14:17, Dave Silvester wrote:> I''m having a strange problem with an rxml view - it won''t let me put > hyphens in the names of XML elements. > > The original problem line was: > xml.VISA-SSL doFound a solution, just in case others ever need to search on this, because Google didn''t seem to turn up anything and I couldn''t find any special cases mentioned - here''s how to do it: xml.tag! "VISA-SSL" do Still not sure if this is a bug or not, but the above is a workaround. Cheers to the guy on IRC who alerted me to the presence of a command that lets you specifically insert a tag - which is the explicit version of the one invoked by method_missing. I guess it''s just a freak case of slightly ambiguous syntax causing the problem. ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/