try {
// make ns available
if(!bind.nsUri().equals("")) {
NamespaceContext nsContext = new NamespaceContext();
nsContext.addPrefix(bind.nsUri(), bind.nsPrefix());
xpath.setNamespaceContext(nsContext);
}
// check if condition applies before evaluation xpath
if(!cond.equals("")) {