assertEquals(187, result.getLength());
}
@Test
public void selectAncestorDescendant() throws XPathException, SAXException, PermissionDeniedException{
NameTest test = new NameTest(Type.ELEMENT, new QName("SPEAKER", ""));
NodeSet speakers = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null);
Sequence outerSet = executeQuery(broker, "//SCENE/TITLE[fn:contains(., 'closet')]/ancestor::SCENE", 1, null);
NodeSet result = speakers.selectAncestorDescendant(outerSet.toNodeSet(), NodeSet.DESCENDANT, false, -1, true);
assertEquals(56, result.getLength());
}