attributes.add(attribute);
} else if (o instanceof XsTAttributeGroupRef) {
XsTAttributeGroupRef agRef = (XsTAttributeGroupRef) o;
XsQName ref = agRef.getRef();
if (ref == null) {
throw new LocSAXException("Invalid attribute group: Missing 'ref' attribute", pObject.getLocator());
}
XSAttributeGroup attributeGroup = pObject.getXSSchema().getAttributeGroup(ref);
if (attributeGroup == null) {
throw new LocSAXException("Unknown attribute group name: " + ref, pObject.getLocator());
}
attributeGroup.validate();
XSAttributable[] agAttributes = attributeGroup.getAttributes();
for (int j = 0; j < agAttributes.length; j++) {
attributes.add(agAttributes[j]);