The cdata function seems to be emitting outside its enclosing tag. For instance:
(with-element "document" (with-element "foo" (cdata "bar")))
results in:
<document> <![CDATA[bar]]> <foo/> </document>
I'm not too familiar with the CXML internals yet, but it appears that adding '(maybe-emit-start-tag)' to the top of the cdata function fixes this.
Sound right?
Donavon Keithley