}
public void testExternalVar() {
try {
String query = XmlRpcTest.QUERY_MODULE_DATA;
XQueryService service = (XQueryService) testCollection.getService("XQueryService", "1.0");
service.setProperty("highlight-matches", "none");
service.setNamespace("tm", "http://exist-db.org/test/module");
service.setNamespace("tm-query", "http://exist-db.org/test/module/query");
service.declareVariable("tm:imported-external-string", "imported-string-value");
service.declareVariable("tm-query:local-external-string", "local-string-value");
CompiledExpression compiled = service.compile(query);
ResourceSet result = service.execute(compiled);
assertEquals(result.getSize(), 2);
for (int i = 0; i < result.getSize(); i++) {
XMLResource r = (XMLResource) result.getResource(i);