for (int i = 0; i < count; i++) {
SchemaBase child = schema.getChild(i);
Object obj = child.getExtension();
if (obj instanceof GlobalExtension) {
GlobalExtension global = (GlobalExtension)obj;
global.normalize();
if (global.isRemoved() ||
(!global.isIncluded() && global.isPreferInline() && global.getOverrideType() != null)) {
// just eliminate this definition from the schema
schema.detachChild(i);