if (defn == null) {
return;
}
Node attributeGroupNode = null;
if (defn.isAttributeGroupDefinitionReference()) {
XSDAttributeGroupDefinition resolved = defn.getResolvedAttributeGroupDefinition();
logger.debug("Attribute Group definition (ref): '{0}' in ns '{1}' ",
resolved.getName(),
resolved.getTargetNamespace());
attributeGroupNode = parentNode.addNode(resolved.getName(), XsdLexicon.ATTRIBUTE_GROUP);
setReference(attributeGroupNode,
XsdLexicon.REF,
ATTRIBUTE_GROUP_DEFINITIONS,
resolved.getTargetNamespace(),
resolved.getName());
} else {
logger.debug("Attribute Group definition: '{0}' in ns '{1}' ", defn.getName(), defn.getTargetNamespace());
attributeGroupNode = parentNode.addNode(defn.getName(), XsdLexicon.ATTRIBUTE_GROUP);
registerForSymbolSpace(ATTRIBUTE_GROUP_DEFINITIONS,
defn.getTargetNamespace(),