int offset,
boolean useStartLocation,
boolean reverse,
int expected)
{
PropertyOwnerPointer root =
(PropertyOwnerPointer) NodePointer.newNodePointer(
new QName(null, "root"),
createContextBean(),
Locale.getDefault());
NodeIterator it;
PropertyPointer start = null;
if (useStartLocation) {
start = root.getPropertyPointer();
start.setPropertyIndex(propertyIndex);
start.setIndex(offset);
}
it = root.childIterator(null, reverse, start);
int size = 0;
while (it.setPosition(it.getPosition() + 1)) {
// System.err.println("LOC: " + it.getCurrentNodePointer());
size++;