| 51 | | ,(process-html-forms forms env))) |
|---|
| 52 | | (if (boundp '*html-sink*) |
|---|
| 53 | | (,body) |
|---|
| 54 | | (let ((*html-sink* (cxml:make-character-stream-sink *standard-output* :canonical nil :indentation 3))) |
|---|
| 55 | | (,body) |
|---|
| 56 | | (sax:end-document *html-sink*)))))) |
|---|
| | 51 | ,(process-html-forms forms env))) |
|---|
| | 52 | (if (boundp '*html-sink*) |
|---|
| | 53 | (,body) |
|---|
| | 54 | (let ((*html-sink* (cxml:make-character-stream-sink *standard-output* :canonical t))) |
|---|
| | 55 | (,body) |
|---|
| | 56 | (sax:end-document *html-sink*)))))) |
|---|
| 59 | | `(let ((*html-sink* (cxml:make-character-stream-sink ,stream :canonical nil :indentation 3))) |
|---|
| 60 | | ,(process-html-forms forms env) |
|---|
| 61 | | (sax:end-document *html-sink*))) |
|---|
| 62 | | |
|---|
| 63 | | (defmacro with-xhtml ((&optional stream &key (indentation 3)) &body body) |
|---|
| 64 | | `(let ((*html-sink* (cxml:make-character-stream-sink ,stream :canonical nil :indentation ,indentation))) |
|---|
| 65 | | (sax:start-document *html-sink*) |
|---|
| 66 | | (sax:start-dtd *html-sink* |
|---|
| 67 | | "html" |
|---|
| 68 | | "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|---|
| 69 | | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd") |
|---|
| 70 | | (sax:end-dtd *html-sink*) |
|---|
| 71 | | (multiple-value-prog1 |
|---|
| 72 | | (html |
|---|
| | 59 | `(let ((*html-sink* (cxml:make-character-stream-sink ,stream :canonical t))) |
|---|
| | 60 | ,(process-html-forms forms env) |
|---|
| | 61 | (sax:end-document *html-sink*))) |
|---|
| | 62 | |
|---|
| | 63 | (defmacro with-xhtml ((&optional stream &key (indentation 3 indentation-given)) &body body) |
|---|
| | 64 | (declare (ignore indentation)) |
|---|
| | 65 | (when indentation-given |
|---|
| | 66 | (warn "WITH-XHTML: indentation argument is deprecated. It will be ignored")) |
|---|
| | 67 | `(let ((*html-sink* (cxml:make-character-stream-sink ,stream :canonical t))) |
|---|
| | 68 | (sax:start-document *html-sink*) |
|---|
| | 69 | (sax:start-dtd *html-sink* |
|---|
| | 70 | "html" |
|---|
| | 71 | "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|---|
| | 72 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd") |
|---|
| | 73 | (sax:end-dtd *html-sink*) |
|---|
| | 74 | (multiple-value-prog1 |
|---|
| | 75 | (html |
|---|