- if (augSchema1.targetPath.path.size() > augSchema2.targetPath.path.size()) {
- return 1;
- } else if (augSchema1.targetPath.path.size() < augSchema2.targetPath.path.size()) {
- return -1;
+ val Iterator<QName> thisIt = augSchema1.targetPath.getPath().iterator();
+ val Iterator<QName> otherIt = augSchema2.getTargetPath().getPath().iterator();
+ while (thisIt.hasNext()) {
+ if (otherIt.hasNext()) {
+ val int comp = thisIt.next().compareTo(otherIt.next());
+ if (comp != 0) {
+ return comp
+ }
+ } else {
+ return 1
+ }
+ }
+ if (otherIt.hasNext()) {
+ return -1