 (ns rapscallion.xml
   (:require (clojure [xml :as xml])
             (clojure.java [io :as io]))
-  (:use (yoodls [pipe :only [pipe]]))
+  (:use (yoodls [pipe :only [pipe pipe-map]]))
   (:import [java.io Writer Reader StringReader]
            [java.util.concurrent LinkedBlockingQueue]
            [org.xml.sax Attributes InputSource]

    (InputSource. (io/reader o))))


(defn event-seq
  "Given a source of XML, returns a sequence of events, in the form of
  vectors. See xml-handler."
  [in]

    events))

;;; Transformations of event streams
(defn throw-on-error [events]
  (map (fn [[type ex :as evt]]
         (if (= :error type)
           (throw ex)
           evt))
       events))

(defn merge-text
  "Transform the event stream so that adjacent bits of text are
   emitted as a single text event."
