XPathQueryService service =
(XPathQueryService) testCollection.getService(
"XPathQueryService",
"1.0");
final XPathQueryServiceImpl service2 = (XPathQueryServiceImpl) service;
service2.declareVariable("name", "MONTAGUE");
service2.declareVariable("name", "43");
//ResourceSet result = service.query("//SPEECH[SPEAKER=$name]");
ResourceSet result = service2.query( doc, "//item[stock=$name]");
System.out.println("testStaticVariables 1: ========");
printResult(result);
result = service2.query("$name");
assertEquals(1, result.getSize());
System.out.println("testStaticVariables 2: ========");
printResult(result);
result = service2.query( doc, "//item[stock=43]");
assertEquals(1, result.getSize());
System.out.println("testStaticVariables 3: ========");
printResult(result);
result = service2.query(doc, "//item");
assertEquals(4, result.getSize());
// assertEquals(10, result.getSize());
}