Re: clojure.data.xml with newline / return in attribute values

2017-11-09 Thread Jochen
> > It's 'attribute value normalisation' - see > https://www.w3.org/TR/REC-xml/#AVNormalize > Thanks for the link, this indeed looks official :-). Ciao …

Re: clojure.data.xml with newline / return in attribute values

2017-11-09 Thread Jochen
Hi Peter… Anyway, if you use entities instead of \n literals, does that do the > round trip properly? that is actually my second example block above, here the ampersand is faithfully escaped, rendering the encoded value unusable. ;; => "" My hacky remedy in the third example was to replac

Re: clojure.data.xml with newline / return in attribute values

2017-11-09 Thread Peter Hull
On Thursday, 9 November 2017 11:21:36 UTC, Jochen wrote: > > hmmm, that is unfortunately not the reality. In fact any newlines/returns > in attributes are collapsed to a single space (saw mentioned somewhere that > this is officially so). > It's 'attribute value normalisation' - see https://www

Re: clojure.data.xml with newline / return in attribute values

2017-11-09 Thread Jochen
Hi Joost… hmmm, that is unfortunately not the reality. In fact any newlines/returns in attributes are collapsed to a single space (saw mentioned somewhere that this is officially so). This is also what happens here with clojure.data.xml: (prn (-> (xml/emit-str (xml/element :foo {:bar "Baz\r\nqu

clojure.data.xml with newline / return in attribute values

2017-11-09 Thread Jochen
Hi… an unexpected problem that I currently face is about newline and return characters in xml attribute values. I first found it in good old clojure.xml and thought to fix it with Clojure.data.xml (0.0.8 and 0.2.0-alpha3 tried), but it did not help. When I read in some external xml with esca