File tree Expand file tree Collapse file tree
main/clojure/clojure/data/xml
test/clojure/clojure/data/xml Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 (if-let [ns (namespace kw)]
7575 (if (.startsWith ns " xmlns." )
7676 (decode-uri (subs ns 6 ))
77- (if (= " xmlns" ns )
78- xmlns-uri
77+ (case ns
78+ " xmlns" xmlns-uri
79+ " xml" xml-uri
7980 (throw (ex-info " Keyword ns is not an xmlns. Needs to be in the form :xmlns.<encoded-uri>/<local>"
8081 {:kw kw}))))
8182 " " )))
Original file line number Diff line number Diff line change 239239 (is (= (emit-str {:tag :el :attrs {:xmlns/xmlns " http://www.w3.org/2000/xmlns/" }})
240240 " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?><el/>" ))
241241 (is (= (emit-str {:tag :el :attrs {:xmlns/xml " http://www.w3.org/XML/1998/namespace" ::xml/lang " en" }})
242+ " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?><el xml:lang=\" en\" />" ))
243+ (is (= (emit-str {:tag :el :attrs {:xml/lang " en" }})
242244 " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?><el xml:lang=\" en\" />" )))
243245
244246(deftest test-empty-elements
You can’t perform that action at this time.
0 commit comments