'This callback is used to detect the stream namespace of incoming stream. Used internally.'

def _catch_stream_id(self, ns=None, tag='stream', attrs={}):

    if ((not attrs.has_key('id')) or (not attrs['id'])):
        return self.terminate_stream(STREAM_INVALID_XML)
    self.ID = attrs['id']
    if (not attrs.has_key('version')):
        self._owner.Dialback(self)
