[Nitro] overriding Element.prefix

Richard Hundt richard at protea-systems.com
Tue Aug 1 11:56:36 EDT 2006

Hi List,

I'm trying to override the Element.prefix property (defaults to 'x'). 
I've tried:

require 'nitro'
require 'nitro/element'

include Nitro

Element.prefix = 'px'

require 'element/my_element.rb'

...in my run.rb, to no avail. There's something about the sequence in 
which the Elements::Listener::PREFIX_RE constant is defined which seems 
to preclude changing the prefix at some point after the nitro libraries 
are included. Does this sound right? Is there any way in which I could 
add my own xml namespace?

Any ideas, suggestions or ridicule would be appreciated.


More information about the Nitro-general mailing list