'Set the node\'s xsi:type attribute based on either I{value}\'s
class or the class of the node\'s text.  Then adds the referenced
prefix(s) to the node\'s prefix mapping.
@param node: An XML node
@type node: L{sax.element.Element}
@param tval: The name of the schema type.
@type tval: str
@param ns: The XML namespace of I{tval}.
@type ns: (prefix, uri)
@return: The specified node.
@rtype: L{sax.element.Element}'

@classmethod
def manual(cls, node, tval, ns=None):

    xta = ':'.join((NS.xsins[0], 'type'))
    node.addPrefix(NS.xsins[0], NS.xsins[1])
    if (ns is None):
        node.set(xta, tval)
    else:
        ns = cls.genprefix(node, ns)
        qname = ':'.join((ns[0], tval))
        node.set(xta, qname)
        node.addPrefix(ns[0], ns[1])
    return node
