anchor.diff:    "Characters to escape in attributes.")
   
   (defmethod close-sink ((self html5-sink))
  -  (prog1 (get-output-stream-string (stream self))
  -    (close (stream self))))
  +  (prog1 (get-output-stream-string (stream-of self))
  +    (close (stream-of self))))
   
   (defmethod sax:end-document ((self html5-sink))
     (when (must-close? self)
  
positive.code: 
  (defmethod sax:start-dtd ((self html5-sink) name public-id system-id)
    (declare (ignore name public-id system-id))
    (write-string "<!doctype html>" (stream self)))
  
  (defmethod sax:characters ((self html5-sink) text)
    (when (and (omit-whitespace? self) (blankp text))
      (return-from sax:characters))
    (escape text text-escapes :stream (stream self)))
  
  (defmethod sax:comment ((self html5-sink) text)
    (when (keep-comments? self)
      (format (stream self) "<!-- ~a -->" text)))
  
  (defun charset-declaration? (attr)
    "Is ATTR a charset declaration from the original document?"
  
negative.code:       (return-from sax:start-element)))
    (let ((*print-pretty*))
      (cond ((no attrs)
             (format (stream-of self) "<~a>" lname))
            (t (format (stream-of self) "<~a" lname)
               (dolist (attr attrs)
                 (let ((name (sax:attribute-qname attr))
                       (value (sax:attribute-value attr)))
                   (unless (string^= "xmlns" name)
                     (format (stream-of self) " ~a=\"" name)
                     (escape value attribute-escapes :stream (stream-of self))
                     (write-char #\" (stream-of self)))))
               (write-char #\> (stream-of self)))))
    ;; Force a UTF-8 charset declaration where it belongs, at the top of
    ;; HEAD.
    (when (string= lname "head")
  