in src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java [1352:1385]
private XmlSchemaGroupRef handleGroupRef(XmlSchema schema, Element groupEl, Element schemaEl) {
XmlSchemaGroupRef group = new XmlSchemaGroupRef();
group.setMaxOccurs(getMaxOccurs(groupEl));
group.setMinOccurs(getMinOccurs(groupEl));
Element annotationEl = XDOMUtil.getFirstChildElementNS(groupEl, XmlSchema.SCHEMA_NS, "annotation");
if (annotationEl != null) {
XmlSchemaAnnotation annotation = handleAnnotation(annotationEl);
group.setAnnotation(annotation);
}
if (groupEl.hasAttribute("ref")) {
String ref = groupEl.getAttribute("ref");
group.setRefName(getRefQName(ref, groupEl));
return group;
}
for (Element el = XDOMUtil.getFirstChildElementNS(groupEl, XmlSchema.SCHEMA_NS);
el != null;
el = XDOMUtil.getNextSiblingElement(el)) {
if (el.getLocalName().equals("sequence")) {
group.setParticle(handleSequence(schema, el, schemaEl));
} else if (el.getLocalName().equals("all")) {
group.setParticle(handleAll(schema, el, schemaEl));
} else if (el.getLocalName().equals("choice")) {
group.setParticle(handleChoice(schema, el, schemaEl));
}
}
return group;
}