anchor.diff:  		 :contents (contents info)))
   
   
  +;;;
  +
  +
  +;; A slightly horrid hack that is good enough for indices but 
  +;; completely untested
  +(defgeneric merge-entries (a b)
  +  (:documentation "Returns a new container C \(of the same type as `a`\)
  +such that C contains every *entry* in a and b. C may share structure with
  +`a` and `b`."))
  +
  +(defmethod merge-entries :around ((a t) (b t))
  +;  (print (list :me a b))
  +  (call-next-method))
  +
  +(defmethod merge-entries ((a null) (b t))
  +  b)
  +
  +(defmethod merge-entries ((a null) (b iteratable-container-mixin))
  +  (error "not implemented"))
  +
  +(defmethod merge-entries ((a null) (b key-value-iteratable-container-mixin))
  +  (merge-using-key-value (copy-template b) b))
  +
  +(defmethod merge-entries ((a t) (b t))
  +  (cond ((and (key-value-iteratable-p a)
  +	      (key-value-iteratable-p b))
  +	 #+(or)
  +	 (merge-key-value-via-iteration a b)
  +	 (error "not implemented"))
  +	((and (iteratable-p a)
  +	      (iteratable-p b))
  +	 (merge-elements-via-iteration a b))
  +	(t
  +	 ;; FIXME - drop b?
  +	 a)))
  +
  +(defmethod merge-entries ((a list) (b t))
  +  (append a (list b)))
  +
  +(defmethod merge-entries ((a list) (b list))
  +  (merge-elements-via-iteration a b))
  +
  +(defmethod merge-entries ((a iteratable-container-mixin)
  +			  (b iteratable-container-mixin))
  +  (merge-elements-via-iteration a b))
  +
  +(defmethod merge-entries 
  +    ((a key-value-iteratable-container-mixin)
  +     (b key-value-iteratable-container-mixin))
  +  (let ((new (copy-template a)))
  +    (merge-using-key-value new a)
  +    (merge-using-key-value new b)
  +    new))
  +
  +(defun merge-elements-via-iteration (a b)
  +  (let ((new (copy-template a)))
  +    (iterate-elements a (lambda (elt) (insert-item new elt)))
  +    (iterate-elements b (lambda (elt) (insert-item new elt)))
  +    new))
  +
  +(defun merge-using-key-value (a b)
  +  (iterate-key-value b (lambda (key value) 
  +			 (let ((existing (item-at a key)))
  +			   (setf (item-at a key) 
  +				 (if existing
  +				     (merge-entries existing value)
  +				     value)))))
  +  a)
  
positive.code: 				  (pathname-type destination)
  				  (url info))
  			  (url info))
  		 :title (title info)))
  
  (defun relative-url-p (url)
    ;; FIXME -- look at the spec...
  
negative.code:   (transfer-selected-properties 
     parent child 
     (set-difference (collect-keys (properties child))
  		   (list :footnote :style-sheet :style-sheets :title)))
    (transfer-document-metadata parent child))
  
  (defun transfer-document-metadata (parent child)
    (iterate-key-value 
     (metadata child)
     (lambda (key value)
  ;     (print (list :p (item-at-1 (metadata parent) key)
  ;		  :c value))
       (aif (item-at-1 (metadata parent) key)
  	  (setf (item-at-1 (metadata parent) key) (merge-entries it value))
  	  (setf (item-at-1 (metadata parent) key) value)))))
  
  
  (defun transfer-selected-properties (parent child properties)
    (let ((*current-document* parent))
  