- def to_xml_node(visible_nodes = nil, user_display_name_cache = nil)
- el1 = XML::Node.new 'way'
- el1['id'] = self.id.to_s
- el1['visible'] = self.visible.to_s
- el1['timestamp'] = self.timestamp.xmlschema
- el1['version'] = self.version.to_s
- el1['changeset'] = self.changeset_id.to_s
-
- user_display_name_cache = {} if user_display_name_cache.nil?
-
- if user_display_name_cache and user_display_name_cache.key?(self.changeset.user_id)
- # use the cache if available
- elsif self.changeset.user.data_public?
- user_display_name_cache[self.changeset.user_id] = self.changeset.user.display_name
- else
- user_display_name_cache[self.changeset.user_id] = nil
- end
+ def to_xml_node(visible_nodes = nil, changeset_cache = {}, user_display_name_cache = {})
+ el = XML::Node.new "way"
+ el["id"] = id.to_s