X-Git-Url: http://git.kpe.io/?p=lml2.git;a=blobdiff_plain;f=base.lisp;h=7054761ea88fbf77243537dc57faacfb4d0faa46;hp=517af2cc834fcf336e2db5be3d96930d43d56021;hb=04855fdf0f08cfc768ce7ebc4d49cdd2e19b3f64;hpb=7210bdeef3b698f12f3b6ec5a752b9e9c6ab5068 diff --git a/base.lisp b/base.lisp index 517af2c..7054761 100644 --- a/base.lisp +++ b/base.lisp @@ -38,6 +38,17 @@ (defun lml-print-date (date) (lml-write-string (date-string date))) +(defun xml-header-stream (stream &key (version "1.0") (standalone :unspecified) + (encoding :unspecified)) + (format stream "" + version + (if (eq standalone :unspecified) + "" + (format nil " standalone=\"~A\"" standalone)) + (if (eq encoding :unspecified) + "" + (format nil " encoding=\"~A\"" encoding)))) + (defun dtd-prologue (&optional (format :xhtml11) &key entities) (case format ((:xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional :xhtml10-frameset :xml) @@ -68,7 +79,7 @@ (defmacro html-file-page ((out-file &key (format :xhtml11)) &body body) `(with-open-file (*html-stream* - (lml-file-name ,out-file :output) + (lml-file-name ',out-file :output) :direction :output :if-exists :supersede) (dtd-prologue ,format)