# File rexml/sax2parser.rb, line 131 def tag_end name @tag_stack.pop name =~ Namespace::NAMESPLIT prefix = $1 local = $2 uri = get_namespace prefix # find the observers for start_element procs = get_procs( end_element:end_element, name ) listeners = get_listeners( end_element:end_element, name ) # notify observers procs.each { |ob| ob.call( uri, local, name ) } listeners.each { |ob| ob.end_element( uri, local, name ) } namespace_mapping = @namespace_stack.pop # find the observers for namespaces procs = get_procs( end_prefix_mapping:end_prefix_mapping, name ) listeners = get_listeners( end_prefix_mapping:end_prefix_mapping, name ) if procs.size > 0 or listeners.size > 0 namespace_mapping.each do |prefix, uri| # notify observers of namespaces procs.each { |ob| ob.call( prefix ) } listeners.each { |ob| ob.end_prefix_mapping(prefix) } end end end