[Nitro] Whitespace

Lars Olsson lasso at lassoweb.se
Sat Nov 4 04:17:53 EST 2006


Hello,

I found the bug. In /nitro/compiler/elements.rb the doctype method is 
missing. It should be added. The one from /nitro/compiler/morphing.rb 
works just fine:

(from nitro/compiler/morphing.rb, Listener class)

     def doctype(name, pub_sys, long_name, uri)
       @buffer << "<!DOCTYPE #{name} #{pub_sys} #{long_name} #{uri}>"
     end

(you might just want to add a newline at the end. DOCTYPEs generally 
stand on its own line.)

Btw, The fix above works with the default transformation pipeline. There 
*might* be some other compiler classes (not in the default pipeline) 
that need that method added too.

Sincerely

/lasso


________________________________________
Lars Olsson
lasso at lassoweb.se
http://www.lassoweb.se/



George Moschovitis skrev:
>> No problem there. REXML already supports DOCTYPEs. The problem is that
>> Nitro strips the DOCTYPE *after* REXML has processed the template. Since
>> some XML tools require this type of information in order to function
>> they are unable to parse pages rendered by Nitro. This is *very* bad in
>> my opinion (luckily there are workarounds).
> 
> 
> can you (or someone else)  provide a patch for this?
> 
> -g.
> 



More information about the Nitro-general mailing list