Design Discussion for clojure.data.xml
Problem: There have been a slow stream of ad-hoc requests for XML features in clojure, but no unifying design.
- promote (part of?) clojure.contrib.lazy-xml?
- lazy-xml/parse-seq (optionally) relies on an external jar, http://www.extreme.indiana.edu/xgws/xsoap/xpp/ Presumably that option would simply be removed for a clojure.data.xml version?
- lazy-xml/emit was reimplemented fairly recently to rely on java.xml.transform for all escaping, indenting, and character encoding. This tends to be more correct than hand-rolled implementations of these, but does depend on Java's pluggable implementations of these classes leading to potentially inconsistent behavior in different Java installations.
- translation of XML into Clojure data structures.
- clojure.xml, c.c.lazy-xml, and enlive all share same format
- enlive actually supports a superset of clojure.xml (namely comments) but the big overgsight in the current Clojure way to represent XML is how to deal with namespaces
- format is code friendly
- could have an alternate literal-friendly form
- improve/enhance undocumented functions in clojure.xml
- emit XML elements
- XML escaping
- CDATA sections