anchor.diff:  
   (defconst xmlns-ns "http://www.w3.org/2000/xmlns/")
   
  -(defvar *foreign*)
  -(setf (documentation '*foreign* 'variable)
  -      "Non-nil in a foreign (SVG or Mathml) element.")
  +(defvar *base*)
  +(setf (documentation '*base* 'variable)
  +      "The current base URL.")
   
   (defgeneric serialize-node (type node)
     (:documentation "Serialize NODE, of TYPE, to the current handler."))
  
positive.code:   (let* ((name (html5-parser:node-name node)))
      (if (not (nc-name-p name))
          (html5-parser:element-map-children #'serialize node)
          (flet ((serialize ()
                   (cxml:with-element name
                     (html5-parser:element-map-attributes
                      (lambda (name ns value)
                        (cond ((equal name "lang")
                               (cxml:attribute* "xml" "lang" value))
                              ((string^= "xmlns" name))
                              ((nc-name-p name)
                               (if (no ns)
  
negative.code:         (#.xmlns-ns "xmlns")
          (t ""))))
  
  (defun find-attribute (node qname)
    (html5-parser:element-map-attributes
     (lambda (name ns value)
       (when (string= name qname)
         (return-from find-attribute
           (values name ns value))))
     node))
  
  (defun serialize-dom (node handler)
    "Serialize NODE, an HTML5 document, to HANDLER as SAX events."
    ;; Since HTML5 has (limited) support for namespaces, we have to use
    ;; SAX instead of HAX.
    (let ((sax:*use-xmlns-namespace* nil)
          (*base* nil))
      (cxml:with-xml-output handler
        (cxml:with-namespace ("" xhtml-ns)
          (serialize node)))))
  