X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=2%2Fbase.lisp;h=517af2cc834fcf336e2db5be3d96930d43d56021;hb=2dcfda178f817bec62b9f51248d96799d254d686;hp=ee6598eb231bbd57e3a36311f90e788b939f27d7;hpb=56101303de2ecd982a094e354a4d4d2eb1547d81;p=lml.git diff --git a/2/base.lisp b/2/base.lisp index ee6598e..517af2c 100644 --- a/2/base.lisp +++ b/2/base.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Aug 2002 ;;;; -;;;; $Id: base.lisp,v 1.7 2003/07/12 17:54:05 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg. ;;;; Rights of modification and redistribution are in the LICENSE file. @@ -38,20 +38,28 @@ (defun lml-print-date (date) (lml-write-string (date-string date))) -(defun dtd-prologue (&optional (format :xhtml11)) +(defun dtd-prologue (&optional (format :xhtml11) &key entities) (case format ((:xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional :xhtml10-frameset :xml) (lml-write-string +xml-prologue-string+) - (lml-write-char #\newline))) - (case format - ((:xhtml11 :xhtml) - (lml-write-string +xhtml11-dtd-string+)) - (:xhtml10-strict - (lml-write-string +xhtml10-strict-dtd-string+)) - (:xhtml10-transitional - (lml-write-string +xhtml10-transitional-dtd-string+)) - (:xhtml10-frameset - (lml-write-string +xhtml10-frameset-dtd-string+)) + (lml-write-char #\newline) + (case format + ((:xhtml11 :xhtml) + (lml-write-string +xhtml11-dtd-string+)) + (:xhtml10-strict + (lml-write-string +xhtml10-strict-dtd-string+)) + (:xhtml10-transitional + (lml-write-string +xhtml10-transitional-dtd-string+)) + (:xhtml10-frameset + (lml-write-string +xhtml10-frameset-dtd-string+))) + (when entities + (lml-write-char #\space) + (lml-write-char #\[) + (lml-write-char #\Newline) + (lml-write-string entities) + (lml-write-char #\Newline) + (lml-write-char #\])) + (lml-write-char #\>)) (:html (lml-write-string +html4-dtd-string+))) (lml-write-char #\newline))