testCollection.storeResource(doc);
System.out.println("testGlobalVars 1: ========");
XQueryService service = (XQueryService) testCollection.getService("XPathQueryService", "1.0");
String query = "xquery version \"1.0\";\n" + "import module namespace foo=\"foo\" at \"" + URI + "/test/" + MODULE5_NAME + "\";\n" + "$foo:bar";
ResourceSet result = service.query(query);
assertEquals(result.getSize(), 1);
assertEquals(result.getResource(0).getContent(), "bar");
System.out.println("testGlobalVars 2: ========");
query = "xquery version \"1.0\";\n" + "declare variable $local:a := 'abc';" + "$local:a";