5 "created_at" => changeset.created_at.xmlschema,
6 "open" => changeset.open?,
7 "comments_count" => changeset.comments.length,
8 "changes_count" => changeset.num_changes
10 attrs["closed_at"] = changeset.closed_at.xmlschema unless changeset.open?
11 changeset.bbox.to_unscaled.add_bounds_to(attrs, "_") if changeset.bbox.complete?
15 if changeset.user.data_public?
16 attrs["uid"] = changeset.user_id
17 attrs["user"] = changeset.user.display_name
20 xml.changeset(attrs) do |changeset_xml_node|
21 changeset.tags.each do |k, v|
22 changeset_xml_node.tag(:k => k, :v => v)
25 # include discussion if requested
28 changeset_xml_node.discussion do |discussion_xml_node|
29 @comments.each do |comment|
32 "date" => comment.created_at.xmlschema,
33 "visible" => comment.visible
35 if comment.author.data_public?
36 cattrs["uid"] = comment.author.id
37 cattrs["user"] = comment.author.display_name
39 discussion_xml_node.comment(cattrs) do |comment_xml_node|
40 comment_xml_node.text(comment.body)