if (!namespaces.namespaceExists(targetNamespace)) {
throw new InterpretationException(source, indexInSource, "Could not find namespace '" + targetNamespace + "'");
}
if (returnedValue instanceof Map) {
Map returnedMap = (Map)returnedValue;
Context targetContext = namespaces.getNamespaceContext(targetNamespace);
for (Object key : returnedMap.keySet()) {
targetContext.set(key.toString(), returnedMap.get(key));
}
} else {
throw new InterpretationException(source, indexInSource, "Returned value must implement the interface 'java.util.Map'");
}
} else if (targetVariable != null) {