}
private Object evaluate(String expression, Source context, QName returnType) throws XPathException {
XPath xpath = createXPath();
if (getNamespaces() != null && !getNamespaces().isEmpty()) {
SimpleNamespaceContext namespaceContext = new SimpleNamespaceContext();
namespaceContext.setBindings(getNamespaces());
xpath.setNamespaceContext(namespaceContext);
}
try {
EvaluationCallback callback = new EvaluationCallback(xpath, expression, returnType);
TraxUtils.doWithSource(context, callback);