LSX-00168: referring form of "~S" must NOT occur at the top level Cause: The referring form did not occur within a complex type definition or an attribute group definition. Action: Move the attributeGroup definition to within a complex type definition or an attribute group definition. Or, move the group definition to within a complex type, restriction, extension, choice, or sequence.