anchor.diff:                       (format *output-stream* "</~A>" marker))
                      #+(or)
                      (format *output-stream* "~%"))))
  +    (when (document-property "html")
  +      (generate-html-header))
       (do-it (collect-elements (chunks document)) 
  -           (level document))))
  -    +           (level document))
  +    (when (document-property "html")
  +      (format *output-stream* "~&</body>~&</html>"))))
  +    
  +;;; ---------------------------------------------------------------------------
  +
  +(defun generate-html-header ()
  +  (generate-doctype)
  +  (format *output-stream* "~&<html>~&<head>")
  +  (awhen (document-property "title")
  +    (format *output-stream* "~&<title>~a</title>" it))
  +  (awhen (document-property "style-sheet")
  +    (format *output-stream* "~&<link type='text/css' href='~a' rel='stylesheet' />" it))
  +  (format *output-stream* "~&</head>~&<body>"))
  +
  +;;; ---------------------------------------------------------------------------
  +
  +(defun generate-doctype ()
  +  (format *output-stream* "~&<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
  +        \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"))
  +
  +
  
positive.code:   ;; hack!
    (output-html (list (html-encode:encode-for-pre (first body)))))
  
  
  
  #|
  (setf *current-document* ccl:!)
  
  (collect-elements
   (chunks *current-document*)
   :filter
   (lambda (c)
     (not (every-element-p
           (lines c)
           (lambda (l)
             (or (stringp l)
                 (and (consp l) (length-at-most-p l 2))
                 (and (consp l) (eq (first l) 'reference-link))))))))
  
  (render-to-html ccl:@)
  
  |#
  
  (defmethod render-to-html ((document document)) 
    (labels ((do-it (chunks level)
  
negative.code:          (apply #'encode-html stuff (rest codes)))
          (t (format *output-stream* "<~A>" (first codes))
             (apply #'encode-html stuff (rest codes))
             (format *output-stream* "</~A>" (first codes))
             (unless (length-1-list-p codes) 
               (terpri *output-stream*)))))
  
  ;;; ---------------------------------------------------------------------------
  
  