I am producing clojure data with XSLT. At first I embraced the result in a vector of vectors so that a single (read-string) would read the whole structure in one take. Unfortunately when the XSLT sheet produces bad data I don't see easily what is going wrong.
So is there an alternative for read-string? This is the code I am using right now. Instead of XSLT outputting a vector of vectors I output vectors separated by "@@@" --------------------- Code ------------------------------- ;; dependency [clojure-saxon "0.9.4"] (def xsl-sheet (xml/compile-xslt (java.io.File. "sheet.xsl"))) (defn convert->transactions[[meta-params xml]] (.toString (xsl-sheet (xml/compile-xml xml) meta-params))) (defn read-in [the-str] (try (map #(try (read-string %1) (catch Exception e (println "read-in Error:" (.getMessage e) " token: " %1 " token-pos" %2 ))) (str/split the-str #"@@@") (range 1000000000)))) --------------------- Code ------------------------------- Is there a more elegant way to read-in and get nice errors ? Many Greetings John -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.