File tree Expand file tree Collapse file tree
main/clojure/clojure/data/xml/jvm
test/clojure/clojure/data/xml Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11From 0.2.0-alpha2 to 0.2.0-alpha3
22- Minimum requirement is now clojure 1.7.0
3+ - Print newline after preamble when pretty-printing (DXML-35)
34
45From 0.2.0-alpha1 to 0.2.0-alpha2
56- qname function now returns canonical (keyword) names
Original file line number Diff line number Diff line change 1616 (doto (-> (TransformerFactory/newInstance ) .newTransformer)
1717 (.setOutputProperty (OutputKeys/INDENT ) " yes" )
1818 (.setOutputProperty (OutputKeys/METHOD ) " xml" )
19- (.setOutputProperty " {http://xml.apache.org/xslt}indent-amount" " 2" )))
19+ (.setOutputProperty " {http://xml.apache.org/xslt}indent-amount" " 2" )
20+ ; ; print newline after preamble https://bugs.openjdk.java.net/browse/JDK-7150637
21+ (.setOutputProperty " http://www.oracle.com/xml/is-standalone" " yes" )))
2022
2123(defn indent-xml
2224 [xml-str ^Writer writer]
Original file line number Diff line number Diff line change 1616(def xml
1717 " <foo><bar/></foo>" )
1818
19- (defn jdk8? []
20- (-> (System/getProperty " java.version" )
21- (.startsWith " 1.8" )))
22-
2319(def indented-xml
2420 (str
2521 " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?>"
26- ( when-not ( jdk8? ) " \n " )
22+ " \n "
2723 " <foo>
2824 <bar/>
2925</foo>
You can’t perform that action at this time.
0 commit comments