}
}
Hashtable complexRegistry = ((SchemaGrammar)fGrammar).getComplexTypeRegistry();
DatatypeValidatorFactoryImpl dataTypeReg = ((SchemaGrammar)fGrammar).getDatatypeRegistry();
if (complexRegistry==null || dataTypeReg == null) {
reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR,
XMLMessages.SCHEMA_GENERIC_ERROR,
fErrorReporter.getLocator().getSystemId()
+" line"+fErrorReporter.getLocator().getLineNumber()
+", canot resolve xsi:type = " + xsiType+" ---2");
} else {
TraverseSchema.ComplexTypeInfo typeInfo =
(TraverseSchema.ComplexTypeInfo) complexRegistry.get(uri+","+localpart);
//TO DO:
// here need to check if this substitution is legal based on the current active grammar,
// this should be easy, cause we already saved final, block and base type information in
// the SchemaGrammar.
if (typeInfo==null) {
if (uri.length() == 0 || uri.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) ) {
fXsiTypeValidator = dataTypeReg.getDatatypeValidator(localpart);
} else
fXsiTypeValidator = dataTypeReg.getDatatypeValidator(uri+","+localpart);
if ( fXsiTypeValidator == null )
reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR,
XMLMessages.SCHEMA_GENERIC_ERROR,
"unresolved type : "+uri+","+localpart
+" found in xsi:type handling");