// the name was not found.
// maybe we are parsing schema for schema.
// consult the externally defined types.
}
final SimpleTypeExp sexp = getOrCreateSchema(r[0]).simpleTypes.
getOrCreate(r[1]);
backwardReference.memorizeLink(sexp);
// simple type might be re-defined later.
// therefore, we always need a late-binding datatype,
// even if the datatype is defined already.
return new XSDatatypeExp(r[0],r[1],this,new XSDatatypeExp.Renderer(){
public XSDatatype render( XSDatatypeExp.RenderingContext context ) {
if(sexp.getType()!=null)
return sexp.getType().getType(context);
else
// undefined error is alreadyreported by
// the detectUndefinedOnes(simpleTypes) method
// so silently recover by using some sort of expression
return StringType.theInstance;