'Delete the value of a stanza interface using dict-like syntax.
Example::
>>> msg[\'body\'] = "Hi!"
>>> msg[\'body\']
\'Hi!\'
>>> del msg[\'body\']
>>> msg[\'body\']
Stanza interfaces are typically mapped directly to the underlyig XML
object, but can be overridden by the presence of a ``del_attrib``
method (or ``del_foo`` where the interface is named ``\'foo\'``, etc).
The effect of deleting a stanza interface value named ``foo`` will be
one of:
1. Call ``del_foo`` override handler, if it exists.
2. Call ``del_foo``, if it exists.
3. Call ``delFoo``, if it exists.
4. Delete ``foo`` element, if ``\'foo\'`` is in
:attr:`sub_interfaces`.
5. Remove ``foo`` element if ``\'foo\'`` is in
:attr:`bool_interfaces`.
6. Delete top level XML attribute named ``foo``.
7. Remove the ``foo`` plugin, if it was loaded.
8. Do nothing.
:param attrib: The name of the affected stanza interface.'

def __delitem__(self, attrib):

    full_attrib = attrib
    attrib_lang = (u'%s|' % attrib).split(u'|')
    attrib = attrib_lang[0]
    lang = (attrib_lang[1] or None)
    kwargs = {}
    if (lang and (attrib in self.lang_interfaces)):
        kwargs[u'lang'] = lang
    kwargs = safedict(kwargs)
    if ((attrib in self.interfaces) or (attrib == u'lang')):
        del_method = (u'del_%s' % attrib.lower())
        del_method2 = (u'del%s' % attrib.title())
        if self.plugin_overrides:
            name = self.plugin_overrides.get(del_method, None)
            if name:
                plugin = self._get_plugin(attrib, lang)
                if plugin:
                    handler = getattr(plugin, del_method, None)
                    if handler:
                        return handler(**kwargs)
        if hasattr(self, del_method):
            getattr(self, del_method)(**kwargs)
        elif hasattr(self, del_method2):
            getattr(self, del_method2)(**kwargs)
        elif (attrib in self.sub_interfaces):
            return self._del_sub(attrib, lang=lang)
        elif (attrib in self.bool_interfaces):
            return self._del_sub(attrib, lang=lang)
        else:
            self._del_attr(attrib)
    elif (attrib in self.plugin_attrib_map):
        plugin = self._get_plugin(attrib, lang, check=True)
        if (not plugin):
            return self
        if plugin.is_extension:
            del plugin[full_attrib]
            del self.plugins[(attrib, None)]
        else:
            del self.plugins[(attrib, plugin[u'lang'])]
        self.loaded_plugins.remove(attrib)
        try:
            self.xml.remove(plugin.xml)
        except ValueError:
            pass
    return self
