Yeah I already have both make-cdata* and cdata-string* implemented. <div><br></div><div>The usage you described make sense, but it seems to me using a parameter to control its logic there (specifically for the output - the input should just be the parsed input without the cdata wrapper) will satisfy the needs and "safer", since otherwise we are leaving it to users passing in the right format. </div>
<div><br></div><div>Something like: </div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><font class="Apple-style-span" face="'courier new', monospace">(define xml-write-mode (make-parameter 'normal)) ;; or 'html, which won't create the cdata wrapper. </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">(define (write-xml-cdata cdata over dent out) </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> (write-xml-base (format (case xml-write-mode ((html) "~a") (else "<![CDATA[~a]]>")) (cdata-string cdata)) over dent out)) </font></div>
</blockquote><div><br></div><div>Cheers,</div><div>yc</div><div><br><div class="gmail_quote">On Wed, Nov 10, 2010 at 4:39 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think a better thing to do is for users who want it to make<br>
<br>
make-cdata* and cdata-string*<br>
<br>
which add the wrappers themselves.<br>
<br>
The places you're referring to in the code abuse this property of<br>
cdata to generate unquoted XML strings. This is very useful in HTML<br>
generation because it is not exactly XML. (For example, most browsers<br>
will break if you XML-encode Javascript strings.)<br>
<font color="#888888"><br>
Jay<br>
</font><div><div></div><div class="h5"><br></div></div></blockquote></div><br>
</div>