     
     (.setContentHandler parser handler)
     
-    (when namespaces
+    (when xmlns-aware
       ;; Set the "lexical-handler" property in order to get
       ;; start-prefix-mapping & end-prefix-mapping events.
-      (.setProperty parser "http://xml.org/sax/properties/lexical-handler" handler)
-      
-      ;; Setting this to true means that undeclared namespace-prefixes
-      ;; will be an error.
-      (.setFeature parser "http://xml.org/sax/features/namespaces" namespaces))
+      (.setProperty parser
+                    "http://xml.org/sax/properties/lexical-handler"
+                    handler))
+    
+    ;; Setting this to true means that undeclared namespace-prefixes
+    ;; will be an error.
+    (.setFeature parser
+                 "http://xml.org/sax/features/namespaces"
+                 (if xmlns-aware true false))
 
     ;; Run the SAX parser in a thread.
     (future

  "
  [events & [opts]]
  ;; TODO - this function is way too busy
  (let [{:keys [namespaces]} opts

        ;; Memoize the metadata maps
        md-map-with-prefix
        (let [cache (atom nil)]
          (fn [md-map prefix]
            (if-let [m (get-in @cache [md-map prefix])]
              m
              (let [new-map (assoc md-map :prefix prefix)]
                (swap! cache assoc-in [md-map prefix] new-map)
                new-map))))
        
        make-element
        (if namespaces
          (fn [[_ uri local-name q-name attrs] content md-map]
            (let [[prefix tag] (string/split q-name #":" 2)
                  prefix (if tag prefix nil)]

  
  (let [;; Use defaults for options unless overridden.
        opts (merge *parse-options* opts)
        {:keys [xmlns-aware
                comments cdata processing-instructions
                keep-whitespace]} opts

