//get all the attribute content (groups,or uses) and add to q
List attContent = cType.getAttributeContents();
for (Iterator itr = attContent.iterator(); itr.hasNext();) {
XSDAttributeGroupContent content = (XSDAttributeGroupContent) itr.next();
if (content instanceof XSDAttributeUse) {
//an attribute, add it to the list
XSDAttributeUse use = (XSDAttributeUse) content;
attributes.add(use.getAttributeDeclaration());