Yes and no, depends on what you are after.
If you have an restriction with <enumeration>
and <attributeGroup>
elements, then out of these two <enumeration>
needs to appear first. But besides <restriction>
<attributeGroup>
elements can appear also as child of <attributeGroup>
(nested groups), <complexType>
, <extension>
, <redefine>
or <schema>
(global groups).