- version
- (if encoding
- (format nil " encoding=\"~A\"" encoding)
- ""
- )
- (if standalone
- (format nil " standalone=\"~A\"" standalone)
- "")))
-
-(defun dtd-stream (stream format &key name public-id system-id entities)
- (case format
- ((:xhtml11 :xhtml :xhtml10-strict :xhtml10-transitional :xhtml-frameset)
- (setq name "html"))
- (:html
- (setq name "HTML"))
- ((:docbook :docbook42)
- (unless name
- (setq name "book"))))
+ version
+ (if encoding
+ (format nil " encoding=\"~A\"" encoding)
+ ""
+ )
+ (if standalone
+ (format nil " standalone=\"~A\"" standalone)
+ "")))
+
+(defun doctype-stream (stream top-element availability registered organization type
+ label language url entities)
+ (format stream "<!DOCTYPE ~A ~A \"~A//~A//~A ~A//~A\"" top-element
+ availability (if registered "+" "-") organization type label language)
+
+ (when url
+ (write-char #\space stream)
+ (write-char #\" stream)
+ (write-string url stream)
+ (write-char #\" stream))
+
+ (when entities
+ (format stream " [~%~A~%]" entities))