Re: [cxml-devel] cxml:doctype function
![](https://secure.gravatar.com/avatar/2005e8bcf48d19ea00cbd07797608701.jpg?s=120&d=mm&r=g)
Thanks, but that's still a newline within an element. It's a fine point, and not terribly important, but ideally we want is something that produces: <!-- comment line 1 --><!-- comment line 2 --> Cheers, - Steve --- On Sat, 6/20/09, David Lichteblau <david@lichteblau.com> wrote: From: David Lichteblau <david@lichteblau.com> Subject: Re: [cxml-devel] cxml:doctype function To: "Nunez Steve" <steve_nunez@yahoo.com> Cc: cxml-devel@common-lisp.net Date: Saturday, June 20, 2009, 3:20 PM Quoting Nunez Steve (steve_nunez@yahoo.com):
Thanks. What I am hoping for is a way to write multi-line comments. cxml:text doesn't seem to work outside elements.
Same approach. CL-USER> (cxml:with-xml-output (cxml:make-character-stream-sink *standard-output*) (cxml:comment (format nil "~%foo~%bar~%")) (cxml:with-element "test")) <?xml version="1.0" encoding="UTF-8"?> <!-- foo bar --><test/>
![](https://secure.gravatar.com/avatar/3173e2ae99b980708880a85092da271e.jpg?s=120&d=mm&r=g)
Quoting Steven Nunez (steve_nunez@yahoo.com):
Thanks, but that's still a newline within an element. It's a fine point, and not terribly important, but ideally we want is something that produces: <!-- comment line 1 --><!-- comment line 2 -->
(It took me a while to figure out what you want, because the text/plain part of your mail actually renders that on a single line as quoted above.) I still don't see the problem though. CL-USER> (cxml:with-xml-output (cxml:make-string-sink) (cxml:comment " comment line 1 ") (cxml:text (string #\newline)) (cxml:comment " comment line 2 ") (cxml:with-element "elt")) "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!-- comment line 1 --> <!-- comment line 2 --><elt/>" d.
participants (2)
-
David Lichteblau
-
Steven Nunez