Hi Herwig, I would like some help on how to use namespaces. I'm using the org.clojure/data.xml "0.1.0-beta3" and am a bit confused and can't find any good examples.
My namespaced xml message has elements where the :tag is an javax.xml.namespace.QName object. Up to now I have been just handling keyword tag objects and have become proficient in locating them using zx/tag= out of the clojure.data.zip library. Have you any advice on how to do this, bearing in mind I need to be able to process namespaced and flat XML's at the same time? Right now I'm thinking about just zipping through the XML and replacing all the QName's with a keyword representation of .getPrefix / .getLocalPart. regards, Francis. On Tuesday, December 13, 2016 at 4:31:20 PM UTC-6, Herwig Hochleitner wrote: > > data.xml is a Clojure contrib library that parses and emits XML. > > Github: https://github.com/clojure/data.xml > Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md > > Information on updating the dependency is here > <https://github.com/clojure/data.xml#installation---alpha>. > > The major updates in 0.2.0-alpha1 are a breaking change to the xml > namespace API as well as clojurescript support. > > It turns out I was overconfident in the choice to use a runtime registry > for establishing a clojure ns <-> xmlns mapping, hence pushed for beta > releases right away. Apologies for that. > > Choosing a fixed, uniform mapping is much simpler. Many benefits unfold > from that (e.g. one can now get an efficient binary xml encoding, by just > serializing parse trees with fressian). > Find detailed rationale in the design page > <http://dev.clojure.org/display/DXML/Namespaced+XML>. > > 0.2.0-alpha1 has a breaking change in the namespacing api. Basically, > `declare-ns` and `alias-ns` have been merged into `alias-uri`. > > The 0.1.0-beta series will be discontiued without a stable release. If > you're already depending on the 0.1.0 flavor of namespace support with the > runtime registry, we can do further beta releases with bugfix backports. > Please let me know if you would have any use for such. > > Clojurescript support, while incomplete, has been coming along nicely. > > Feedback is very welcome, also in particular to the new representation of > qnames: > The qname {http://www.w3.org/1999/xhtml}head is encoded in data.xml as > :http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml/head > You'll notice the percent-encoding in keywords, which works on clojure >= > 1.5 > > Thanks to all data.xml contributors! > Thanks to Phill Wolf aka Matching Socks for providing great feedback > <https://groups.google.com/d/topic/clojure/Txj3suj2B3s/discussion>! > Special Thanks to Alex Miller for being super responsive and a big help > with figuring out cljc deployment! > -- 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.