def _validate_teaching(cls, belief, teaching, *args, **kwargs):
        """
        Check to make sure the teaching object which will be used as a dictionary key is hashable
        """
        # attempt to transform
        namespaces = kwargs.get('namespaces', None)
        if not namespaces:
            for a in args:
                if isinstance(a, dict): # @TODO check types
                    namespaces = a
                    break

        try:
            return etree.XPath(teaching, namespaces=namespaces or {})
        except:
            pass

        try:
            xml_doc = etree.XML(teaching)
            return etree.XSLT(xml_doc)
        except:
            pass

        raise xml_dogma.XmlDogmaException('The belief "%s" does not have a valid teaching. The Teaching must be an xpath string or xslt document. Received teaching: "%s" (type: %s)' % (belief, teaching, type(teaching)))