<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div>Thanks. What I am hoping for is a way to write multi-line comments. cxml:text doesn't seem to work outside elements.</div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> David Lichteblau <david@lichteblau.com><br><b><span style="font-weight: bold;">To:</span></b> Nunez Steve <steve_nunez@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> cxml-devel@common-lisp.net<br><b><span style="font-weight: bold;">Sent:</span></b> Friday, June 19, 2009 7:33:53 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [cxml-devel] cxml:doctype function<br></font><br>
Quoting Nunez Steve (<a ymailto="mailto:steve_nunez@yahoo.com" href="mailto:steve_nunez@yahoo.com">steve_nunez@yahoo.com</a>):<br>> A follow-up question: Is there a way to emit a newline into the file?<br>> It would help in readability of some parts.<br><br>Unless the sink is in canonical mode (and canonical isn't the default<br>anymore in current cxml), newline characters in text are written<br>literally, so just write text including a newline.  Example:<br><br>CL-USER> (cxml:with-xml-output (cxml:make-string-sink)<br>           (cxml:with-element "test"<br>             (cxml:text (format nil "foo~%bar"))))<br>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><br><test>foo<br>bar</test>"<br><br><br>That's for manual breaks.  If you were hoping for automatic indentation,<br>there's the :INDENTATION keyword argument:<br><br>CL-USER> (cxml:with-xml-output (cxml:make-string-sink :indentation 2)<br>           (cxml:with-element
 "outer"<br>             (cxml:with-element "inner"<br>               (cxml:text (format nil "foo~%bar")))))<br>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><br><outer><br>  <inner><br>    foo bar</inner><br></outer>"<br><br>The indentation support isn't very good though.  I use it only for<br>debugging purposes.  Also note that it reindents texts, removing the<br>explicit newline.<br><br><br>d.<br></div></div><div style="position:fixed"></div></div><br>

      </body></html>