Project

Profile

Help

Revision 4b003aa4

Added by Michael Kay about 15 years ago

Fix bug 1605705: Attribute nodes missorted Fix bug 1605705

View differences:

latest8.8/bj/net/sf/saxon/om/Navigator.java
680 680
                throw new NullPointerException("DOM/JDOM tree compare - internal error");
681 681
            }
682 682
            if (par1.isSameNodeInfo(par2)) {
683
                if (p1.getNodeKind() == Type.ATTRIBUTE && p2.getNodeKind() != Type.ATTRIBUTE) {
684
                    return -1;  // attributes first
685
                }
686
                if (p1.getNodeKind() != Type.ATTRIBUTE && p2.getNodeKind() == Type.ATTRIBUTE) {
687
                    return +1;  // attributes first
688
                }
683 689
                return ((SiblingCountingNode)p1).getSiblingPosition() -
684 690
                        ((SiblingCountingNode)p2).getSiblingPosition();
685 691
            }

Also available in: Unified diff