def _split_qname(self, name, is_element):
        """Split an element of attribute qname into namespace and local
        name.

        :Parameters:
            - `name`: element or attribute QName
            - `is_element`: `True` for an element, `False` for an attribute
        :Types:
            - `name`: `str`
            - `is_element`: `bool`
        
        :Return: namespace URI, local name
        :returntype: `str`, `str`"""
        if name.startswith("{"):
            namespace, name = name[1:].split("}", 1)
            if namespace in STANZA_NAMESPACES:
                namespace = self.stanza_namespace
        elif is_element:
            raise ValueError("Element with no namespace: {0!r}".format(name))
        else:
            namespace = None
        return namespace, name
dataset/ETHPy150Open kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/xmppserializer.py/XMPPSerializer._split_qname/original