anchor.diff:  		      :size #.+qname-buffer-extent+)
      :type hash-table))
   
  +(defmethod print-object ((instance namespace) stream)
  +  (print-unreadable-object (instance stream :type t :identity t)
  +    (princ (namespace-prefix-table instance) stream)
  +    (write-char #\Space stream)
  +    (princ (namespace-string instance) stream)
  +    (write-char #\Space stream)
  +    (princ (instance-finalized-p instance) stream)))
  +
   (defmethod finalize ((instance namespace))
     ;; FIXME: call FINALIZE sometime after model initialization
     ;;
  
positive.code: 
  #|
  
  (defparameter *r* (make-namespace-registry))
  
  (defparameter  *foo* (simplify-string "foo"))
  
  (defparameter  *foo.ex* (simplify-string "http://foo.example.com/"))
  
  (eq (ensure-namespace *foo.ex* *r*)
      (ensure-namespace *foo.ex* *r*))
  ;; => T
  
  (multiple-value-bind (ns pfx)
      (ensure-prefix *foo* *foo.ex* *r*)
    (values (eq pfx *foo*) ns )
    )
   ;; => T, #<structure-object ...>
  
  
  (ensure-prefix "bar" *foo.ex* *r*)
  ;; ^ call multiple times, should not be duplicating prefixes
  
  (handler-case
      (ensure-prefix "bar" "http://bar.example.com/" *r*)
    (namespace-prefix-unbind (c)
      (warn "Caught unbind signal: ~s" c)
      (continue c)))
  ;; expect, then:
  ;;  (= (length (namespace-registry-namespace-table *r*)) 2)
  
  (handler-case
      (ensure-prefix (string (gensym "NS-")) "http://bar.example.com/" *r*)
    (namespace-prefix-bind (c)
      (warn "Caught bind signal: ~s" c)
      (continue c)))
  
  
  |#
  
negative.code: 		 ;; fixme: frobbed dispatching
  		 (namespace (namespace-string ns))
  		 (t ns)))))))
  
  (defun resolve-prefix-namespace (prefix registry &optional (errorp t))
    (declare (type string prefix)
  	   (type namespace-registry regisry)
  	   (values (or namespace null)
  		   (or string null)
  		   &optional))
    (let ((namespaces (namespace-registry-namespace-table registry))
  	ns-p pf-p)
      (do-vector (ns namespaces (cond
  				(errorp
  				 (error "Prefix ~s not found in ~s"
  					prefix registry))
  				(t (values nil nil))))
        (declare (type namespace ns))
        (let ((p (find-prefix prefix ns)))
  	(when p
  	  (return (values ns p)))))))
  
  
  (defun ensure-prefix (prefix uri registry)
    "Ensure that the namespace prefix PREFIX is registered uniquely to the
  