private void write(Struct st, XSAttGroupDecl attGroup, boolean goingup) {
Iterator<? extends XSAttributeUse> it;
Iterator<? extends XSAttGroupDecl> itg;
XSAttributeUse att;
XSAttributeDecl decl;
itg = attGroup.getAttGroups().iterator();
while (itg.hasNext()) {
write(st, itg.next(), goingup);
}
it = attGroup.getDeclaredAttributeUses().iterator();
while (it.hasNext()) {
att = it.next();
decl = att.getDecl();
if (decl.getType().getName() == null) {
if (decl.getType().isRestriction()) {
String typeName = processSimpleType(decl.getType(),
decl.getName());
st.addField(decl.getName(), typeName,
(goingup && att.isRequired()), false,
decl.getFixedValue(), xsdMapping);
}
} else {
write(st, decl, att.isRequired());
}
}
}