""
(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)
(defvar +xml-prologue-string+
"<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"yes\"?>")
+(defvar +xml-prologue-begin+
+ "<?xml version=\"1.0\" encoding=\"")
+
+(defvar +xml-prologue-end+
+ "\" standalone=\"yes\"?>")
+
(defvar +html4-dtd-string+
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">")
+cl-lml2 (1.6.4-1) unstable; urgency=low
+
+ * Support modifying encoding for std sites
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 9 Sep 2007 17:53:14 -0600
+
cl-lml2 (1.6.3-1) unstable; urgency=low
* New upstream
(lml-load "final.lml_" :optional t))))
-(defmacro print-std-page (file title format &body body)
+(defmacro print-std-page (file title format encoding &body body)
`(progn
- (dtd-prologue ,format)
+ (dtd-prologue ,format ,encoding)
(html
((:html :xmlns "http://www.w3.org/1999/xhtml")
(std-head ,title)
(std-body ,file ,@body)))))
-(defmacro std-page ((out-file title &key (format :xhtml11))
+(defmacro std-page ((out-file title &key (format :xhtml10-strict) (encoding :utf-8))
&body body)
`(let ((*indent* 0))
(with-open-file (*html-stream* (lml-file-name ',out-file :output)
:direction :output
:if-exists :supersede)
- (print-std-page (lml-file-name ',out-file :source) ,title ,format ,@body))))
+ (print-std-page (lml-file-name ',out-file :source) ,title ,format ,encoding ,@body))))
(defmacro titled-pre-section (title &body body)
`(progn
(:h1 ,title)
((:pre "style" "padding-left:30pt;")
,@body))))
-
-
-