* @param name attribute name
* @param type attribtue type
* @return List of NameSpaceElements is returned in the order of most specific to least specific.
*/
public static List getElements(String name, Class type){
NameSpaceTranslator xs = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("xs");
NameSpaceTranslator gml = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("gml");
List result = new LinkedList();
if(name==null || name == "")
throw new NullPointerException("Element name must be defined.");
if(type==null)
throw new NullPointerException("Element type must be defined.");
Set s = xs.getAssociatedTypes(type);
s.addAll(xs.getAssociatedTypes(name));
s.addAll(gml.getAssociatedTypes(type));
s.addAll(gml.getAssociatedTypes(name));
Iterator i = s.iterator();
while(i.hasNext()){
NameSpaceElement element = (NameSpaceElement)i.next();
if(name.equals(element.getTypeDefName()))
if(!result.contains(element)){