Author: hhubner Date: Wed Jan 23 09:58:40 2008 New Revision: 2394
Modified: branches/bos/projects/bos/web/boi-handlers.lisp Log: Add root-element keyword argument to WITH-XML-RESPONSE macro.
Modified: branches/bos/projects/bos/web/boi-handlers.lisp ============================================================================== --- branches/bos/projects/bos/web/boi-handlers.lisp (original) +++ branches/bos/projects/bos/web/boi-handlers.lisp Wed Jan 23 09:58:40 2008 @@ -5,7 +5,7 @@
(defvar *xml-sink*)
-(defmacro with-xml-response ((&key (content-type "text/xml")) &body body) +(defmacro with-xml-response ((&key (content-type "text/xml") (root-element "response")) &body body) `(with-http-response (*req* *ent* :content-type ,content-type) (with-query-params (*req* download) (when download @@ -14,7 +14,7 @@ (with-http-body (*req* *ent*) (let ((*xml-sink* (make-character-stream-sink net.html.generator:*html-stream* :canonical nil))) (with-xml-output *xml-sink* - (with-element "response" + (with-element ,root-element ,@body))))))
(defmacro with-xml-error-handler (req &body body)