attr.addAll(Arrays.asList(ag.getAttributes()));
}
}
}
SimpleType st;
if ((ext.getBase() == null)
|| ext.getBase().equalsIgnoreCase("")) {
st = ((SimpleTypeHandler) ext.getChild()).compress(parent);
} else {
st = parent.lookUpSimpleType(ext.getBase());
}
dct.parent = st;
dct.simple = true;
} else {
// restriction
RestrictionHandler rest = (RestrictionHandler) sch.getChild();
// attributes
if (rest.getAttributeDeclarations() != null) {
Iterator it = rest.getAttributeDeclarations().iterator();
while (it.hasNext()) {
Object o = it.next();
if (o instanceof AttributeHandler) {
AttributeHandler ah = (AttributeHandler) o;
attr.add(ah.compress(parent));
} else {
AttributeGroupHandler agh = (AttributeGroupHandler) o;
AttributeGroup ag = agh.compress(parent);
attr.addAll(Arrays.asList(ag.getAttributes()));
}
}
}
SimpleType st = new SimpleTypeGT(id, name,
parent.getTargetNamespace(),
SimpleType.RESTRICTION,
SimpleTypeHandler.getSimpleTypes(rest, parent),
SimpleTypeHandler.getFacets(rest), finaL);
dct.parent = st;