private static ComplexTypeParameter getAttributesForComplex(
			XSComplexType xsComplexType) {

		ComplexTypeParameter ctp = new ComplexTypeParameter();

		Collection<? extends XSAttributeUse> c = xsComplexType
				.getAttributeUses();
		Iterator<? extends XSAttributeUse> i = c.iterator();
		while (i.hasNext()) {

			Attribute a = new Attribute();
			XSAttributeDecl attributeDecl = i.next().getDecl();
			a.setBaseType(attributeDecl.getType().getName());
			a.setName(attributeDecl.getName());
			ctp.getAttributes().add(a);
		}
		return ctp;

	}