Solid namespace support is a much needed feature for data.xml. There's a ticket for it here: http://dev.clojure.org/jira/browse/DXML-4 though unfortunately the patch attached to it came from someone who hadn't signed a CA, so I was not able to accept it.
I am planning on tackling namespace support soon, but would welcome help if you're interested (and have signed a CA). -Ryan On Mon, Jul 16, 2012 at 2:53 PM, Ben Smith-Mannschott <bsmith.o...@gmail.com > wrote: > TL;DR: I'm looking for a Clojure library that round trips XML+namespaces > through Clojure data structures and back again. > > > I'm hacking on a chewing-gum-and-bailing-wire solution publish my wife's > novels as EPUB. I've got most of a prototype of the core functionality > working, but an stubbing my toe an a lack of what would consider > sufficient XML support in the Clojure universe. > > I'm consuming Apple Pages (heavily namespaced XML) and will need to > produce XML Plist, XHTML, OPF and NCX, all of which are namespaced as > well. > > My first prototype parser for Pages documents used clojure.xml and > works, provided Apple never changes the prefixes they use for the > various namespaces the crop up in a Pages document. This is because > clojure.xml is absolutely namespace ignorant. Also, there doesn't seem > to be a way to write clojure.xml out as literal XML. > > I'm in the process of switching to clojure.data.xml, but have discovered > that it parses namespace aware by default, but only uses this in order > to have a simple way to ignore namespace information without getting > confused by spurious namespace prefixes. > > That would be fine for parsing the Pages document, but it's a > non-starter for producing my output files since these require the use of > namespaces. > > I've looked at hiccup, which would solve my HTML production problem, > save for the fact that it produces XHTML 1.0 while my current > half-manual publishing process uses XHTML 1.1. I expect either version > would work, but that still leaves me without a solution for Plist, OPF > and NCX. > > > What are my best options? Am I overlooking a Clojure library that > already does what I need? I could try to teach data.xml to support XML > namespaces, but the current half-hearted hack which conflates Clojure > namespaces with XML namespaces would have to go, I fear. I could instead > put my time into extending hiccup to support XML more generally, or at > least provide explicit support for NCX, OPF and PList. Should I just > write my own library? Maybe I could build atop XOM so as not to reinvent > the heavy lifting. > > // Ben > > -- > 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 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