def getSubstituteType(self, elt, ps):
pyclass = SchemaInstanceType.getTypeDefinition(*self.type)<EOL>if pyclass is None:<EOL><INDENT>raise EvaluateException(<EOL>'<STR_LIT>' %<EOL>(self.type[<NUM_LIT:0>], self.type[<NUM_LIT:1>]), ps.Backtrace(elt))<EOL><DEDENT>typeName = _find_type(elt)<EOL>prefix,typeName = SplitQName(typeName)<EOL>uri = ps.GetElementNSdict(elt).get(prefix)<EOL>subclass = SchemaInstanceType.getTypeDefinition(uri, typeName)<EOL>if subclass is None:<EOL><INDENT>raise EvaluateException(<EOL>'<STR_LIT>' %<EOL>(uri, typeName, self.type[<NUM_LIT:0>], self.type[<NUM_LIT:1>]), ps.Backtrace(elt))<EOL><DEDENT>if not issubclass(subclass, pyclass) and subclass(None) and not issubclass(subclass, pyclass):<EOL><INDENT>raise TypeError(<EOL>'<STR_LIT>' %<EOL>(self.type[<NUM_LIT:0>], self.type[<NUM_LIT:1>], pyclass), ps.Backtrace(elt))<EOL><DEDENT>return subclass((self.nspname, self.pname))<EOL>
if xsi:type does not match the instance type attr,
        check to see if it is a derived type substitution.

        DONT Return the element's type.

        Parameters:
            elt -- the DOM element being parsed
            ps -- the ParsedSoap object.