def start_element(ns_uri, prefix, name, attr_map)
case (ns_uri)
when XMLNS_DOC_URI
case (name)
when 'widget'
widget_id = attr_map['name']
unless (widget_id) then
raise WidgetBindingError, 'not found a name attribute'
end
widget = @widget_locator.create_widget(widget_id)
unless (widget) then
raise WidgetBindingError, "not found a widget: #{widget_id.inspect}"
end
@stack.last.add(widget)
@stack.push(widget)
else
end
else
element = Element.new(ns_uri, prefix, name, attr_map)
@stack.last.add(element)
@stack.push(element)
end
nil
end