   (tag [this] "Return the tag of the element")
   (attrs [this] "Return a map of the attributes of the element")
   (content [this] "Return a sequence of children of the element")
-  (uri [this] "Return the namespace URI of the element"))
+  (uri [this] "Return the namespace URI of the element")
+  (prefix [this] "Returns the prefix that should be used when emitting the element"))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

      xml-escape
      (.replaceAll "'"  "&apos;")))


(defn emit-element [^Element e ^Writer out]
  (let [{:keys [tag attrs content]} e]
    (doto out
      (.write "<")
      (.write (name tag)))
    (doseq [[k v] attrs]
      (if-not (nil? v)
        (doto out

          (emit-xml child out))
        (doto out
          (.write "</")
          (.write tagname)
          (.write ">"))))))

(defn emit-comment [^Comment c ^Writer out]
