def auto(cls, node, value=None):
        """
        Automatically set the node's xsi:type attribute based on either
        I{value}'s or the node text's class. When I{value} is an unmapped
        class, the default type (xs:any) is set.

        @param node: XML node.
        @type node: L{sax.element.Element}
        @param value: Object that is or would be the node's text.
        @type value: I{any}
        @return: Specified node.
        @rtype: L{sax.element.Element}

        """
        if value is None:
            value = node.getText()
        if isinstance(value, Object):
            known = cls.known(value)
            if known.name is None:
                return node
            tm = known.name, known.namespace()
        else:
            tm = cls.types.get(value.__class__, cls.types.get(str))
        cls.manual(node, *tm)
        return node
Automatically set the node's xsi:type attribute based on either
        I{value}'s or the node text's class. When I{value} is an unmapped
        class, the default type (xs:any) is set.

        @param node: XML node.
        @type node: L{sax.element.Element}
        @param value: Object that is or would be the node's text.
        @type value: I{any}
        @return: Specified node.
        @rtype: L{sax.element.Element}