code: def manual(cls, node, tval, ns=None):
          
          xta = ":".join((Namespace.xsins[0], "type"))
          node.addPrefix(Namespace.xsins[0], Namespace.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
docs: Set the node's xsi:type attribute based on either I{value}'s or the
          node text's class. Then adds the referenced prefix(s) to the node's
          prefix mapping.
  
          @param node: XML node.
          @type node: L{sax.element.Element}
          @param tval: XSD schema type name.
          @type tval: str
          @param ns: I{tval} XML namespace.
          @type ns: (prefix, URI)
          @return: Specified node.
          @rtype: L{sax.element.Element}