lazy-xml/emit does not pad deeply

2 views
Skip to first unread message

philip....@gmail.com

unread,
Apr 1, 2009, 5:26:31 PM4/1/09
to Clojure
Hi,

user=> (use 'clojure.contrib.lazy-xml)
nil
user=> (emit '{:tag :foo :attrs {:a "b" :c "d"} :content
({:tag :bar :attrs {:e "f"} :content ({:tag :baz :attrs nil :content
("hello")})})} :pad true)
<?xml version='1.0' encoding='UTF-8'?>
<foo a='b' c='d'>
<bar e='f'><baz>hello</baz></bar></foo>

nil

The 'foo' element is getting the requested padding, but it does not
propagate to the nested elements.
I believe line 150 of lazy-xml.clj should read,
(apply emit-element c opts)
to fix this.

Regards,
Phil
Reply all
Reply to author
Forward
0 new messages