 (define-context-input-format :galicia
   [file]
   (with-in-reader file
-    (let [ctx-xml-tree (-> (parse-trim *in*) :content first)
+    (let [ctx-xml-tree (-> (xml/parse *in*) :content first)
 
           nr-objs (Integer/parseInt (-> ctx-xml-tree :attrs :numberObj))
           nr-atts (Integer/parseInt (-> ctx-xml-tree :attrs :numberAtt))

(add-context-input-format :conexp
                          (fn [rdr]
                            (try
                             (= :ConceptualSystem (-> (parse-seq rdr) first :name))
                             (catch Exception _))))

(define-context-input-format :conexp
  [file]
  (with-in-reader file
    (let [xml-tree (parse-trim *in*)
          contexts (:content (first (find-tags (:content xml-tree) :Contexts)))]
      (cond
        (= 0 (count contexts))

        conexp.fca.contexts
        conexp.io.util
        conexp.io.latex)
  (:use [clojure.string :only (split)])
  (:require [clojure.data.xml :as xml])
  (:import [java.io PushbackReader]))


