Open nchurch opened 11 years ago
+1
Same issue with svg parsing: viewBox
is changed to viewbox
, which is not valid for svg, giving an error.
Could lowercasing be optional?
You could fix the lowercase :viewbox like this:
(-> (pl.danieljanus.tagsoup/parse-string svg-string)
(update 1 clojure.set/rename-keys {:viewbox :viewBox}))
I wonder @nathell, is the lowercasing done in clj-tagsoup or in some underlying library?
I tried parsing some Android XML configuration files; these have attributes, for instance, like
android:keyWidth="15%p" android:horizontalGap="0px"
android:verticalGap="0px"
clj-tagsoup lowercases the attribute names-----e.g.:
android:keywidth
so that it doesn't roundtrip through Hiccup.
Additionally, it doesn't pick up the xmlns declaration in the root element; e.g:
xmlns:android="http://schemas.android.com/apk/res/android"
This has to be put back in by hand.
(I'm using Android as an example, but presumably these issues have relevance beyond Android.)
Thanks,
Nick.