My attempt to post this on the REXML JitterBug failed (which is probably 
just as well as I learned one more tidbit since that attempt.

Basically, I would like to have pretty printing on as well as 
transitive.  I see in the rexml_stable todo that this has been crossed 
off, and isn't mentioned in the main branch page either.

The write() method for CData nodes ignores the transitive flag.  This 
snippet of code illustrates the example:

require 'rexml/document'

doc = REXML::Document.new()
root = REXML::Element.new('package', doc)

REXML::CData.new("somestr", true, root)

file = STDOUT
doc.write(file, -1, true)
file.puts "\n\n"
doc.write(file, 0, true)

OUTPUT:
<package><![CDATA[somestr]]></package>


<package>  <![CDATA[somestr]]></package
 >

The extra spaces before the start of the CDATA node change what
the actual document contains rather than just its presentation.
I'm not actually sure why the line is being split on the pretty print
(that started happening when I began passing transitive as true, which 
is what I wasn't doing when I tried to submit the issue on Jitterbug).

Is this something that is possible to fix?  Or has it been deemed 
unworthy?  If so, does anyone have a workaround?  Right now I've just
shut pretty printing off.  This is undesirable since there are many 
occasions when the output will be viewed and/or edited by hand after output.

Thanks,

Brett