Skip to content

Commit 967435d

Browse files
committed
DXML-35 alternate approach to newline after preamble
this avoids an IllegalArgumentException
1 parent adfb17f commit 967435d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/clojure/clojure/data/xml/jvm/pprint.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
(defn ^Transformer indenting-transformer []
1616
(doto (-> (TransformerFactory/newInstance) .newTransformer)
17-
(.setOutputProperty (OutputKeys/INDENT) "yes")
18-
(.setOutputProperty (OutputKeys/METHOD) "xml")
17+
(.setOutputProperty OutputKeys/INDENT "yes")
18+
(.setOutputProperty OutputKeys/METHOD "xml")
1919
(.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")))
20+
;; print newline after preamble
21+
(.setOutputProperty OutputKeys/DOCTYPE_PUBLIC "yes")))
2222

2323
(defn indent-xml
2424
[xml-str ^Writer writer]

0 commit comments

Comments
 (0)