private void callZorbaCalls(String filename, String value) throws Exception {
InMemoryStore store = InMemoryStore.getInstance();
Zorba zorba = Zorba.getInstance(store);
String query = "declare variable $test external;" + "$test//b";
XQuery xquery = zorba.compileQuery(query);
xquery.setVariableAsDocument("test", filename, value);
Iterator iter = xquery.iterator();
iter.open();
Item item = new Item();
while (iter.next(item)) {
String itemStr = item.serialize();
System.out.println(itemStr);
}
// clean up
iter.close();
iter.destroy();
xquery.destroy();
zorba.shutdown();
InMemoryStore.shutdown(store);
}