switch (n1.getNodeKind()) {
case Type.ELEMENT:
if (n1.getFingerprint() != n2.getFingerprint()) {
return false;
}
AxisIterator a1 = n1.iterateAxis(Axis.ATTRIBUTE);
AxisIterator a2 = n2.iterateAxis(Axis.ATTRIBUTE);
if (Count.count(a1.getAnother()) != Count.count(a2)) {
return false;
}
while (true) {
NodeInfo att1 = (NodeInfo)a1.next();
if (att1 == null) break;
AxisIterator a2iter = n2.iterateAxis(Axis.ATTRIBUTE,
new NameTest(Type.ATTRIBUTE, att1.getFingerprint(), pool));
NodeInfo att2 = (NodeInfo)a2iter.next();
if (att2==null) {
return false;
}
if (!deepEquals(att1, att2, collator, config)) {
return false;
}
}
// fall through
case Type.DOCUMENT:
AxisIterator c1 = n1.iterateAxis(Axis.CHILD);
AxisIterator c2 = n2.iterateAxis(Axis.CHILD);
while (true) {
NodeInfo d1 = (NodeInfo)c1.next();
while (d1 != null && isIgnorable(d1)) {
d1 = (NodeInfo)c1.next();
}
NodeInfo d2 = (NodeInfo)c2.next();
while (d2 != null && isIgnorable(d2)) {
d2 = (NodeInfo)c2.next();
}
if (d1 == null || d2 == null) {
return (d1 == d2);
}
if (!deepEquals(d1, d2, collator, config)) {