if (test == AnyNodeTest.getInstance()) { // performance hack
test = null; // mark as AnyNodeTest
}
else if (test instanceof NameTest) {
NameTest nt = (NameTest) test;
if (nt.getPrimitiveType() == Type.ELEMENT) { // performance hack
// mark as element name test
NamePool pool = getNamePool();
testLocalName = pool.getLocalName(nt.getFingerprint());
testURI = pool.getURI(nt.getFingerprint());
}
}
else if (test instanceof NodeKindTest) {
if (test.getPrimitiveType() == Type.ELEMENT) { // performance hack
// mark as element type test