--- FragmentLoader_OLD.java Mon Nov 8 11:45:55 2004 +++ FragmentLoader.java Mon Nov 8 11:50:39 2004 @@ -373,7 +373,30 @@ } } } else { + // Check priority of fragment to see if valid + String priority = ai.getValue("value"); String restrName=ai.getValue("name"); + + if(restrName.equals("priority")){ + if(priority.equals("")){ + System.out.println("ERROR: Invalid priority. Priority is empty."); + System.exit(1); + } + StringTokenizer st = new StringTokenizer(priority, "-"); + + if (st.countTokens() == 2){ + String minPriority = st.nextToken(); + String maxPriority = st.nextToken(); + if (maxPriority.compareTo(minPriority) < 0){ + System.out.println("ERROR: Invalid priority. Check priorities to ensure they are valid."); + System.exit(1); + } + } else { + System.out.println("ERROR: Invalid priority. Check priorities to ensure they are valid."); + System.exit(1); + } + } + restrType=(String)rMap.get(restrName); if(restrType!=null) { ai.addAttribute(uri,"type","type","CDATA",restrType);