X-Git-Url: http://git.kpe.io/?p=lml2.git;a=blobdiff_plain;f=base.lisp;fp=base.lisp;h=407429f6a244ef863f8defc5f7f1ed0067874f99;hp=208e1a7a9b78655815bed49f7cfd6ac03d2e4af1;hb=cfdabc1cd9728054e3a0267e4b59d8b1bfa28a81;hpb=c995e5549929046c8133e920fa022bce324042e4 diff --git a/base.lisp b/base.lisp index 208e1a7..407429f 100644 --- a/base.lisp +++ b/base.lisp @@ -49,10 +49,16 @@ "" (format nil " encoding=\"~A\"" encoding)))) -(defun dtd-prologue (&optional (format :xhtml11) &key entities) - (case format +(defun dtd-prologue (&optional (format :xhtml11) (encoding :iso-8859-1) &key entities) + (ecase format ((:xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional :xhtml10-frameset :xml) - (lml-write-string +xml-prologue-string+) + (lml-write-string +xml-prologue-begin+) + (ecase encoding + (:iso-8859-1 + (lml-write-string "iso-8859-1")) + (:utf-8 + (lml-write-string "UTF-8"))) + (lml-write-string +xml-prologue-end+) (lml-write-char #\newline) (case format ((:xhtml11 :xhtml)